openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/build/lib/route/pktloc_grammar.c
YY_BUFFER_STATE pktloc__scan_buffer(char* base, yy_size_t size,
                                    yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR ||
        base[size - 1] != YY_END_OF_BUFFER_CHAR)
        /* They forgot to leave room for the EOB's. */
        return 0;

    b = (YY_BUFFER_STATE)pktloc_alloc(sizeof(struct yy_buffer_state),
                                      yyscanner);
    if (!b)
        YY_FATAL_ERROR("out of dynamic memory in pktloc__scan_buffer()");

    b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    pktloc__switch_to_buffer(b, yyscanner);

    return b;
}
/** Setup the input buffer state to scan directly from a user-specified
 * character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
Setup the input buffer state to scan directly from a user-specified
character buffer.
@param base the character buffer
@param size the size in bytes of the character buffer
@param yyscanner The scanner object.
@return the newly allocated buffer state object.
Setup the input buffer state to scan directly from a user - specified character buffer . @param base the character buffer @param size the size in bytes of the character buffer @param yyscanner The scanner object . @return the newly allocated buffer state object .
YY_BUFFER_STATE pktloc__scan_buffer(char* base, yy_size_t size,
                                    yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR ||
        base[size - 1] != YY_END_OF_BUFFER_CHAR)
        return 0;
    b = (YY_BUFFER_STATE)pktloc_alloc(sizeof(struct yy_buffer_state),
                                      yyscanner);
    if (!b)
        YY_FATAL_ERROR("out of dynamic memory in pktloc__scan_buffer()");
    b->yy_buf_size = size - 2; 
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;
    pktloc__switch_to_buffer(b, yyscanner);
    return b;
}
YY_BUFFER_STATE pktloc__scan_buffer ( char * base , yy_size_t size , yyscan_t yyscanner ) { YY_BUFFER_STATE b ; if ( size < 2 || base [ size - 2 ] != YY_END_OF_BUFFER_CHAR || base [ size - 1 ] != YY_END_OF_BUFFER_CHAR ) return 0 ; b = ( YY_BUFFER_STATE ) pktloc_alloc ( sizeof ( struct yy_buffer_state ) , yyscanner ) ; if ( ! b ) YY_FATAL_ERROR ( " " ) ; b -> yy_buf_size = size - 2 ; b -> yy_buf_pos = b -> yy_ch_buf = base ; b -> yy_is_our_buffer = 0 ; b -> yy_input_file = 0 ; b -> yy_n_chars = b -> yy_buf_size ; b -> yy_is_interactive = 0 ; b -> yy_at_bol = 1 ; b -> yy_fill_buffer = 0 ; b -> yy_buffer_status = YY_BUFFER_NEW ; pktloc__switch_to_buffer ( b , yyscanner ) ; return b ; }
Setup the input buffer state to scan directly from a user-specified
 character buffer.
Setup the input buffer state to scan directly from a user - specified character buffer .
/* They forgot to leave room for the EOB's. */ /* "- 2" to take care of EOB's */