summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-02-23 15:59:42 +0100
committerManoj Srivastava <srivasta@debian.org>2016-02-24 14:53:21 -0800
commit58213fd78e208381815502c0574d8d0c1c467f85 (patch)
tree265a609c653ded88d2f6fadfc248ccc254f24919 /src/main.c
parent86ca4f322bbec8f52a76c1bf2a879bf464d9bb65 (diff)
Emit no #line directives if gen_line_dirs is false, resolves igh#55.
There are two instances in the code which will print a #line directive to the resulting lexer, regardless of the value of gen_line_dirs. Fix them, so they also respect gen_line_dirs. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Manoj Srivastava <srivasta@debian.org> # Conflicts: # src/buf.c
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 8710702..336e25c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -474,7 +474,8 @@ void check_options ()
m4defs_buf.nelts = 0; /* memory leak here. */
/* Place a bogus line directive, it will be fixed in the filter. */
- outn("#line 0 \"M4_YY_OUTFILE_NAME\"\n");
+ if (gen_line_dirs)
+ outn("#line 0 \"M4_YY_OUTFILE_NAME\"\n");
/* Dump the user defined preproc directives. */
if (userdef_buf.elts)