yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */
| 2387 | * That's why we explicitly handle the declaration, instead of using our macros. |
| 2388 | */ |
| 2389 | int yylex_init(yyscan_t* ptr_yy_globals) |
| 2390 | { |
| 2391 | if (ptr_yy_globals == NULL){ |
| 2392 | errno = EINVAL; |
| 2393 | return 1; |
| 2394 | } |
| 2395 | |
| 2396 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
| 2397 | |
| 2398 | if (*ptr_yy_globals == NULL){ |
| 2399 | errno = ENOMEM; |
| 2400 | return 1; |
| 2401 | } |
| 2402 | |
| 2403 | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
| 2404 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 2405 | |
| 2406 | return yy_init_globals ( *ptr_yy_globals ); |
| 2407 | } |
| 2408 | |
| 2409 | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
| 2410 | * convention of taking the scanner as the last argument. Note however, that |
nothing calls this directly
no test coverage detected
searching dependent graphs…