From cf2f74c9e002752106809d46d3e8f0f8690769c0 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 20 Oct 2013 09:35:41 +0200 Subject: [PATCH] inpcom.c: '$' as end-of-line comment delimiter outside of .control section, '$ ' inside of .control section, # untabify --- src/frontend/inpcom.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index ff156a836..d2ca5061a 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -2050,13 +2050,13 @@ inp_casefix(char *string) static void inp_stripcomments_deck(struct line *c, bool cf) { - bool found_control = FALSE; + bool found_control = FALSE; for (; c; c = c->li_next) { /* exclude lines between .control and .endc from removing white spaces */ - if (ciprefix(".control", c->li_line)) - found_control = TRUE; - if (ciprefix(".endc", c->li_line)) - found_control = FALSE; + if (ciprefix(".control", c->li_line)) + found_control = TRUE; + if (ciprefix(".endc", c->li_line)) + found_control = FALSE; inp_stripcomments_line(c->li_line, found_control|cf); } } @@ -2097,12 +2097,12 @@ inp_stripcomments_line(char *s, bool cs) d++; if (*d == ';') { break; - } else if (!cs && (c == '$')) { /* outside of .control section */ + } else if (!cs && (c == '$')) { /* outside of .control section */ /* The character before '&' has to be ',' or ' ' or tab. A valid numerical expression directly before '$' is not yet supported. */ if ((d - 2 >= s) && ((d[-2] == ' ') || (d[-2] == ',') || (d[-2] == '\t'))) { d--; - break; + break; } } else if (cs && (c == '$') && (*d == ' ')) {/* inside of .control section or command file */ d--; /* move d back to first comment character */