groff-commit
[Top][All Lists]
Advanced

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

[groff] 74/115: [eqn]: Recast generated diagnostics.


From: G. Branden Robinson
Subject: [groff] 74/115: [eqn]: Recast generated diagnostics.
Date: Thu, 1 Jun 2023 10:46:12 -0400 (EDT)

gbranden pushed a commit to branch branden-2022-06-01
in repository groff.

commit 2291ba97ef13f88dc9114cc13f9484814b20c9c6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Apr 7 19:30:43 2023 -0500

    [eqn]: Recast generated diagnostics.
    
    * src/preproc/eqn/main.cpp (main): Prefix generated *roff diagnostics
      with name of input file (the document).  Use `tmc`/`tm1` to coalesce
      multi-line diagnostic onto one line of output to stderr.  Tighten
      wording.  Continues the long process of fixing Savannah #52463.
    
    Also reflow long source lines.
---
 ChangeLog                |  8 ++++++++
 src/preproc/eqn/main.cpp | 15 +++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2f92a7f2f..3c112a4cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-04-07  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/eqn/main.cpp (main): Prefix generated *roff
+       diagnostics with name of input file (the document).  Use
+       `tmc`/`tm1` to coalesce multi-line diagnostic onto one line of
+       output to stderr.  Tighten wording.  Continues the long process
+       of fixing Savannah #52463.
+
 2023-04-03  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/input.cpp (temp_iterator::temp_iterator):
diff --git a/src/preproc/eqn/main.cpp b/src/preproc/eqn/main.cpp
index 81d518443..8c9e17eea 100644
--- a/src/preproc/eqn/main.cpp
+++ b/src/preproc/eqn/main.cpp
@@ -429,17 +429,16 @@ int main(int argc, char **argv)
         ".do if !dEN .ds EN\n");
   if (output_format == troff) {
     printf(".if !'\\*(.T'%s' "
-          ".if !'\\*(.T'html' "        // the html device uses '-Tps' to render
-                                 // equations as images
-          ".tm warning: %s should have been given a '-T\\*(.T' option\n",
-          device, program_name);
+          // the html device uses '-Tps' to render equations as images
+          ".if !'\\*(.T'html' "
+          ".tm \\n[.F]: warning: %s should have been given a"
+          " '-T\\*(.T' option\n", device, program_name);
     printf(".if '\\*(.T'html' "
           ".if !'%s'ps' "
-          ".tm warning: %s should have been given a '-Tps' option\n",
-          device, program_name);
+          ".tmc \\n[.F]: warning: %s should have been given a '-Tps'"
+          " option\n", device, program_name);
     printf(".if '\\*(.T'html' "
-          ".if !'%s'ps' "
-          ".tm warning: (it is advisable to invoke groff via: groff -Thtml 
-e)\n",
+          ".if !'%s'ps' .tm1 (consider invoking 'groff -Thtml -e')\n",
           device);
   }
   if (load_startup_file) {



reply via email to

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