MCPcopy Create free account
hub / github.com/MapServer/MapServer / msyy_init_buffer

Function msyy_init_buffer

maplexer.c:4766–4788  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

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.

Callers 2

msyyrestartFunction · 0.85
msyy_create_bufferFunction · 0.85

Calls 1

msyy_flush_bufferFunction · 0.85

Tested by

no test coverage detected