[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 08/10: [troff]: Rename parameter.
From: |
G. Branden Robinson |
Subject: |
[groff] 08/10: [troff]: Rename parameter. |
Date: |
Mon, 6 Sep 2021 15:01:25 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 9a5d9dc523701fc6b8fbd6a1719c4f6a6f2a99ad
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Sep 6 04:36:09 2021 +1000
[troff]: Rename parameter.
* src/roff/troff/input.cpp (token::usable_as_delimiter): Rename
parameter from `err` to `report_error` to be more communicative.
---
ChangeLog | 7 +++++++
src/roff/troff/input.cpp | 11 ++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1a5eedb..600599a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2021-09-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+ [troff]: Rename parameter.
+
+ * src/roff/troff/input.cpp (token::usable_as_delimiter): Rename
+ parameter from `err` to `report_error` to be more communicative.
+
+2021-09-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
[troff]: Boolify members of `token` class.
* src/roff/troff/token.h (class token): Demote return type of
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index ec8782f..43fdac9 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2324,7 +2324,7 @@ int token::operator!=(const token &t)
// is token a suitable delimiter (like ')?
-bool token::usable_as_delimiter(bool err)
+bool token::usable_as_delimiter(bool report_error)
{
switch(type) {
case TOKEN_CHAR:
@@ -2352,15 +2352,16 @@ bool token::usable_as_delimiter(bool err)
case '(':
case ')':
case '.':
- if (err)
- error("cannot use character '%1' as a starting delimiter", char(c));
+ if (report_error)
+ error("cannot use character '%1' as a starting delimiter",
+ char(c));
return false;
default:
return true;
}
case TOKEN_NODE:
// the user doesn't know what a node is
- if (err)
+ if (report_error)
error("missing argument or invalid starting delimiter");
return false;
case TOKEN_SPACE:
@@ -2369,7 +2370,7 @@ bool token::usable_as_delimiter(bool err)
case TOKEN_HORIZONTAL_SPACE:
case TOKEN_TAB:
case TOKEN_NEWLINE:
- if (err)
+ if (report_error)
error("cannot use %1 as a starting delimiter", description());
return false;
default:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 08/10: [troff]: Rename parameter.,
G. Branden Robinson <=