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
int pktloc_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,
                          yyscan_t* ptr_yy_globals)

{
    struct yyguts_t dummy_yyguts;

    pktloc_set_extra(yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
    {
        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals =
        (yyscan_t)pktloc_alloc(sizeof(struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
    {
        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t));

    pktloc_set_extra(yy_user_defined, *ptr_yy_globals);

    return yy_init_globals(*ptr_yy_globals);
}
/* pktloc_lex_init_extra has the same functionality as pktloc_lex_init, but
 * follows the convention of taking the scanner as the last argument. Note
 * however, that this is a *pointer* to a scanner, as it will be allocated by
 * this call (and is the reason, too, why this function also must handle its own
 * declaration). The user defined value in the first argument will be available
 * to pktloc_alloc in the yyextra field.
 */
pktloc_lex_init_extra has the same functionality as pktloc_lex_init, but
follows the convention of taking the scanner as the last argument. Note
however, that this is a *pointer* to a scanner, as it will be allocated by
this call (and is the reason, too, why this function also must handle its own
declaration). The user defined value in the first argument will be available
to pktloc_alloc in the yyextra field.
pktloc_lex_init_extra has the same functionality as pktloc_lex_init but follows the convention of taking the scanner as the last argument . Note however that this is a * pointer * to a scanner as it will be allocated by this call ( and is the reason too why this function also must handle its own declaration ) . The user defined value in the first argument will be available to pktloc_alloc in the yyextra field .
int pktloc_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,
                          yyscan_t* ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;
    pktloc_set_extra(yy_user_defined, &dummy_yyguts);
    if (ptr_yy_globals == NULL)
    {
        errno = EINVAL;
        return 1;
    }
    *ptr_yy_globals =
        (yyscan_t)pktloc_alloc(sizeof(struct yyguts_t), &dummy_yyguts);
    if (*ptr_yy_globals == NULL)
    {
        errno = ENOMEM;
        return 1;
    }
    memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t));
    pktloc_set_extra(yy_user_defined, *ptr_yy_globals);
    return yy_init_globals(*ptr_yy_globals);
}
int pktloc_lex_init_extra ( YY_EXTRA_TYPE yy_user_defined , yyscan_t * ptr_yy_globals ) { struct yyguts_t dummy_yyguts ; pktloc_set_extra ( yy_user_defined , & dummy_yyguts ) ; if ( ptr_yy_globals == NULL ) { errno = EINVAL ; return 1 ; } * ptr_yy_globals = ( yyscan_t ) pktloc_alloc ( sizeof ( struct yyguts_t ) , & dummy_yyguts ) ; if ( * ptr_yy_globals == NULL ) { errno = ENOMEM ; return 1 ; } memset ( * ptr_yy_globals , 0x00 , sizeof ( struct yyguts_t ) ) ; pktloc_set_extra ( yy_user_defined , * ptr_yy_globals ) ; return yy_init_globals ( * ptr_yy_globals ) ; }
pktloc_lex_init_extra has the same functionality as pktloc_lex_init, but
 follows the convention of taking the scanner as the last argument.
pktloc_lex_init_extra has the same functionality as pktloc_lex_init but follows the convention of taking the scanner as the last argument .
/* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */