Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9221 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-06 00:14:41 +00:00
parent 01a9b4267c
commit 3451283511

View File

@ -3,11 +3,14 @@
** Distributed under the terms of the NewOS License.
*/
#include <sys/types.h>
#include <string.h>
static char *___strtok = NULL;
char *
strtok_r(char *s, char const *ct, char **save_ptr)
{
@ -17,15 +20,16 @@ strtok_r(char *s, char const *ct, char **save_ptr)
return NULL;
sbegin = s ? s : *save_ptr;
if (!sbegin) {
if (!sbegin)
return NULL;
}
sbegin += strspn(sbegin,ct);
sbegin += strspn(sbegin, ct);
if (*sbegin == '\0') {
if (save_ptr)
*save_ptr = NULL;
return NULL;
}
send = strpbrk(sbegin, ct);
if (send && *send != '\0')
*send++ = '\0';
@ -35,6 +39,7 @@ strtok_r(char *s, char const *ct, char **save_ptr)
return sbegin;
}
char *
strtok(char *s, char const *ct)
{