[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 04/31: [devices]: Say device name when 'DESC' not found.
From: |
G. Branden Robinson |
Subject: |
[groff] 04/31: [devices]: Say device name when 'DESC' not found. |
Date: |
Sun, 30 May 2021 11:12:28 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 5a721a3012a090a757af3601acf4faeba3bd7a38
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu May 27 16:03:57 2021 +1000
[devices]: Say device name when 'DESC' not found.
* src/libs/libdriver/inout.cpp (do_file): Make fatal diagnostic when the
device description file "DESC" can't be found more informative by
including the name of the device for which the input was prepared.
Here's how groff 1.22.4 handles the command input "printf 'x T\n'".
grotty:<standard input>:1: missing argument
grotty:<standard input>:1: can't find 'DESC' file
grotty:<standard input>:1: fatal error: couldn't load DESC file, can't
continue
And now:
grotty:<standard input>:1: error: missing argument
grotty:<standard input>:1: error: can't find 'DESC' file
grotty:<standard input>:1: fatal error: cannot load description of ''
device
It's unfortunate to have so many diagnostics from one problem, but doing
something about that is a longer pole.
---
ChangeLog | 8 ++++++++
src/libs/libdriver/input.cpp | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 6c58dd4..9ab5681 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-05-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * src/libs/libdriver/inout.cpp (do_file): Make fatal diagnostic
+ from output driver when the device description file "DESC" can't
+ be found more informative by including the name of the device
+ for which the input was prepared. Also makes malformed input of
+ intermediate format more obvious.
+
+2021-05-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* src/preproc/tbl/tbl.1.man (Miscellaneous): Add paragraph
cautioning users against making tbl(1) tables conditional
document content.
diff --git a/src/libs/libdriver/input.cpp b/src/libs/libdriver/input.cpp
index 15f0ef1..09f50eb 100644
--- a/src/libs/libdriver/input.cpp
+++ b/src/libs/libdriver/input.cpp
@@ -1602,7 +1602,7 @@ do_file(const char *filename)
if (pr == 0) { // note: 'pr' initialized after prologue
device = tmp_dev;
if (!font::load_desc())
- fatal("couldn't load DESC file, can't continue");
+ fatal("cannot load description of '%1' device", tmp_dev);
}
else {
if (device == 0 || strcmp(device, tmp_dev) != 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 04/31: [devices]: Say device name when 'DESC' not found.,
G. Branden Robinson <=