This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/542] Fix to strtok_r.c to make it possible to use in gnulib


------- Additional Comments From simon at josefsson dot org  2004-11-12 16:20 -------
Based on discussion in:

http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/2564

Here is a new patch that supersede the last doc fix patch.  Thanks.

2004-11-12  Simon Josefsson  <jas@extundo.com>

	* sysdeps/generic/strtok_r.c: Doc fix.

Index: sysdeps/generic/strtok_r.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtok_r.c,v
retrieving revision 1.13
diff -u -p -r1.13 strtok_r.c
--- sysdeps/generic/strtok_r.c  11 Nov 2004 22:15:46 -0000      1.13
+++ sysdeps/generic/strtok_r.c  12 Nov 2004 16:18:27 -0000
@@ -42,6 +42,17 @@
        x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
        x = strtok_r(NULL, "=", &sp);   // x = NULL
                // s = "abc\0-def\0"
+
+   For the POSIX documentation for this function, see:
+   http://www.opengroup.org/onlinepubs/009695399/functions/strtok.html
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+   Caveat: It doesn't work with multibyte strings unless all of the delimiter
+           characters are ASCII characters < 0x30.
+
+   See also strsep().
 */
 char *
 __strtok_r (char *s, const char *delim, char **save_ptr)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://sources.redhat.com/bugzilla/show_bug.cgi?id=542

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]