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. */
| 1907 | * such as during a yyrestart() or at EOF. |
| 1908 | */ |
| 1909 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 1910 | |
| 1911 | { |
| 1912 | int oerrno = errno; |
| 1913 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1914 | |
| 1915 | yy_flush_buffer( b , yyscanner); |
| 1916 | |
| 1917 | b->yy_input_file = file; |
| 1918 | b->yy_fill_buffer = 1; |
| 1919 | |
| 1920 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 1921 | * called from yyrestart() or through yy_get_next_buffer. |
| 1922 | * In that case, we don't want to reset the lineno or column. |
| 1923 | */ |
| 1924 | if (b != YY_CURRENT_BUFFER){ |
| 1925 | b->yy_bs_lineno = 1; |
| 1926 | b->yy_bs_column = 0; |
| 1927 | } |
| 1928 | |
| 1929 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 1930 | |
| 1931 | errno = oerrno; |
| 1932 | } |
| 1933 | |
| 1934 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 1935 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected