diff options
Diffstat (limited to 'cppsetup.c')
-rw-r--r-- | cppsetup.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -114,19 +114,20 @@ int cppsetup(const char *filename, const char *line, struct filepointer *filep, struct inclist *inc) { - IfParser ip; - struct _parse_data pd; + struct _parse_data pd = { + .filep = filep, + .inc = inc, + .line = line, + .filename = filename + }; + IfParser ip = { + .funcs.handle_error = my_if_errors, + .funcs.eval_defined = my_eval_defined, + .funcs.eval_variable = my_eval_variable, + .data = &pd + }; long val = 0; - pd.filep = filep; - pd.inc = inc; - pd.line = line; - pd.filename = filename; - ip.funcs.handle_error = my_if_errors; - ip.funcs.eval_defined = my_eval_defined; - ip.funcs.eval_variable = my_eval_variable; - ip.data = &pd; - (void) ParseIfExpression(&ip, line, &val); if (val) return IF; |