]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Set the mergelines flag only for preprocessor commands
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 16 Nov 2012 19:32:03 +0000 (20:32 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 16 Nov 2012 19:32:03 +0000 (20:32 +0100)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index b29b96b916db710ae559d652bf43461199443ce8..50461e67292c9b51a8a7be3c26c25e84f36f29cb 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -576,7 +576,7 @@ static bool ftepp_preprocess(ftepp_t *ftepp)
     bool newline = true;
 
     ftepp->lex->flags.preprocessing = true;
-    ftepp->lex->flags.mergelines    = true;
+    ftepp->lex->flags.mergelines    = false;
     ftepp->lex->flags.noops         = true;
 
     ftepp_next(ftepp);
@@ -595,6 +595,7 @@ static bool ftepp_preprocess(ftepp_t *ftepp)
                     ftepp_next(ftepp);
                     break;
                 }
+                ftepp->lex->flags.mergelines = true;
                 if (ftepp_next(ftepp) >= TOKEN_EOF) {
                     ftepp_error(ftepp, "error in preprocessor directive");
                     ftepp->token = TOKEN_ERROR;
@@ -602,6 +603,7 @@ static bool ftepp_preprocess(ftepp_t *ftepp)
                 }
                 if (!ftepp_hash(ftepp))
                     ftepp->token = TOKEN_ERROR;
+                ftepp->lex->flags.mergelines = false;
                 break;
             case TOKEN_EOL:
                 newline = true;