static cst_string ts_getc(cst_tokenstream *ts) { if (ts->fd) { ts->current_char = cst_fgetc(ts->fd); } else if (ts->string_buffer) { if (ts->string_buffer[ts->file_pos] == '\0') ts->current_char = TS_EOF; else ts->current_char = ts->string_buffer[ts->file_pos]; } if (ts->current_char != TS_EOF) ts->file_pos++; if (ts->current_char == '\n') ts->line_number++; return ts->current_char; }
static unsigned char ts_getc(cst_tokenstream *ts) { if (ts->fd) { #ifndef FLITE_PLUS_HTS_ENGINE ts->current_char = cst_fgetc(ts->fd); #endif /* !FLITE_PLUS_HTS_ENGINE */ } else if (ts->string_buffer) { if (ts->string_buffer[ts->file_pos] == '\0') ts->current_char = TS_EOF; else ts->current_char = ts->string_buffer[ts->file_pos]; } if (ts->current_char != TS_EOF) ts->file_pos++; if (ts->current_char == '\n') ts->line_number++; return ts->current_char; }