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

Function yy_switch_to_buffer

scripts/config/lexer.lex.c:3408–3437  ·  view source on GitHub ↗

Switch to a different input buffer. * @param new_buffer The new input buffer. * */

Source from the content-addressed store, hash-verified

3406 *
3407 */
3408 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3409{
3410
3411 /* TODO. We should be able to replace this entire function body
3412 * with
3413 * yypop_buffer_state();
3414 * yypush_buffer_state(new_buffer);
3415 */
3416 yyensure_buffer_stack ();
3417 if ( YY_CURRENT_BUFFER == new_buffer )
3418 return;
3419
3420 if ( YY_CURRENT_BUFFER )
3421 {
3422 /* Flush out information for old buffer. */
3423 *(yy_c_buf_p) = (yy_hold_char);
3424 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3425 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3426 }
3427
3428 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3429 yy_load_buffer_state( );
3430
3431 /* We don't actually know whether we did this switch during
3432 * EOF (yywrap()) processing, but the only time this flag
3433 * is looked at is after yywrap() is called, so it's safe
3434 * to go ahead and always set it.
3435 */
3436 (yy_did_buffer_switch_on_eof) = 1;
3437}
3438
3439static void yy_load_buffer_state (void)
3440{

Callers 3

yy_scan_bufferFunction · 0.85
__zconf_nextfileFunction · 0.85
zconf_endfileFunction · 0.85

Calls 2

yyensure_buffer_stackFunction · 0.85
yy_load_buffer_stateFunction · 0.85

Tested by

no test coverage detected