groff-commit
[Top][All Lists]
Advanced

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

[groff] 09/16: [grog]: Restore trailing newlines to output.


From: G. Branden Robinson
Subject: [groff] 09/16: [grog]: Restore trailing newlines to output.
Date: Mon, 31 Oct 2022 21:33:28 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 030a86eb13522ccff433cc921975f2ef77d19105
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 30 21:21:54 2022 -0500

    [grog]: Restore trailing newlines to output.
    
    * src/utils/grog/grog.pl (fail, warn, construct_command, version):
      Restore trailing newlines to `print`ed output.  They went missing when
      I removed the assignment of the output record separator in commit
      6f2e367836, 24 October.  Thanks to Dave Kemper for catching this.
---
 ChangeLog              |  8 ++++++++
 src/utils/grog/grog.pl | 10 +++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 761b45dd1..88702c537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-10-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/utils/grog/grog.pl (fail, warn, construct_command)
+       (version): Restore trailing newlines to `print`ed output.  They
+       went missing when I removed the assignment of the output record
+       separator in commit 6f2e367836, 24 October.  Thanks to Dave
+       Kemper for catching this.
+
 2022-10-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/preconv/preconv.cpp: Trivially refactor.  Rename
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index 85fc9130f..f61275638 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -79,14 +79,14 @@ my $have_any_valid_arguments = 0;
 
 sub fail {
   my $text = shift;
-  print STDERR "$program_name: error: $text";
+  print STDERR "$program_name: error: $text\n";
   $had_processing_problem = 1;
 }
 
 
 sub warn {
   my $text = shift;
-  print STDERR "$program_name: warning: $text";
+  print STDERR "$program_name: warning: $text\n";
 }
 
 
@@ -658,11 +658,11 @@ sub construct_command {
   #########
   # execute the 'groff' command here with option '--run'
   if ( $do_run ) { # with --run
-    print STDERR "@command";
+    print STDERR "@command\n";
     my $cmd = join ' ', @command;
     system($cmd);
   } else {
-    print "@command";
+    print "@command\n";
   }
 } # construct_command()
 
@@ -686,7 +686,7 @@ sub usage {
 
 
 sub version {
-  print "GNU $program_name (groff) $groff_version";
+  print "GNU $program_name (groff) $groff_version\n";
   exit 0;
 } # version()
 



reply via email to

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