strsep.c (de5fe5d53b634e506f94a6df3a9261aa20fa152f) strsep.c (8fb3f3f68288ae2b1b53dd65e3dd673d83c80f4c)
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

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

48 * delim need not remain constant from call to call.
49 * On return, *stringp points past the last NUL written (if there might
50 * be further tokens), or is NULL (if there are definitely no more tokens).
51 *
52 * If *stringp is NULL, strsep returns NULL.
53 */
54char *
55strsep(stringp, delim)
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

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

48 * delim need not remain constant from call to call.
49 * On return, *stringp points past the last NUL written (if there might
50 * be further tokens), or is NULL (if there are definitely no more tokens).
51 *
52 * If *stringp is NULL, strsep returns NULL.
53 */
54char *
55strsep(stringp, delim)
56 register char **stringp;
57 register const char *delim;
56 char **stringp;
57 const char *delim;
58{
58{
59 register char *s;
60 register const char *spanp;
61 register int c, sc;
59 char *s;
60 const char *spanp;
61 int c, sc;
62 char *tok;
63
64 if ((s = *stringp) == NULL)
65 return (NULL);
66 for (tok = s;;) {
67 c = *s++;
68 spanp = delim;
69 do {

--- 12 unchanged lines hidden ---
62 char *tok;
63
64 if ((s = *stringp) == NULL)
65 return (NULL);
66 for (tok = s;;) {
67 c = *s++;
68 spanp = delim;
69 do {

--- 12 unchanged lines hidden ---