Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a cmListFileLexer_yyrestart() or at EOF. */
| 1783 | * such as during a cmListFileLexer_yyrestart() or at EOF. |
| 1784 | */ |
| 1785 | static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 1786 | |
| 1787 | { |
| 1788 | int oerrno = errno; |
| 1789 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1790 | |
| 1791 | cmListFileLexer_yy_flush_buffer(b ,yyscanner); |
| 1792 | |
| 1793 | b->yy_input_file = file; |
| 1794 | b->yy_fill_buffer = 1; |
| 1795 | |
| 1796 | /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_ |
| 1797 | * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer. |
| 1798 | * In that case, we don't want to reset the lineno or column. |
| 1799 | */ |
| 1800 | if (b != YY_CURRENT_BUFFER){ |
| 1801 | b->yy_bs_lineno = 1; |
| 1802 | b->yy_bs_column = 0; |
| 1803 | } |
| 1804 | |
| 1805 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 1806 | |
| 1807 | errno = oerrno; |
| 1808 | } |
| 1809 | |
| 1810 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 1811 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected