X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrsep.h;h=5b5383f07a7eed1709232635b7643cc17887c126;hb=44d7c1c1f004fa9bfb8ec3948de2671a7958cf5b;hp=87351ff4a79de6dd530cbfe9c6921fd2e6e1cffa;hpb=68f96cd3ccba2a204c40260321a8832f2eb97092;p=gnulib.git diff --git a/lib/strsep.h b/lib/strsep.h index 87351ff4a..5b5383f07 100644 --- a/lib/strsep.h +++ b/lib/strsep.h @@ -20,11 +20,15 @@ #ifndef GNULIB_STRSEP_H_ #define GNULIB_STRSEP_H_ +#if HAVE_STRSEP + /* - * Get strsep, if available. + * Get strsep() declaration. */ #include +#else + /* Searches the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, it is overwritten with a NUL, and *STRINGP is advanced to point to the next char after it. Otherwise, *STRINGP is set to NULL. @@ -35,9 +39,15 @@ empty fields. 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. */ + characters are ASCII characters < 0x30. + + See also strtok_r(). */ extern char *strsep (char **stringp, const char *delim); +#endif + #endif /* GNULIB_STRSEP_H_ */