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. */
| 3498 | * such as during a yyrestart() or at EOF. |
| 3499 | */ |
| 3500 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
| 3501 | |
| 3502 | { |
| 3503 | int oerrno = errno; |
| 3504 | |
| 3505 | yy_flush_buffer( b ); |
| 3506 | |
| 3507 | b->yy_input_file = file; |
| 3508 | b->yy_fill_buffer = 1; |
| 3509 | |
| 3510 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 3511 | * called from yyrestart() or through yy_get_next_buffer. |
| 3512 | * In that case, we don't want to reset the lineno or column. |
| 3513 | */ |
| 3514 | if (b != YY_CURRENT_BUFFER){ |
| 3515 | b->yy_bs_lineno = 1; |
| 3516 | b->yy_bs_column = 0; |
| 3517 | } |
| 3518 | |
| 3519 | b->yy_is_interactive = 0; |
| 3520 | |
| 3521 | errno = oerrno; |
| 3522 | } |
| 3523 | |
| 3524 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 3525 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected