groff-commit
[Top][All Lists]
Advanced

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

[groff] 59/60: [pre-grohtml]: Tidy up system(3) arguments.


From: G. Branden Robinson
Subject: [groff] 59/60: [pre-grohtml]: Tidy up system(3) arguments.
Date: Wed, 11 Sep 2024 03:38:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit e37e625775d5b423b0958726519719fb3bf65e81
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Sep 11 01:59:02 2024 -0500

    [pre-grohtml]: Tidy up system(3) arguments.
    
    * src/preproc/html/pre-html.cpp (imageList::createPage)
      (imageList::createImage): Drop trailing newline from commands
      constructed for passage to system(3).  They are (a) unnecessary and
      (b) make diagnostics repellently ugly.
---
 ChangeLog                     | 7 +++++++
 src/preproc/html/pre-html.cpp | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b014c33b0..06b75151c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-09-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/html/pre-html.cpp (imageList::createPage)
+       (imageList::createImage): Drop trailing newline from commands
+       constructed for passage to system(3).  They are (a) unnecessary
+       and (b) make diagnostics repellently ugly.
+
 2024-09-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/html/pre-html.cpp: Improve diagnostic message
diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index 13cb08ab6..68e5f79ea 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -919,7 +919,7 @@ int imageList::createPage(int pageno)
            pageno);
 #endif
 
-  s = make_string("ps2ps -sPageList=%d %s %s\n",
+  s = make_string("ps2ps -sPageList=%d %s %s",
                   pageno, psFileName, psPageName);
   html_system(s, 1);
   assert(strlen(image_gen) > 0);
@@ -928,7 +928,7 @@ int imageList::createPage(int pageno)
                  "-dDEVICEHEIGHTPOINTS=792 "
                  "-dDEVICEWIDTHPOINTS=%d -dFIXEDMEDIA=true "
                  "-sDEVICE=%s -r%d %s "
-                 "-sOutputFile=%s %s -\n",
+                 "-sOutputFile=%s %s -",
                  image_gen,
                  EXE_EXT,
                  (getMaxX(pageno) * image_res) / postscriptRes,
@@ -1010,7 +1010,7 @@ void imageList::createImage(imageItem *i)
       s = make_string("pamcut%s %d %d %d %d < %s "
                      "| pnmcrop%s " PNMTOOLS_QUIET
                      "| pnmtopng%s " PNMTOOLS_QUIET " %s"
-                     "> %s\n",
+                     "> %s",
                      EXE_EXT,
                      x1, y1, x2 - x1 + 1, y2 - y1 + 1,
                      imagePageName,



reply via email to

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