gbranden pushed a commit to branch master
in repository groff.
commit a1949cae93dbbb0d68e7e13db363ef9ef767276c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Oct 7 12:23:43 2025 -0500
[pic]: Invert sense of global Boolean.
Rename global Boolean from `want_safer_mode` to `want_unsafe_mode`.
Invert assignments and tests.
* src/preproc/pic/pic.h:
* src/preproc/pic/main.cpp:
* src/preproc/pic/pic.ypp: Do it.
---
ChangeLog | 11 +++++++++++
src/preproc/pic/main.cpp | 6 +++---
src/preproc/pic/pic.h | 2 +-
src/preproc/pic/pic.ypp | 2 +-
4 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 873c7bb3b..365b7e5ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-10-07 G. Branden Robinson <[email protected]>
+
+ [pic]: Invert sense of global Boolean.
+
+ Rename global Boolean from `want_safer_mode` to
+ `want_unsafe_mode`. Invert assignments and tests.
+
+ * src/preproc/pic/pic.h:
+ * src/preproc/pic/main.cpp:
+ * src/preproc/pic/pic.ypp: Do it.
+
2025-10-07 G. Branden Robinson <[email protected]>
[pic]: Boolify global variable.
diff --git a/src/preproc/pic/main.cpp b/src/preproc/pic/main.cpp
index c539b0154..add3f18f2 100644
--- a/src/preproc/pic/main.cpp
+++ b/src/preproc/pic/main.cpp
@@ -46,7 +46,7 @@ int zero_length_line_flag = 0;
// Non-zero means we're using a groff driver.
int driver_extension_flag = 1;
int compatible_flag = 0;
-bool want_safer_mode = true;
+bool want_unsafe_mode = false;
int command_char = '.'; // the character that introduces lines
// that should be passed through transparently
static int lf_flag = 1; // non-zero if we should attempt to
understand
@@ -569,10 +569,10 @@ int main(int argc, char **argv)
case 'T':
break;
case 'S':
- want_safer_mode = true;
+ want_unsafe_mode = false;
break;
case 'U':
- want_safer_mode = false;
+ want_unsafe_mode = true;
break;
case 'f':
#ifdef FIG_SUPPORT
diff --git a/src/preproc/pic/pic.h b/src/preproc/pic/pic.h
index d69a4e55b..f7325ddb3 100644
--- a/src/preproc/pic/pic.h
+++ b/src/preproc/pic/pic.h
@@ -89,7 +89,7 @@ extern int command_char;
extern int zero_length_line_flag;
extern int driver_extension_flag;
extern int compatible_flag;
-extern bool want_safer_mode;
+extern bool want_unsafe_mode;
extern char *graphname;
// Local Variables:
diff --git a/src/preproc/pic/pic.ypp b/src/preproc/pic/pic.ypp
index 62b9d5dcc..fdd0d197f 100644
--- a/src/preproc/pic/pic.ypp
+++ b/src/preproc/pic/pic.ypp
@@ -399,7 +399,7 @@ placeless_element:
DELIMITED
{
delim_flag = 0;
- if (want_safer_mode)
+ if (!want_unsafe_mode)
lex_error("unsafe to run command '%1'; ignoring",
$3);
else {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit