[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 22/30: [grohtml]: Stop forcing Netpbm -quiet flag usage.
From: |
G. Branden Robinson |
Subject: |
[groff] 22/30: [grohtml]: Stop forcing Netpbm -quiet flag usage. |
Date: |
Wed, 10 Jul 2024 03:03:10 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 4a5ff6e88b72df032e0613b051f0a451d38d77ba
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jul 9 10:35:09 2024 -0500
[grohtml]: Stop forcing Netpbm -quiet flag usage.
Actually use the detected Netpbm option for quieting output in the
pre-grohtml(1) preprocessor.
* m4/groff.m4 (GROFF_PNMTOOLS_CAN_BE_QUIET): Set up an Autoheader
template for the C/C++ preprocessor symbol `PNMTOOLS_QUIET`. Report
the detected option (if any) as the result of this configuration test.
Get the expansion into the "config.h" file with `AC_DEFINE_UNQUOTED`.
* src/preproc/html/pre-html.cpp (imageList::createImage): Use the
preprocessor symbol instead of a "-quiet" string literal.
---
ChangeLog | 13 +++++++++++++
m4/groff.m4 | 12 +++++++++---
src/preproc/html/pre-html.cpp | 3 ++-
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 372cd65a2..548b17625 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-07-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Actually use the detected Netpbm option for quieting output in
+ the pre-grohtml(1) preprocessor.
+
+ * m4/groff.m4 (GROFF_PNMTOOLS_CAN_BE_QUIET): Set up an
+ Autoheader template for the C/C++ preprocessor symbol
+ `PNMTOOLS_QUIET`. Report the detected option (if any) as the
+ result of this configuration test. Get the expansion into the
+ "config.h" file with `AC_DEFINE_UNQUOTED`.
+ * src/preproc/html/pre-html.cpp (imageList::createImage): Use
+ the preprocessor symbol instead of a "-quiet" string literal.
+
2024-07-09 G. Branden Robinson <g.branden.robinson@gmail.com>
Search for and use pamcut(1), not pnmcut(1). Per upstream, the
diff --git a/m4/groff.m4 b/m4/groff.m4
index 881c1dd21..fd4545b8c 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -454,20 +454,26 @@ dnl Any macro that tests $pnmtools_quiet should
AC_REQUIRE this.
AC_DEFUN([GROFF_PNMTOOLS_CAN_BE_QUIET], [
AC_REQUIRE([GROFF_CHECK_GROHTML_PROGRAMS])
+ AH_TEMPLATE([PNMTOOLS_QUIET], [Command-line option to quiet Netpnm.])
+
pnmtools_quiet=
if test "$use_grohtml" = yes
then
- AC_MSG_CHECKING([whether PNM tools accept the '-quiet' option])
+ AC_MSG_CHECKING([for options to make PNM tools quiet])
if echo P2 2 2 255 0 1 2 0 | pnmtops -quiet > /dev/null 2>&1
then
- AC_MSG_RESULT([yes])
pnmtools_quiet=-quiet
+ fi
+ if test -n "$pnmtools_quiet"
+ then
+ AC_MSG_RESULT([$pnmtools_quiet])
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([(none)])
fi
fi
AC_SUBST([pnmtools_quiet])
+ AC_DEFINE_UNQUOTED([PNMTOOLS_QUIET], ["$pnmtools_quiet"])
])
diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index 193385ba3..751cba78e 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -1007,7 +1007,8 @@ void imageList::createImage(imageItem *i)
+ 1 + IMAGE_BORDER_PIXELS;
if (createPage(i->pageNo) == 0) {
s = make_string("pamcut%s %d %d %d %d < %s "
- "| pnmcrop%s -quiet | pnmtopng%s -quiet %s"
+ "| pnmcrop%s " PNMTOOLS_QUIET
+ "| pnmtopng%s " PNMTOOLS_QUIET " %s"
"> %s\n",
EXE_EXT,
x1, y1, x2 - x1 + 1, y2 - y1 + 1,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 22/30: [grohtml]: Stop forcing Netpbm -quiet flag usage.,
G. Branden Robinson <=