Commit 9c8a16d0 9c8a16d08105c73ff586c107cd03b93024257f3c by Sergey Poznyakoff

Moved files needed by libmailbox to mailbox directory

1 parent 59c464db
...@@ -9,15 +9,12 @@ SUBDIRS = posix ...@@ -9,15 +9,12 @@ SUBDIRS = posix
9 9
10 INCLUDES = -I${top_srcdir}/include 10 INCLUDES = -I${top_srcdir}/include
11 libmailutils_la_SOURCES = basename.c daemon.c getopt.c getopt1.c md5.c \ 11 libmailutils_la_SOURCES = basename.c daemon.c getopt.c getopt1.c md5.c \
12 mu_dbm.c getline.c xstrdup.c xmalloc.c \ 12 mu_dbm.c xstrdup.c xmalloc.c \
13 argcv.c \
14 pin.c 13 pin.c
15 14
16 EXTRA_DIST = alloca.c fnmatch.c fgetpwent.c getpass.c malloc.c obstack.c \ 15 EXTRA_DIST = alloca.c fnmatch.c fgetpwent.c getpass.c malloc.c obstack.c \
17 realloc.c setenv.c snprintf.c strchrnul.c strndup.c strnlen.c strncasecmp.c \ 16 realloc.c setenv.c snprintf.c strncasecmp.c \
18 strcasecmp.c strtok_r.c strsignal.c xstrtol.c vasprintf.c \ 17 strcasecmp.c strsignal.c xstrtol.c vasprintf.c \
19 argp-ba.c argp-eexst.c argp-fmtstream.c argp-fs-xinl.c \
20 argp-help.c argp-parse.c argp-pv.c argp-pvh.c argp-xinl.c \
21 utmp.c 18 utmp.c
22 19
23 noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h \ 20 noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h \
......
...@@ -11,10 +11,14 @@ SUBDIRS = include testsuite ...@@ -11,10 +11,14 @@ SUBDIRS = include testsuite
11 11
12 lib_LTLIBRARIES = libmailbox.la 12 lib_LTLIBRARIES = libmailbox.la
13 13
14 EXTRA_DIST = mbx_mboxscan.c md5.h 14 EXTRA_DIST = mbx_mboxscan.c md5.h strtok_r.c \
15 strndup.c strnlen.c strchrnul.c argp-ba.c argp-eexst.c \
16 argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c \
17 argp-pvh.c argp-xinl.c getline.c
15 18
16 libmailbox_la_SOURCES = \ 19 libmailbox_la_SOURCES = \
17 address.c \ 20 address.c \
21 argcv.c \
18 attachment.c \ 22 attachment.c \
19 attribute.c \ 23 attribute.c \
20 auth.c \ 24 auth.c \
...@@ -74,4 +78,6 @@ url_sendmail.c \ ...@@ -74,4 +78,6 @@ url_sendmail.c \
74 url_smtp.c \ 78 url_smtp.c \
75 wicket.c 79 wicket.c
76 80
81 libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@
82 libmailbox_la_LIBADD = @MU_LTLIBOBJS@
77 libmailbox_la_LDFLAGS = -version-info 0:0:0 83 libmailbox_la_LDFLAGS = -version-info 0:0:0
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU Lesser General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software 15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
......
1 /* Reentrant string tokenizer. Generic version.
2 Copyright (C) 1991, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20 #include <string.h>
21
22 /* Parse S into tokens separated by characters in DELIM.
23 If S is NULL, the saved pointer in SAVE_PTR is used as
24 the next starting point. For example:
25 char s[] = "-abc-=-def";
26 char *sp;
27 x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
28 x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
29 x = strtok_r(NULL, "=", &sp); // x = NULL
30 // s = "abc\0-def\0"
31 */
32 char *
33 strtok_r (s, delim, save_ptr)
34 char *s;
35 const char *delim;
36 char **save_ptr;
37 {
38 char *token;
39
40 if (s == NULL)
41 s = *save_ptr;
42
43 /* Scan leading delimiters. */
44 s += strspn (s, delim);
45 if (*s == '\0')
46 {
47 *save_ptr = s;
48 return NULL;
49 }
50
51 /* Find the end of the token. */
52 token = s;
53 s = strpbrk (token, delim);
54 if (s == NULL)
55 /* This token finishes the string. */
56 /* *save_ptr = __rawmemchr (token, '\0'); */
57 *save_ptr = token + strlen (token);
58 else
59 {
60 /* Terminate the token and make *SAVE_PTR point past it. */
61 *s = '\0';
62 *save_ptr = s + 1;
63 }
64 return token;
65 }
66 /* weak_alias (__strtok_r, strtok_r) */