summaryrefslogtreecommitdiff
path: root/src/filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/filter.c b/src/filter.c
index 1ac199f..71f3635 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -176,7 +176,7 @@ clearerr(stdin);
if ((r = chain->filter_func (chain)) == -1)
flexfatal (_("filter_func failed"));
- exit (0);
+ FLEX_EXIT (0);
}
else {
execvp (chain->argv[0],
@@ -185,7 +185,7 @@ clearerr(stdin);
chain->argv[0]);
}
- exit (1);
+ FLEX_EXIT (1);
}
/* Parent */
@@ -296,7 +296,8 @@ int filter_tee_header (struct filter *chain)
fprintf (to_h, "\n");
/* write a fake line number. It will get fixed by the linedir filter. */
- fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
+ if (gen_line_dirs)
+ fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
fprintf (to_h, "#undef %sIN_HEADER\n", prefix);
fprintf (to_h, "#endif /* %sHEADER_H */\n", prefix);
@@ -323,7 +324,7 @@ int filter_tee_header (struct filter *chain)
while (wait (0) > 0) ;
- exit (0);
+ FLEX_EXIT (0);
return 0;
}
@@ -390,7 +391,7 @@ int filter_fix_linedirs (struct filter *chain)
/* Adjust the line directives. */
in_gen = true;
snprintf (buf, readsz, "#line %d \"%s\"\n",
- lineno + 1, filename);
+ lineno, filename);
}
else {
/* it's a #line directive for code we didn't write */