MCPcopy Create free account
hub / github.com/Entware/Entware / yy_init_buffer

Function yy_init_buffer

scripts/config/lexer.lex.c:3500–3522  ·  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 yyrestart() or at EOF. */

Source from the content-addressed store, hash-verified

3498 * such as during a yyrestart() or at EOF.
3499 */
3500 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3501
3502{
3503 int oerrno = errno;
3504
3505 yy_flush_buffer( b );
3506
3507 b->yy_input_file = file;
3508 b->yy_fill_buffer = 1;
3509
3510 /* If b is the current buffer, then yy_init_buffer was _probably_
3511 * called from yyrestart() or through yy_get_next_buffer.
3512 * In that case, we don't want to reset the lineno or column.
3513 */
3514 if (b != YY_CURRENT_BUFFER){
3515 b->yy_bs_lineno = 1;
3516 b->yy_bs_column = 0;
3517 }
3518
3519 b->yy_is_interactive = 0;
3520
3521 errno = oerrno;
3522}
3523
3524/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3525 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.

Callers 2

yyrestartFunction · 0.85
yy_create_bufferFunction · 0.85

Calls 1

yy_flush_bufferFunction · 0.85

Tested by

no test coverage detected