/* Scan through whitespace in the current buffer (read more if required) */ STATICFNDEF char *scan_space(FILE *handle, char *buff, char *buffptr, char *buff_top) { char *fgets_rc; while (TRUE) { for (; (buffptr < buff_top) && (ISSPACE_ASCII(*buffptr)); buffptr++) ; if (buffptr < buff_top) return buffptr; /* first non-whitespace character */ if (NEWLINE == *(buffptr - 1)) return EOL_REACHED; /* current buffer is exhausted and we haven't seen a newline; read more */ FGETS_FILE(buff, MAX_READ_SZ, handle, fgets_rc); if (NULL == fgets_rc) break; buffptr = buff; buff_top = buffptr + STRLEN(buff); } return EOF_REACHED; }
/* Skip white space */ STATICFNDEF char *exttab_scan_space(char *c) { for ( ; ISSPACE_ASCII(*c); c++, ext_source_column++) ; return c; }