X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrtok_r.c;h=b60efcdb49cde7734b5f9d838bfc120960b2f781;hb=1d71dc7c690b5fe61e3e0c06303ffb59434bba4b;hp=f7e0e63e515d333198ae12d6d6d73e4ce7c8cd8e;hpb=598580519cc391a0856e5ff7a15c1634d0ad29bc;p=gnulib.git diff --git a/lib/strtok_r.c b/lib/strtok_r.c index f7e0e63e5..b60efcdb4 100644 --- a/lib/strtok_r.c +++ b/lib/strtok_r.c @@ -1,5 +1,6 @@ /* Reentrant string tokenizer. Generic version. - Copyright (C) 1991,1996-1999,2001,2004,2007,2009 Free Software Foundation, Inc. + Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2011 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 @@ -32,12 +33,12 @@ /* 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 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 (char *s, const char *delim, char **save_ptr)