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. */
| 1966 | * such as during a yyrestart() or at EOF. |
| 1967 | */ |
| 1968 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 1969 | |
| 1970 | { |
| 1971 | int oerrno = errno; |
| 1972 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1973 | |
| 1974 | yy_flush_buffer( b , yyscanner); |
| 1975 | |
| 1976 | b->yy_input_file = file; |
| 1977 | b->yy_fill_buffer = 1; |
| 1978 | |
| 1979 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 1980 | * called from yyrestart() or through yy_get_next_buffer. |
| 1981 | * In that case, we don't want to reset the lineno or column. |
| 1982 | */ |
| 1983 | if (b != YY_CURRENT_BUFFER){ |
| 1984 | b->yy_bs_lineno = 1; |
| 1985 | b->yy_bs_column = 0; |
| 1986 | } |
| 1987 | |
| 1988 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 1989 | |
| 1990 | errno = oerrno; |
| 1991 | } |
| 1992 | |
| 1993 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 1994 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected
searching dependent graphs…