gbranden pushed a commit to branch master
in repository groff.

commit 6ca44b29d5dc0e8b498b87ecc2d48077a94e1deb
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Sep 2 21:02:46 2024 -0500

    [troff]: Recast some error diagnostics.
    
    * src/roff/troff/input.cpp (pipe_source, open_request, opena_request)
      (hyphenation_patterns_file_code, pipe_output, system_request): Migrate
      wording of error diagnostics to describe, rather than name, the
      request at issue, because requests can be aliased and moreover the
      original names can then be removed.  This change might also help GNU
      troff be more self-documenting, though many requests remain a bit
      esoteric.
---
 ChangeLog                | 10 ++++++++++
 src/roff/troff/input.cpp | 16 +++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f142f819..c5d0ba9df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-09-02  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (pipe_source, open_request)
+       (opena_request, hyphenation_patterns_file_code, pipe_output)
+       (system_request): Migrate wording of error diagnostics to
+       describe, rather than name, the request at issue, because
+       requests can be aliased and moreover the original names can then
+       be removed.  This change might also help GNU troff be more
+       self-documenting, though many requests remain a bit esoteric.
+
 2024-09-02  G. Branden Robinson <[email protected]>
 
        [troff]: Update input token pointer appropriately when certain
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 7fed785b9..c371ce34c 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6468,7 +6468,7 @@ void source_quietly()
 void pipe_source()
 {
   if (!want_unsafe_requests) {
-    error("'pso' request is not allowed in safer mode");
+    error("piped command source request is not allowed in safer mode");
     skip_line();
   }
   else {
@@ -7227,7 +7227,7 @@ static void do_open(bool append)
 static void open_request()
 {
   if (!want_unsafe_requests) {
-    error("'open' request is not allowed in safer mode");
+    error("file opening request is not allowed in safer mode");
     skip_line();
   }
   else
@@ -7237,7 +7237,7 @@ static void open_request()
 static void opena_request()
 {
   if (!want_unsafe_requests) {
-    error("'opena' request is not allowed in safer mode");
+    error("file appending request is not allowed in safer mode");
     skip_line();
   }
   else
@@ -7630,8 +7630,8 @@ static void report_hyphenation_codes()
 
 void hyphenation_patterns_file_code()
 {
-  error("'hpfcode' request will be withdrawn in a future groff release;"
-        " migrate to 'hcode'");
+  error("hyphenation pattern file code assignment request will be"
+       " withdrawn in a future groff release; migrate to 'hcode'");
   tok.skip();
   while (!tok.is_newline() && !tok.is_eof()) {
     int n1, n2;
@@ -8178,7 +8178,8 @@ void pipe_output()
     return;
   }
   if (!want_unsafe_requests) {
-    error("'pi' request is not allowed in safer mode");
+    error("device-independent output piping request is not allowed in"
+         " safer mode");
     skip_line();
   }
   else {
@@ -8222,7 +8223,8 @@ void system_request()
     return;
   }
   if (!want_unsafe_requests) {
-    error("'sy' request is not allowed in safer mode");
+    error("system command execution request is not allowed in safer"
+         " mode");
     skip_line();
   }
   else {

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to