Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a msyyrestart() or at EOF. */
| 4764 | * such as during a msyyrestart() or at EOF. |
| 4765 | */ |
| 4766 | static void msyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
| 4767 | |
| 4768 | { |
| 4769 | int oerrno = errno; |
| 4770 | |
| 4771 | msyy_flush_buffer(b ); |
| 4772 | |
| 4773 | b->yy_input_file = file; |
| 4774 | b->yy_fill_buffer = 1; |
| 4775 | |
| 4776 | /* If b is the current buffer, then msyy_init_buffer was _probably_ |
| 4777 | * called from msyyrestart() or through yy_get_next_buffer. |
| 4778 | * In that case, we don't want to reset the lineno or column. |
| 4779 | */ |
| 4780 | if (b != YY_CURRENT_BUFFER){ |
| 4781 | b->yy_bs_lineno = 1; |
| 4782 | b->yy_bs_column = 0; |
| 4783 | } |
| 4784 | |
| 4785 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 4786 | |
| 4787 | errno = oerrno; |
| 4788 | } |
| 4789 | |
| 4790 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 4791 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
no test coverage detected