4 * Ullrich von Bassewitz, 11.12.1998
13 /*****************************************************************************/
15 /*****************************************************************************/
19 /* Memory location that holds the last input */
20 static char* Last = 0;
24 /*****************************************************************************/
26 /*****************************************************************************/
30 char* __fastcall__ strtok (register char* s1, const char* s2)
35 /* Use the stored location if called with a NULL pointer */
40 /* If s1 is empty, there are no more tokens. Return 0 in this case. */
45 /* Search the address of the first element in s1 that equals none
46 * of the characters in s2.
48 while ((c = *s1) && strchr (s2, c) != 0) {
52 /* No more tokens found */
57 /* Remember the start of the token */
60 /* Search for the end of the token */
61 while ((c = *s1) && strchr (s2, c) == 0) {
72 /* Return the start of the token */