From 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:19:32 +0000 Subject: import new version of dietlibc --- mdk-stage1/dietlibc/lib/strsep.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 mdk-stage1/dietlibc/lib/strsep.c (limited to 'mdk-stage1/dietlibc/lib/strsep.c') diff --git a/mdk-stage1/dietlibc/lib/strsep.c b/mdk-stage1/dietlibc/lib/strsep.c new file mode 100644 index 000000000..a1bf1872a --- /dev/null +++ b/mdk-stage1/dietlibc/lib/strsep.c @@ -0,0 +1,16 @@ +#include + +char *strsep(char **stringp, const char *delim) { + register char *tmp=*stringp; + register char *tmp2=tmp; + register const char *tmp3; + for (tmp2=tmp; *tmp2; ++tmp2) { + for (tmp3=delim; *tmp3; ++tmp3) + if (*tmp2==*tmp3) { /* delimiter found */ + *tmp2=0; + *stringp=tmp2+1; + return tmp; + } + } + return 0; +} -- cgit v1.2.1