Commit 9c8a16d0 9c8a16d08105c73ff586c107cd03b93024257f3c by Sergey Poznyakoff

Moved files needed by libmailbox to mailbox directory

1 parent 59c464db
......@@ -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 \
......
......@@ -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
......
......@@ -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. */
......
/* 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) */