[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 36/41: [refer]: Fix Savannah #62142.
From: |
G. Branden Robinson |
Subject: |
[groff] 36/41: [refer]: Fix Savannah #62142. |
Date: |
Sat, 5 Mar 2022 16:06:22 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 17b33b075c9486c3cad4725210b396964c4d141c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Mar 6 03:59:02 2022 +1100
[refer]: Fix Savannah #62142.
Report correct line number in bibliography file diagnostics.
* src/preproc/refer/refer.cpp (do_bib): Set line number to 1 upon
successfully opening a bibliography file.
Problem appears to date back to groff 1.02 (June 1991) at the latest.
Fixes <https://savannah.gnu.org/bugs/?62142>.
Also update editor aid comments; drop old-style Emacs file-local
variable setting.
---
ChangeLog | 13 +++++++++++++
src/preproc/refer/refer.cpp | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 0c00df93..7253fb07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-03-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [refer]: Report correct line number in bibliography file
+ diagnostics.
+
+ * src/preproc/refer/refer.cpp (do_bib): Set line number to 1
+ upon successfully opening a bibliography file.
+
+ Problem appears to date back to groff 1.02 (June 1991) at the
+ latest.
+
+ Fixes <https://savannah.gnu.org/bugs/?62142>.
+
2022-03-06 G. Branden Robinson <g.branden.robinson@gmail.com>
[refer]: Regression-test Savannah #62124.
diff --git a/src/preproc/refer/refer.cpp b/src/preproc/refer/refer.cpp
index 3fb2175f..e93064f7 100644
--- a/src/preproc/refer/refer.cpp
+++ b/src/preproc/refer/refer.cpp
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -1115,6 +1114,7 @@ void do_bib(const char *filename)
}
current_filename = filename;
}
+ current_lineno = 1;
enum {
START, MIDDLE, BODY, BODY_START, BODY_BLANK, BODY_DOT
} state = START;
@@ -1243,3 +1243,8 @@ int next_size(int n)
return *p;
}
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 36/41: [refer]: Fix Savannah #62142.,
G. Branden Robinson <=