groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 05/14: [grog]: Revise diagnostic messages.


From: G. Branden Robinson
Subject: [groff] 05/14: [grog]: Revise diagnostic messages.
Date: Mon, 28 Jun 2021 00:44:49 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 28c0df29edca7f8c86e22b3cf96bbd45b989dc51
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jun 27 13:47:48 2021 +1000

    [grog]: Revise diagnostic messages.
    
    * src/utils/grog/grog.1.man (err): Rename from this...
    
      (warn): ...to this.  Prefix diagnostic with command name and
      diagnostic severity level.  The subroutine didn't change the exit
      status and was not used to report serious trouble, so "warning" seems
      appropriate.
    
      (make_groff_tmac_man_ms): Update call sites.  Modify diagnostic
      wording to stop calling macros "requests".
---
 ChangeLog              | 12 ++++++++++++
 src/utils/grog/grog.pl | 12 ++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b544f15..030e428 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2021-06-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       [grog]: Revise diagnostic messages.
+
+       * src/utils/grog/grog.1.man (err): Rename from this...
+       (warn): ...to this.  Prefix diagnostic with command name and
+       diagnostic severity level.  The subroutine didn't change the
+       exit status and was not used to report serious trouble, so
+       "warning" seems appropriate.
+       (make_groff_tmac_man_ms): Update call sites.  Modify diagnostic
+       wording to stop calling macros "requests".
+
+2021-06-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/utils/grog/grog.1.man (Limitations): Add subsection
        covering the problem grog has with soelim inference.  Undocument
        groff's -s option as one that can be inferred, because at
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index c430f70..9782234 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -164,9 +164,9 @@ my @filespec;
 my $tmac_ext = '';
 
 
-sub err {
+sub warn {
   my $text = shift;
-  print STDERR $text;
+  print STDERR "$Prog: warning: $text";
 }
 
 
@@ -952,8 +952,8 @@ sub make_groff_tmac_man_ms {
     push(@m, '-man');
 
     $tmac_ext = 'man' unless ( $tmac_ext );
-    &err('man requests found, but file name extension ' .
-        'was: ' . $tmac_ext) unless ( $tmac_ext eq 'man' );
+    &warn("man macro calls found, but file name extension was '"
+         . $tmac_ext . "'") unless ( $tmac_ext eq 'man' );
     $tmac_ext = 'man';
     return 1;  # true
   }
@@ -971,8 +971,8 @@ sub make_groff_tmac_man_ms {
     push(@m, '-ms');
 
     $tmac_ext = 'ms' unless ( $tmac_ext );
-    &err('ms requests found, but file name extension ' .
-        'was: ' . $tmac_ext) unless ( $tmac_ext eq 'ms' );
+    &warn("ms macro calls found, but file name extension was '"
+         . $tmac_ext . "'") unless ( $tmac_ext eq 'ms' );
     $tmac_ext = 'ms';
     return 1;  # true
   }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]