Don't let endgrent clobber errno, no matter how improbable.
[gnulib.git] / lib / strtok_r.c
index e9c143e..fde7b5c 100644 (file)
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991,1996-1999,2001,2004 Free Software Foundation, Inc.
+   Copyright (C) 1991,1996-1999,2001,2004,2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -26,8 +26,6 @@
 #undef __strtok_r
 
 #ifndef _LIBC
-/* Get specification.  */
-# include "strtok_r.h"
 # define __strtok_r strtok_r
 # define __rawmemchr strchr
 #endif
        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)