MCPcopy Index your code
hub / github.com/MapServer/MapServer / msyypush_buffer_state

Function msyypush_buffer_state

maplexer.c:4823–4847  ·  view source on GitHub ↗

Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */

Source from the content-addressed store, hash-verified

4821 *
4822 */
4823void msyypush_buffer_state (YY_BUFFER_STATE new_buffer )
4824{
4825 if (new_buffer == NULL)
4826 return;
4827
4828 msyyensure_buffer_stack();
4829
4830 /* This block is copied from msyy_switch_to_buffer. */
4831 if ( YY_CURRENT_BUFFER )
4832 {
4833 /* Flush out information for old buffer. */
4834 *(yy_c_buf_p) = (yy_hold_char);
4835 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
4836 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4837 }
4838
4839 /* Only push if top exists. Otherwise, replace top. */
4840 if (YY_CURRENT_BUFFER)
4841 (yy_buffer_stack_top)++;
4842 YY_CURRENT_BUFFER_LVALUE = new_buffer;
4843
4844 /* copied from msyy_switch_to_buffer. */
4845 msyy_load_buffer_state( );
4846 (yy_did_buffer_switch_on_eof) = 1;
4847}
4848
4849/** Removes and deletes the top of the stack, if present.
4850 * The next element becomes the new top.

Callers

nothing calls this directly

Calls 2

msyyensure_buffer_stackFunction · 0.85
msyy_load_buffer_stateFunction · 0.85

Tested by

no test coverage detected