libs/gen/src/msgDict.cxx
// btok(p, tok)                                          
// 
// p - pointer to buffer
// tok - delimiter
//
// Returns a null-terminated string that matches 
// all the characters from *p to tok (inclusive).
// Additionally the value of p is incremented to 
// the position of the first char after tok. 
btok(p, tok)
p - pointer to buffer
tok - delimiter

Returns a null-terminated string that matches
all the characters from *p to tok (inclusive).
Additionally the value of p is incremented to
the position of the first char after tok.
btok ( p tok ) p - pointer to buffer tok - delimiter Returns a null - terminated string that matches all the characters from * p to tok ( inclusive ) . Additionally the value of p is incremented to the position of the first char after tok .
static char *btok(char **p, char tok)
{
  char *s = NULL;
  char *head = *p;
  char *tail = OSapi_index(head, tok);
  if (tail) {
    int len = tail - head;
    s = new char[len + 1];
    OSapi_strncpy(s, head, len);
    s[len] = '\0';
    *p = tail + 1;
  }
  return s;  
}
static char * btok ( char * * p , char tok ) { char * s = NULL ; char * head = * p ; char * tail = OSapi_index ( head , tok ) ; if ( tail ) { int len = tail - head ; s = new char [ len + 1 ] ; OSapi_strncpy ( s , head , len ) ; s [ len ] = ' \0 ' ; * p = tail + 1 ; } return s ; }
btok(p, tok)
p - pointer to buffer
tok - delimiter
btok ( p tok ) p - pointer to buffer tok - delimiter