From 9afc8a596405de12ff3c66e13460b300d95eb74c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Mar 1998 13:01:46 +0000 Subject: Update. 1998-03-30 12:53 Ulrich Drepper * sysdeps/i386/i486/bits/string.h (__strcat_c) [__i686__]: Correct scanning for \0. (__strncat_g): Add i686 specific code. 1998-03-30 Andreas Jaeger * manual/install.texi (Reporting Bugs): Ask to include section names in reports. 1998-03-28 Andreas Schwab * sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h): Emit guard against direct inclusion. 1998-03-28 Andreas Schwab Rework support for libc_nonshared.a: * Makeconfig (object-suffixes-for-libc): New variable. * Rules: Remove handling of static-only and shared-only routines. * Makerules: Handle them here instead. Use object-suffixes-for-libc instead of object-suffixes when dealing with libc objects. (object-suffixes-for-rules): Remove variable. (elide-routines.oS): Elide all routines except static-only routines. ($(objpfx)stamp.oS): Special rule for when static-only-routines is empty. (installed-libcs): Remove special case for .oS. (rmobjs): Likewise. 1998-03-28 Andreas Schwab * Makefile (do-collate-test, do-xfrm-test, do-tst-fmon, do-tst-rpmatch): New targets. (test): Use them. (install-locales): Ignore comment lines. 1998-03-28 Andreas Schwab * elf/Makefile ($(objpfx)ld.so): Depend on version script. ($(objpfx)trusted-dirs.h): Depend also on $(..)Makeconfig. ($(objpfx)rtldtbl.h): Likewise. (CPPFLAGS-dl-load.c): Fix reference to object directory. 1998-03-30 09:36 Ulrich Drepper * manual/string.texi (Finding Tokens in a String): Extend strsep description and correct example. 1998-03-28 Andreas Schwab * manual/socket.texi: Remove misguided explicit line breaks and fix the formatting problem instead by reformulating the paragraphs. * manual/filesys.texi: Likewise. * manual/conf.texi: Likewise. Don't typeset table with index fonts, that looks worse than a minimally overfull line. 1998-03-28 Andreas Schwab * nscd/Makefile (nscd-modules): Move definition outside of conditional. * pwd/Makefile: Use have-thread-library to test for thread library. 1998-03-30 Andreas Jaeger * nss/getXXent_r.c (INTERNAL): Remove unused variable current_nip. * iconvdata/uhc.c (gconv): Remove unused variable idx. 1998-03-30 Ulrich Drepper * sysdeps/unix/sysv/linux/Dist: Add lddlibc4.c. --- manual/string.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'manual/string.texi') diff --git a/manual/string.texi b/manual/string.texi index f33303b356..dd3c68d294 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -1182,6 +1182,12 @@ moving pointer has to be done by the user. Successive calls to @var{delimiter}, returning the address of the next token and updating @var{string_ptr} to point to the beginning of the next token. +If the input string contains more than one character from +@var{delimiter} in a row @code{strsep} returns an empty string for each +pair of characters from @var{delimiter}. This means that a program +normally should test for @code{strsep} returning an empty string before +processing it. + This function was introduced in 4.3BSD and therefore is widely available. @end deftypefun @@ -1206,8 +1212,13 @@ token = strsep (&running, delimiters); /* token => "words" */ token = strsep (&running, delimiters); /* token => "separated" */ token = strsep (&running, delimiters); /* token => "by" */ token = strsep (&running, delimiters); /* token => "spaces" */ +token = strsep (&running, delimiters); /* token => "" */ +token = strsep (&running, delimiters); /* token => "" */ +token = strsep (&running, delimiters); /* token => "" */ token = strsep (&running, delimiters); /* token => "and" */ +token = strsep (&running, delimiters); /* token => "" */ token = strsep (&running, delimiters); /* token => "punctuation" */ +token = strsep (&running, delimiters); /* token => "" */ token = strsep (&running, delimiters); /* token => NULL */ @end smallexample -- cgit v1.2.3