[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 12/18: [tbl]: Tweak diagnostic messages.
From: |
G. Branden Robinson |
Subject: |
[groff] 12/18: [tbl]: Tweak diagnostic messages. |
Date: |
Sun, 5 Jan 2025 05:22:15 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit f32dd00fe9bb74eedd9fb8f5c531624bef1370da
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Jan 2 07:14:07 2025 -0600
[tbl]: Tweak diagnostic messages.
* src/preproc/tbl/main.cpp (process_input_file, process_format)
(process_data, process_table, main): Adjust wording of diagnostic
messages for clarity and consistency with documented terminology.
See <https://savannah.gnu.org/bugs/?66519>.
---
ChangeLog | 9 +++++++++
src/preproc/tbl/main.cpp | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 96a26b0b7..78afbb202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-01-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/preproc/tbl/main.cpp (process_input_file, process_format)
+ (process_data, process_table, main): Adjust wording of
+ diagnostic messages for clarity and consistency with documented
+ terminology.
+
+ See <https://savannah.gnu.org/bugs/?66519>.
+
2025-01-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/preproc/tbl/main.cpp (main): Distinguish `ferror()` status
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index 4b1dbe961..1c648986d 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -249,7 +249,7 @@ void process_input_file(FILE *fp)
putchar('S');
while (c != '\n') {
if (c == EOF) {
- error("end of file at beginning of table");
+ error("end of input encountered at beginning of table");
return;
}
putchar(c);
@@ -1271,7 +1271,7 @@ format *process_format(table_input &in, options *opt,
if (!tem->width.empty()) {
// use the last width
if (!f->width[col].empty() && f->width[col] != tem->width)
- error("multiple widths for column %1", col + 1);
+ error("multiple widths designated for column %1", col + 1);
f->width[col] = tem->width;
}
if (tem->vrule_count)
@@ -1498,7 +1498,7 @@ table *process_data(table_input &in, format *f, options
*opt)
}
}
if (c == EOF) {
- error("end of data in middle of text block");
+ error("end of input in middle of text block");
give_up = true;
break;
}
@@ -1587,7 +1587,7 @@ table *process_data(table_input &in, format *f, options
*opt)
break;
}
if (!give_up && current_row == 0) {
- error("no real data");
+ error("no data in table");
give_up = true;
}
if (give_up) {
@@ -1631,7 +1631,7 @@ void process_table(table_input &in)
delete opt;
delete fmt;
if (!in.ended())
- error("premature end of file");
+ error("unexpected end of input");
}
static void usage(FILE *stream)
@@ -1708,7 +1708,7 @@ int main(int argc, char **argv)
FILE *fp = fopen(argv[i], "r");
if (fp == 0) {
current_filename = 0 /* nullptr */;
- fatal("can't open '%1': %2", argv[i], strerror(errno));
+ fatal("cannot open '%1': %2", argv[i], strerror(errno));
}
else {
current_lineno = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 12/18: [tbl]: Tweak diagnostic messages.,
G. Branden Robinson <=