summaryrefslogtreecommitdiff
path: root/src/string/strtok_s.c
blob: ef2c00759f178df1fb8349d5ec5f08d3589a0204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#if 0

#include <string.h>

char * strtok_s(char * restrict s1, rsize_t * restrict s1max, const char * restrict s2, char **restrict ptr)
{
	__C_EXT(1, 201112L);
  int i = 0;

  if (s == NULL)
    s = *lasts;

  while (i < strlen (s)) {
    if (strchr (sep, s[i]) == NULL) {
      i++;
    } else {
      s[i] = '\0';
      *lasts = &(s[i+1]);
      return s;
    }
  }
  return NULL;
}

/*
CEXT1(201112)
*/


#endif