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. */
| 1576 | * such as during a yyrestart() or at EOF. |
| 1577 | */ |
| 1578 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
| 1579 | |
| 1580 | { |
| 1581 | int oerrno = errno; |
| 1582 | |
| 1583 | yy_flush_buffer( b ); |
| 1584 | |
| 1585 | b->yy_input_file = file; |
| 1586 | b->yy_fill_buffer = 1; |
| 1587 | |
| 1588 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 1589 | * called from yyrestart() or through yy_get_next_buffer. |
| 1590 | * In that case, we don't want to reset the lineno or column. |
| 1591 | */ |
| 1592 | if (b != YY_CURRENT_BUFFER){ |
| 1593 | b->yy_bs_lineno = 1; |
| 1594 | b->yy_bs_column = 0; |
| 1595 | } |
| 1596 | |
| 1597 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 1598 | |
| 1599 | errno = oerrno; |
| 1600 | } |
| 1601 | |
| 1602 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 1603 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected