| 39 |
|
#undef YY_INPUT |
| 40 |
|
#define YY_FATAL_ERROR(msg) conf_yy_fatal_error(msg) |
| 41 |
|
#define YY_INPUT(buf,result,max_size) \ |
| 42 |
< |
if (!(result = conf_fbgets(buf, max_size, conf_parser_ctx.conf_file))) \ |
| 42 |
> |
if (!(result = conf_yy_input(buf, max_size))) \ |
| 43 |
|
YY_FATAL_ERROR("input in flex scanner failed"); |
| 44 |
|
#define MAX_INCLUDE_DEPTH 10 |
| 45 |
|
|
| 56 |
|
static void ccomment(void); |
| 57 |
|
static void cinclude(void); |
| 58 |
|
static int ieof(void); |
| 59 |
+ |
|
| 60 |
+ |
static int |
| 61 |
+ |
conf_yy_input(char *lbuf, unsigned int max_size) |
| 62 |
+ |
{ |
| 63 |
+ |
return !fgets(lbuf, max_size, conf_parser_ctx.conf_file) ? 0 : strlen(lbuf); |
| 64 |
+ |
} |
| 65 |
+ |
|
| 66 |
+ |
static int |
| 67 |
+ |
conf_yy_fatal_error(const char *msg) |
| 68 |
+ |
{ |
| 69 |
+ |
return 0; |
| 70 |
+ |
} |
| 71 |
+ |
|
| 72 |
|
%} |
| 73 |
|
|
| 74 |
|
WS [[:blank:]]* |
| 81 |
|
{include} { cinclude(); } |
| 82 |
|
"/*" { ccomment(); } |
| 83 |
|
|
| 84 |
< |
\n.* { strcpy(linebuf, yytext+1); ++lineno; yyless(1); } |
| 84 |
> |
\n.* { strlcpy(linebuf, yytext+1, sizeof(linebuf)); ++lineno; yyless(1); } |
| 85 |
|
|
| 86 |
|
{WS} ; |
| 87 |
|
{COMMENT} ; |