groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/08: Remove embedded newlines from diagnostic messages.


From: G. Branden Robinson
Subject: [groff] 01/08: Remove embedded newlines from diagnostic messages.
Date: Fri, 25 Sep 2020 06:30:55 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7a283c459d8605140c8136805005238106378cd1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Sep 19 04:37:48 2020 +1000

    Remove embedded newlines from diagnostic messages.
    
    * src/preproc/grn/main.cpp (conv):
    * src/roff/troff/node.cpp (suppress_node::tprint): Remove embedded
      newlines from diagnostic messages.
    
    Also rephrase grn diagnostic to more closely resemble its others:
        error("no picture filename at line %1", baseline);
        error("bad font size value at line %1", linenum);
        error("no fontname specified in line %1", linenum);
        error("bad stipple number %1 at line %2", idx, linenum);
        error("bad stipple index value at line %1", linenum);
        error("bad adjust command at line %1", linenum);
        error("invalid scale value on line %1", linenum);
        error("unknown command '%1' on line %2", str1, linenum);
---
 ChangeLog                | 6 ++++++
 src/preproc/grn/main.cpp | 2 +-
 src/roff/troff/node.cpp  | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 47166e9..a951beb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-19  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/grn/main.cpp (conv):
+       * src/roff/troff/node.cpp (suppress_node::tprint): Remove
+       embedded newlines from diagnostic messages.
+
 2020-09-18  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/an-old.tmac: Move setup of remaining rendering option
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp
index 833fd60..9752a16 100644
--- a/src/preproc/grn/main.cpp
+++ b/src/preproc/grn/main.cpp
@@ -543,7 +543,7 @@ conv(register FILE *fp,
 
       if (!gremlinfile[0]) {
        if (!setdefault)
-         error("at line %1: no picture filename.\n", baseline);
+         error("no picture filename at line %1", baseline);
        return;
       }
       char *path;
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 27311b1..d696865 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4122,8 +4122,8 @@ void suppress_node::tprint(troff_output_file *out)
       else {
        // postscript (or other device)
        if (suppress_start_page > 0 && current_page != suppress_start_page)
-         error("suppression limit registers span more than one page;\n"
-               "image description %1 will be wrong", image_no);
+         error("suppression limit registers span more than one page;"
+               " image description %1 will be wrong", image_no);
        // if (topdiv->get_page_number() != suppress_start_page)
        //  fprintf(stderr, "end of image and topdiv page = %d   and  
suppress_start_page = %d\n",
        //        topdiv->get_page_number(), suppress_start_page);



reply via email to

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