Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */
| 4421 | * such as during a yyrestart() or at EOF. |
| 4422 | */ |
| 4423 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 4424 | |
| 4425 | { |
| 4426 | int oerrno = errno; |
| 4427 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 4428 | |
| 4429 | yy_flush_buffer( b , yyscanner); |
| 4430 | |
| 4431 | b->yy_input_file = file; |
| 4432 | b->yy_fill_buffer = 1; |
| 4433 | |
| 4434 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 4435 | * called from yyrestart() or through yy_get_next_buffer. |
| 4436 | * In that case, we don't want to reset the lineno or column. |
| 4437 | */ |
| 4438 | if (b != YY_CURRENT_BUFFER){ |
| 4439 | b->yy_bs_lineno = 1; |
| 4440 | b->yy_bs_column = 0; |
| 4441 | } |
| 4442 | |
| 4443 | b->yy_is_interactive = 0; |
| 4444 | |
| 4445 | errno = oerrno; |
| 4446 | } |
| 4447 | |
| 4448 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 4449 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected