[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/19: [troff]: Disclose more context in error diag.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/19: [troff]: Disclose more context in error diag. |
Date: |
Sun, 22 Sep 2024 00:33:03 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 5d19e2753431ad3cfa4d6505c1e3f4a89005d92c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 17 11:47:36 2024 -0500
[troff]: Disclose more context in error diag.
* src/roff/troff/input.cpp (decode_string_args): Improve error
diagnostic to disclose more context.
---
ChangeLog | 5 +++++
src/roff/troff/input.cpp | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index dccb07ea4..275a6baa5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-09-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/input.cpp (decode_string_args): Improve
+ error diagnostic to disclose more context.
+
2024-09-21 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/input.cpp (close_stream): Handle being given a
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 00dc10ebb..f93cbe91c 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -4106,6 +4106,7 @@ static void decode_args(macro_iterator *mi)
}
}
+// XXX: This is a misnomer. It's used to read stuff like `\[e aa]` too.
static void decode_string_args(macro_iterator *mi)
{
node *n;
@@ -4114,7 +4115,7 @@ static void decode_string_args(macro_iterator *mi)
while (c == ' ')
c = get_copy(&n);
if (c == '\n' || c == EOF) {
- error("missing ']'");
+ error("missing ']' in parameterized escape sequence");
break;
}
if (c == ']')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/19: [troff]: Disclose more context in error diag.,
G. Branden Robinson <=