mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 03:19:54 +08:00
7a364eb364
* libc/string/Makefile.am: Add support for strsep.c. * libc/string/Makefile.in: Regenerated. * libc/string/strsep.c: New file. * libc/string/strtok.c: Change to call __strtok_r service routine. * libc/string/strtok_r.c: Add __strtok_r routine which takes additional flag parameter regarding whether to skip leading delimeters. Change strtok_r to call __strtok_r.
20 lines
440 B
C
20 lines
440 B
C
/* BSD strsep function */
|
|
|
|
/* Copyright 2002, Red Hat Inc. */
|
|
|
|
/* undef STRICT_ANSI so that strsep prototype will be defined */
|
|
#undef __STRICT_ANSI__
|
|
#include <string.h>
|
|
#include <_ansi.h>
|
|
#include <reent.h>
|
|
|
|
extern char *__strtok_r (char *, const char *, char **, int);
|
|
|
|
char *
|
|
_DEFUN (strsep, (source_ptr, delim),
|
|
register char **source_ptr _AND
|
|
register const char *delim)
|
|
{
|
|
return __strtok_r (*source_ptr, delim, source_ptr, 0);
|
|
}
|