[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62191] [tbl] use of line continuation throws off input line counte
From: |
G. Branden Robinson |
Subject: |
[bug #62191] [tbl] use of line continuation throws off input line counter |
Date: |
Thu, 17 Mar 2022 21:54:46 -0400 (EDT) |
Follow-up Comment #1, bug #62191 (project groff):
The fix is a one-liner, except for the need to add braces.
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index d6f8a9878..f969a0277 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -120,8 +120,10 @@ int table_input::get()
// handle line continuation and uninterpreted leader character
if ((c = getc(fp)) == '\\') {
c = getc(fp);
- if (c == '\n')
- c = getc(fp); // perhaps state ought to be START now
+ if (c == '\n') {
+ current_lineno++;
+ c = getc(fp);
+ }
else if (c == 'a' && compatible_flag) {
state = LEADER_1;
return '\\';
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62191>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/