* Copyright (c) 1990 The Regents of the University of California.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid
[] = "@(#)strsep.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
* Get next token from string *stringp, where tokens are nonempty
* strings separated by characters from delim.
* Writes NULs into the string at *stringp to end tokens.
* delim need not remain constant from call to call.
* On return, *stringp points past the last NUL written (if there might
* be further tokens), or is NULL (if there are definitely no more tokens).
* If *stringp is NULL, strtoken returns NULL.
register const char *delim
;
register const char *spanp
;
if ((s
= *stringp
) == NULL
)
if ((sc
= *spanp
++) == c
) {