Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/strsep.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 224 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 /*
2 * strsep.c
3 */
4
5 #include <string.h>
6
7 char *strsep(char **stringp, const char *delim)
8 {
9 char *s = *stringp;
10 char *e;
11
12 if (!s)
13 return NULL;
14
15 e = strpbrk(s, delim);
16 if (e)
17 *e++ = '\0';
18
19 *stringp = e;
20 return s;
21 }