strsep.c (348238dbd42306d9fb5d89ab393b840572cfeb0f) strsep.c (4a8dea8cf97aab33f4e6a11afcc64dd9562f3bfd)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 34 unchanged lines hidden (view full) ---

43 * Writes NULs into the string at *stringp to end tokens.
44 * delim need not remain constant from call to call.
45 * On return, *stringp points past the last NUL written (if there might
46 * be further tokens), or is NULL (if there are definitely no more tokens).
47 *
48 * If *stringp is NULL, strsep returns NULL.
49 */
50char *
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 34 unchanged lines hidden (view full) ---

43 * Writes NULs into the string at *stringp to end tokens.
44 * delim need not remain constant from call to call.
45 * On return, *stringp points past the last NUL written (if there might
46 * be further tokens), or is NULL (if there are definitely no more tokens).
47 *
48 * If *stringp is NULL, strsep returns NULL.
49 */
50char *
51strsep(stringp, delim)
52 char **stringp;
53 const char *delim;
51strsep(char **stringp, const char *delim)
54{
55 char *s;
56 const char *spanp;
57 int c, sc;
58 char *tok;
59
60 if ((s = *stringp) == NULL)
61 return (NULL);

--- 16 unchanged lines hidden ---
52{
53 char *s;
54 const char *spanp;
55 int c, sc;
56 char *tok;
57
58 if ((s = *stringp) == NULL)
59 return (NULL);

--- 16 unchanged lines hidden ---