diff options
Diffstat (limited to 'src/lib/libc/string/strsep.c')
-rw-r--r-- | src/lib/libc/string/strsep.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/libc/string/strsep.c b/src/lib/libc/string/strsep.c index 69be7fe046..b69b715fc5 100644 --- a/src/lib/libc/string/strsep.c +++ b/src/lib/libc/string/strsep.c | |||
@@ -1,6 +1,8 @@ | |||
1 | /* $OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $ */ | ||
2 | |||
1 | /*- | 3 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990, 1993 |
3 | * All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. |
4 | * | 6 | * |
5 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions |
@@ -31,15 +33,19 @@ | |||
31 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. |
32 | */ | 34 | */ |
33 | 35 | ||
36 | #include <string.h> | ||
37 | #include <stdio.h> | ||
38 | |||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 39 | #if defined(LIBC_SCCS) && !defined(lint) |
35 | /*static const char sccsid[] = "from: @(#)strsep.c 5.4 (Berkeley) 1/26/91";*/ | 40 | #if 0 |
36 | static char *rcsid = "$Id: strsep.c,v 1.1.1.1 1995/10/18 08:42:23 deraadt Exp $"; | 41 | static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93"; |
42 | #else | ||
43 | static char *rcsid = "$OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $"; | ||
44 | #endif | ||
37 | #endif /* LIBC_SCCS and not lint */ | 45 | #endif /* LIBC_SCCS and not lint */ |
38 | 46 | ||
39 | #include <string.h> | ||
40 | |||
41 | /* | 47 | /* |
42 | * Get next token from string *stringp, where tokens are nonempty | 48 | * Get next token from string *stringp, where tokens are possibly-empty |
43 | * strings separated by characters from delim. | 49 | * strings separated by characters from delim. |
44 | * | 50 | * |
45 | * Writes NULs into the string at *stringp to end tokens. | 51 | * Writes NULs into the string at *stringp to end tokens. |
@@ -47,7 +53,7 @@ static char *rcsid = "$Id: strsep.c,v 1.1.1.1 1995/10/18 08:42:23 deraadt Exp $" | |||
47 | * On return, *stringp points past the last NUL written (if there might | 53 | * On return, *stringp points past the last NUL written (if there might |
48 | * be further tokens), or is NULL (if there are definitely no more tokens). | 54 | * be further tokens), or is NULL (if there are definitely no more tokens). |
49 | * | 55 | * |
50 | * If *stringp is NULL, strtoken returns NULL. | 56 | * If *stringp is NULL, strsep returns NULL. |
51 | */ | 57 | */ |
52 | char * | 58 | char * |
53 | strsep(stringp, delim) | 59 | strsep(stringp, delim) |