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

Function yy_flush_buffer

scripts/config/lexer.lex.c:3528–3549  ·  view source on GitHub ↗

Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */

Source from the content-addressed store, hash-verified

3526 *
3527 */
3528 void yy_flush_buffer (YY_BUFFER_STATE b )
3529{
3530 if ( ! b )
3531 return;
3532
3533 b->yy_n_chars = 0;
3534
3535 /* We always need two end-of-buffer characters. The first causes
3536 * a transition to the end-of-buffer state. The second causes
3537 * a jam in that state.
3538 */
3539 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3540 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3541
3542 b->yy_buf_pos = &b->yy_ch_buf[0];
3543
3544 b->yy_at_bol = 1;
3545 b->yy_buffer_status = YY_BUFFER_NEW;
3546
3547 if ( b == YY_CURRENT_BUFFER )
3548 yy_load_buffer_state( );
3549}
3550
3551/** Pushes the new state onto the stack. The new state becomes
3552 * the current state. This function will allocate the stack

Callers 1

yy_init_bufferFunction · 0.85

Calls 1

yy_load_buffer_stateFunction · 0.85

Tested by

no test coverage detected