1 // compatibility routines, non reentrant ....
\r
6 struct tm* localtime_r(const time_t* t, struct tm* r) {
\r
9 memcpy(r,temp,sizeof(struct tm));
\r
13 struct tm* gmtime_r(const time_t* t, struct tm* r) {
\r
16 memcpy(r,temp,sizeof(struct tm));
\r
20 char* ctime_r (const time_t* t, char* buf) {
\r
22 temp = asctime(localtime(t));
\r
29 Points to the string from which to extract tokens.
\r
32 Points to a null-terminated set of delimiter characters.
\r
35 Is a value-return parameter used by strtok_r() to record its progress through s1.
\r
39 char * strtok_r (char *s, const char *delim, char **save_ptr) {
\r
42 if (s == NULL) s = *save_ptr;
\r
44 /* Scan leading delimiters. */
\r
45 s += strspn(s, delim);
\r
52 /* Find the end of the token. */
\r
54 s = strpbrk (token, delim);
\r
56 /* This token finishes the string. */
\r
58 while (**save_ptr != '\0') (*save_ptr)++;
\r
61 /* Terminate the token and make *SAVE_PTR point past it. */
\r