summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-09-12 09:59:58 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-09-12 09:59:58 +0000
commit9c8a16d08105c73ff586c107cd03b93024257f3c (patch)
tree9e7b5711b369e4a119f37dbb37f4c6ce0613ccc8
parent59c464dbdd2e253294343f5410be558cc1424392 (diff)
downloadmailutils-9c8a16d08105c73ff586c107cd03b93024257f3c.tar.gz
mailutils-9c8a16d08105c73ff586c107cd03b93024257f3c.tar.bz2
Moved files needed by libmailbox to mailbox directory
-rw-r--r--lib/Makefile.am9
-rw-r--r--mailbox/Makefile.am8
-rw-r--r--mailbox/argcv.c (renamed from lib/argcv.c)6
-rw-r--r--mailbox/argp-ba.c (renamed from lib/argp-ba.c)0
-rw-r--r--mailbox/argp-eexst.c (renamed from lib/argp-eexst.c)0
-rw-r--r--mailbox/argp-fmtstream.c (renamed from lib/argp-fmtstream.c)0
-rw-r--r--mailbox/argp-fs-xinl.c (renamed from lib/argp-fs-xinl.c)0
-rw-r--r--mailbox/argp-help.c (renamed from lib/argp-help.c)0
-rw-r--r--mailbox/argp-parse.c (renamed from lib/argp-parse.c)0
-rw-r--r--mailbox/argp-pv.c (renamed from lib/argp-pv.c)0
-rw-r--r--mailbox/argp-pvh.c (renamed from lib/argp-pvh.c)0
-rw-r--r--mailbox/argp-xinl.c (renamed from lib/argp-xinl.c)0
-rw-r--r--mailbox/getline.c (renamed from lib/getline.c)0
-rw-r--r--mailbox/strchrnul.c (renamed from lib/strchrnul.c)0
-rw-r--r--mailbox/strndup.c (renamed from lib/strndup.c)0
-rw-r--r--mailbox/strnlen.c (renamed from lib/strnlen.c)0
-rw-r--r--mailbox/strtok_r.c66
17 files changed, 79 insertions, 10 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f73e5ab42..f54be6263 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -9,15 +9,12 @@ SUBDIRS = posix
INCLUDES = -I${top_srcdir}/include
libmailutils_la_SOURCES = basename.c daemon.c getopt.c getopt1.c md5.c \
- mu_dbm.c getline.c xstrdup.c xmalloc.c \
- argcv.c \
+ mu_dbm.c xstrdup.c xmalloc.c \
pin.c
EXTRA_DIST = alloca.c fnmatch.c fgetpwent.c getpass.c malloc.c obstack.c \
- realloc.c setenv.c snprintf.c strchrnul.c strndup.c strnlen.c strncasecmp.c \
- strcasecmp.c strtok_r.c strsignal.c xstrtol.c vasprintf.c \
- argp-ba.c argp-eexst.c argp-fmtstream.c argp-fs-xinl.c \
- argp-help.c argp-parse.c argp-pv.c argp-pvh.c argp-xinl.c \
+ realloc.c setenv.c snprintf.c strncasecmp.c \
+ strcasecmp.c strsignal.c xstrtol.c vasprintf.c \
utmp.c
noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h \
diff --git a/mailbox/Makefile.am b/mailbox/Makefile.am
index 18dc263c2..aeeb5a84f 100644
--- a/mailbox/Makefile.am
+++ b/mailbox/Makefile.am
@@ -11,10 +11,14 @@ SUBDIRS = include testsuite
lib_LTLIBRARIES = libmailbox.la
-EXTRA_DIST = mbx_mboxscan.c md5.h
+EXTRA_DIST = mbx_mboxscan.c md5.h strtok_r.c \
+ strndup.c strnlen.c strchrnul.c argp-ba.c argp-eexst.c \
+ argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c \
+ argp-pvh.c argp-xinl.c getline.c
libmailbox_la_SOURCES = \
address.c \
+argcv.c \
attachment.c \
attribute.c \
auth.c \
@@ -74,4 +78,6 @@ url_sendmail.c \
url_smtp.c \
wicket.c
+libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@
+libmailbox_la_LIBADD = @MU_LTLIBOBJS@
libmailbox_la_LDFLAGS = -version-info 0:0:0
diff --git a/lib/argcv.c b/mailbox/argcv.c
index 291f5c44d..59dae4d80 100644
--- a/lib/argcv.c
+++ b/mailbox/argcv.c
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
+ it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
diff --git a/lib/argp-ba.c b/mailbox/argp-ba.c
index 5657c2748..5657c2748 100644
--- a/lib/argp-ba.c
+++ b/mailbox/argp-ba.c
diff --git a/lib/argp-eexst.c b/mailbox/argp-eexst.c
index 6df99e9a0..6df99e9a0 100644
--- a/lib/argp-eexst.c
+++ b/mailbox/argp-eexst.c
diff --git a/lib/argp-fmtstream.c b/mailbox/argp-fmtstream.c
index ee7899bfa..ee7899bfa 100644
--- a/lib/argp-fmtstream.c
+++ b/mailbox/argp-fmtstream.c
diff --git a/lib/argp-fs-xinl.c b/mailbox/argp-fs-xinl.c
index 94d5f5897..94d5f5897 100644
--- a/lib/argp-fs-xinl.c
+++ b/mailbox/argp-fs-xinl.c
diff --git a/lib/argp-help.c b/mailbox/argp-help.c
index 7e7d18faf..7e7d18faf 100644
--- a/lib/argp-help.c
+++ b/mailbox/argp-help.c
diff --git a/lib/argp-parse.c b/mailbox/argp-parse.c
index a651dc2d1..a651dc2d1 100644
--- a/lib/argp-parse.c
+++ b/mailbox/argp-parse.c
diff --git a/lib/argp-pv.c b/mailbox/argp-pv.c
index 506107436..506107436 100644
--- a/lib/argp-pv.c
+++ b/mailbox/argp-pv.c
diff --git a/lib/argp-pvh.c b/mailbox/argp-pvh.c
index 2d0bd3957..2d0bd3957 100644
--- a/lib/argp-pvh.c
+++ b/mailbox/argp-pvh.c
diff --git a/lib/argp-xinl.c b/mailbox/argp-xinl.c
index cbd1388a7..cbd1388a7 100644
--- a/lib/argp-xinl.c
+++ b/mailbox/argp-xinl.c
diff --git a/lib/getline.c b/mailbox/getline.c
index 43b30ae74..43b30ae74 100644
--- a/lib/getline.c
+++ b/mailbox/getline.c
diff --git a/lib/strchrnul.c b/mailbox/strchrnul.c
index c85cfc5a4..c85cfc5a4 100644
--- a/lib/strchrnul.c
+++ b/mailbox/strchrnul.c
diff --git a/lib/strndup.c b/mailbox/strndup.c
index b8891336a..b8891336a 100644
--- a/lib/strndup.c
+++ b/mailbox/strndup.c
diff --git a/lib/strnlen.c b/mailbox/strnlen.c
index ecc9df3a0..ecc9df3a0 100644
--- a/lib/strnlen.c
+++ b/mailbox/strnlen.c
diff --git a/mailbox/strtok_r.c b/mailbox/strtok_r.c
new file mode 100644
index 000000000..cd9eed38e
--- /dev/null
+++ b/mailbox/strtok_r.c
@@ -0,0 +1,66 @@
+/* Reentrant string tokenizer. Generic version.
+ Copyright (C) 1991, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <string.h>
+
+/* Parse S into tokens separated by characters in DELIM.
+ If S is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = strtok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+*/
+char *
+strtok_r (s, delim, save_ptr)
+ char *s;
+ const char *delim;
+ char **save_ptr;
+{
+ char *token;
+
+ if (s == NULL)
+ s = *save_ptr;
+
+ /* Scan leading delimiters. */
+ s += strspn (s, delim);
+ if (*s == '\0')
+ {
+ *save_ptr = s;
+ return NULL;
+ }
+
+ /* Find the end of the token. */
+ token = s;
+ s = strpbrk (token, delim);
+ if (s == NULL)
+ /* This token finishes the string. */
+ /* *save_ptr = __rawmemchr (token, '\0'); */
+ *save_ptr = token + strlen (token);
+ else
+ {
+ /* Terminate the token and make *SAVE_PTR point past it. */
+ *s = '\0';
+ *save_ptr = s + 1;
+ }
+ return token;
+}
+/* weak_alias (__strtok_r, strtok_r) */

Return to:

Send suggestions and report system problems to the System administrator.