aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/string/strsep.c
blob: e1262ac3760664d06f9cd8d7b3d2a4d82452492a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* 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 *
strsep (register char **source_ptr,
	register const char *delim)
{
	return __strtok_r (*source_ptr, delim, source_ptr, 0);
}