gbranden pushed a commit to branch master
in repository groff.

commit b75e26c32f0a3a1091d250ac76cdd66927da436e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Oct 19 13:57:45 2021 +1100

    [troff]: Tweak diagnostic message format.
    
    * src/roff/troff/input.cpp (do_error): Format diagnostic messages in
      closer alignment with GNU Coding Standards: don't introduce a space
      between the program name and the input file name.
---
 ChangeLog                | 7 +++++++
 src/roff/troff/input.cpp | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7b9ef38..4a78356 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-10-19  G. Branden Robinson <[email protected]>
 
+       * src/roff/troff/input.cpp (do_error): Format diagnostic
+       messages in closer alignment with GNU Coding Standards: don't
+       introduce a space between the program name and the input file
+       name.
+
+2021-10-19  G. Branden Robinson <[email protected]>
+
        * src/roff/troff/env.cpp (distribute_space): Revert an
        `assert()` I added in commit b93eacd8d7 (5 September); we can
        indeed reach this code with a negative amount of desired space,
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 57d0354..a823c32 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8749,11 +8749,11 @@ static void do_error(error_type type,
     input_stack::backtrace();
   if (!get_file_line(&filename, &lineno))
     filename = 0;
-  if (filename)
+  if (filename) {
     if (program_name)
-      errprint("%1: %2:%3: ", program_name, filename, lineno);
-    else
-      errprint("%1:%2: ", filename, lineno);
+      errprint("%1:", program_name);
+    errprint("%1:%2: ", filename, lineno);
+  }
   else if (program_name)
     fprintf(stderr, "%s: ", program_name);
   switch (type) {

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

Reply via email to