[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 07/15: [troff]: Tweak color-related warning diagnostics.
From: |
G. Branden Robinson |
Subject: |
[groff] 07/15: [troff]: Tweak color-related warning diagnostics. |
Date: |
Tue, 20 Jul 2021 18:13:13 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 5494170c4f715ef37e546ca186da1a68e8f609e3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jul 21 02:27:31 2021 +1000
[troff]: Tweak color-related warning diagnostics.
* src/roff/troff/input.cpp (define_color): Tweak warning diagnostics for
clarity. Only one value is expected when defining a color in the
`gray` color space. Quote recognized color space names when
complaining of an unknown one.
---
ChangeLog | 7 +++++++
src/roff/troff/input.cpp | 7 +++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dbc9b52..966f3d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2021-07-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * src/roff/troff/input.cpp (define_color): Tweak warning
+ diagnostics for clarity. Only one value is expected when
+ defining a color in the `gray` color space. Quote recognized
+ color space names when complaining of an unknown one.
+
+2021-07-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
[nroff]: Pass `-c` option to groff. While at present this does
little more than `-P-c` already achieves, that might not be true
forever. Further, there is a distinction between ignoring
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 13c4efa..4289d4f 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1360,7 +1360,7 @@ static color *read_gray(char end = 0)
{
symbol component = do_get_long_name(0, end);
if (component.is_null()) {
- warning(WARN_COLOR, "missing gray values");
+ warning(WARN_COLOR, "missing gray value");
return 0;
}
const char *s = component.contents();
@@ -1423,9 +1423,8 @@ static void define_color()
else if (strcmp(style.contents(), "cmy") == 0)
col = read_cmy();
else {
- warning(WARN_COLOR,
- "unknown color space '%1'; use rgb, cmyk, gray or cmy",
- style.contents());
+ warning(WARN_COLOR, "unknown color space '%1';"
+ " use 'rgb', 'cmyk', 'gray' or 'cmy'", style.contents());
skip_line();
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 07/15: [troff]: Tweak color-related warning diagnostics.,
G. Branden Robinson <=