All pastes #613956 Raw Edit

Something

public text v1 · immutable
·published 2007-07-11 07:56 UTC
rendered paste body
char *
GPS::NMEATok(char **buf) {
  char  *nextTok;
  
  nextTok = *buf;
  
  if (**buf == ',') {
    nextTok--;
    *nextTok = ' ';
  } else if (!**buf) {
    return (NULL);
  } else {
    while (**buf != ',') {
      if (!**buf) 
        return(nextTok);
      (*buf)++;
    }
  }
  
  **buf= 0;
  (*buf)++;
  
  return (nextTok);
}