diff options
author | millert <> | 1997-08-20 04:28:14 +0000 |
---|---|---|
committer | millert <> | 1997-08-20 04:28:14 +0000 |
commit | d9e9dd15aef27c2a7246403ea76898fa1a4c061a (patch) | |
tree | 3ea56483928248a93c3560051206ccfcceb1c614 /src/lib/libc/string/strsep.c | |
parent | 4faa3305b950b8ac8eaa6c02f8d7099f2e0f623d (diff) | |
download | openbsd-d9e9dd15aef27c2a7246403ea76898fa1a4c061a.tar.gz openbsd-d9e9dd15aef27c2a7246403ea76898fa1a4c061a.tar.bz2 openbsd-d9e9dd15aef27c2a7246403ea76898fa1a4c061a.zip |
Update from lite2.
Diffstat (limited to 'src/lib/libc/string/strsep.c')
-rw-r--r-- | src/lib/libc/string/strsep.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/lib/libc/string/strsep.c b/src/lib/libc/string/strsep.c index 09f187b62d..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,14 +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 char *rcsid = "$OpenBSD: strsep.c,v 1.2 1996/08/19 08:34:24 tholo Exp $"; | 40 | #if 0 |
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 | ||
36 | #endif /* LIBC_SCCS and not lint */ | 45 | #endif /* LIBC_SCCS and not lint */ |
37 | 46 | ||
38 | #include <string.h> | ||
39 | |||
40 | /* | 47 | /* |
41 | * Get next token from string *stringp, where tokens are nonempty | 48 | * Get next token from string *stringp, where tokens are possibly-empty |
42 | * strings separated by characters from delim. | 49 | * strings separated by characters from delim. |
43 | * | 50 | * |
44 | * Writes NULs into the string at *stringp to end tokens. | 51 | * Writes NULs into the string at *stringp to end tokens. |
@@ -46,7 +53,7 @@ static char *rcsid = "$OpenBSD: strsep.c,v 1.2 1996/08/19 08:34:24 tholo Exp $"; | |||
46 | * 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 |
47 | * 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). |
48 | * | 55 | * |
49 | * If *stringp is NULL, strtoken returns NULL. | 56 | * If *stringp is NULL, strsep returns NULL. |
50 | */ | 57 | */ |
51 | char * | 58 | char * |
52 | strsep(stringp, delim) | 59 | strsep(stringp, delim) |