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. */
| 3988 | * such as during a yyrestart() or at EOF. |
| 3989 | */ |
| 3990 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 3991 | |
| 3992 | { |
| 3993 | int oerrno = errno; |
| 3994 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3995 | |
| 3996 | yy_flush_buffer( b , yyscanner); |
| 3997 | |
| 3998 | b->yy_input_file = file; |
| 3999 | b->yy_fill_buffer = 1; |
| 4000 | |
| 4001 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 4002 | * called from yyrestart() or through yy_get_next_buffer. |
| 4003 | * In that case, we don't want to reset the lineno or column. |
| 4004 | */ |
| 4005 | if (b != YY_CURRENT_BUFFER){ |
| 4006 | b->yy_bs_lineno = 1; |
| 4007 | b->yy_bs_column = 0; |
| 4008 | } |
| 4009 | |
| 4010 | b->yy_is_interactive = 0; |
| 4011 | |
| 4012 | errno = oerrno; |
| 4013 | } |
| 4014 | |
| 4015 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 4016 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected