[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 17/17: m4/groff.m4 (GROFF_PAGE): Refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 17/17: m4/groff.m4 (GROFF_PAGE): Refactor. |
Date: |
Sat, 23 Jul 2022 12:40:47 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 6881b5e52ee43ae20ab31b44ee105613affa5f88
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jul 23 06:22:10 2022 -0500
m4/groff.m4 (GROFF_PAGE): Refactor.
* m4/groff.m4 (GROFF_PAGE): Use 'grep -q' instead of redirecting
standard output to null device. The '-q' option was standardized in
POSIX Issue 5 (1997). Also drop the redirection of the standard error
stream; we have already checked the file named in "$descfile" for
existence and readability. grep should not emit diagnostic messages.
---
ChangeLog | 9 +++++++++
m4/groff.m4 | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index be438bce..7b8a5095 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-07-23 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m4/groff.m4 (GROFF_PAGE): Use 'grep -q' instead of redirecting
+ standard output to null device. The '-q' option was
+ standardized in POSIX Issue 5 (1997). Also drop the redirection
+ of the standard error stream; we have already checked the file
+ named in "$descfile" for existence and readability. grep should
+ not emit diagnostic messages.
+
2022-07-22 G. Branden Robinson <g.branden.robinson@gmail.com>
* m4/groff.m4 (GROFF_PAGE): Macro used awk(1) without
diff --git a/m4/groff.m4 b/m4/groff.m4
index 76dce206..1d2c6d43 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -888,10 +888,10 @@ AC_DEFUN([GROFF_PAGE], [
if test -n "$descfile"
then
- if grep ['^paperlength[ ]\+841890'] "$descfile" >/dev/null 2>&1
+ if grep -q ['^paperlength[ ]\+841890'] "$descfile"
then
PAGE=A4
- elif grep ['^papersize[ ]\+[aA]4'] "$descfile" >/dev/null 2>&1
+ elif grep -q ['^papersize[ ]\+[aA]4'] "$descfile"
then
PAGE=A4
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 17/17: m4/groff.m4 (GROFF_PAGE): Refactor.,
G. Branden Robinson <=