MCPcopy Create free account
hub / github.com/amule-project/amule / yy_flush_buffer

Function yy_flush_buffer

src/Scanner.cpp:1606–1627  ·  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

1604 *
1605 */
1606 void yy_flush_buffer (YY_BUFFER_STATE b )
1607{
1608 if ( ! b )
1609 return;
1610
1611 b->yy_n_chars = 0;
1612
1613 /* We always need two end-of-buffer characters. The first causes
1614 * a transition to the end-of-buffer state. The second causes
1615 * a jam in that state.
1616 */
1617 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1618 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1619
1620 b->yy_buf_pos = &b->yy_ch_buf[0];
1621
1622 b->yy_at_bol = 1;
1623 b->yy_buffer_status = YY_BUFFER_NEW;
1624
1625 if ( b == YY_CURRENT_BUFFER )
1626 yy_load_buffer_state( );
1627}
1628
1629/** Pushes the new state onto the stack. The new state becomes
1630 * the current state. This function will allocate the stack

Callers 1

yy_init_bufferFunction · 0.70

Calls 1

yy_load_buffer_stateFunction · 0.70

Tested by

no test coverage detected