[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 16/28: m4/groff.m4: Fix code style nits.
From: |
G. Branden Robinson |
Subject: |
[groff] 16/28: m4/groff.m4: Fix code style nits. |
Date: |
Wed, 25 May 2022 22:43:23 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 657c581e7e95c809d2e8143e430a32e0890bc3ca
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue May 24 12:07:27 2022 -0500
m4/groff.m4: Fix code style nits.
* m4/groff.m4 (GROFF_GHOSTSCRIPT_VERSION_CHECK): Fix code style nits.
Use lowercase for shell variables we define. Don't quote literal
operands to test(1) that don't contain syntactically shell-significant
characters. Update indentation to match recent practice.
---
ChangeLog | 8 ++++++++
m4/groff.m4 | 49 +++++++++++++++++++++++++------------------------
2 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d46dac34..45384c4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-05-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m4/groff.m4 (GROFF_GHOSTSCRIPT_VERSION_CHECK): Fix code style
+ nits. Use lowercase for shell variables we define. Don't quote
+ literal operands to test(1) that don't contain syntactically
+ shell-significant characters. Update indentation to match
+ recent practice.
+
2022-05-24 G. Branden Robinson <g.branden.robinson@gmail.com>
* m4/groff.m4 (GROFF_URW_FONTS_NOTICE): Don't emit the notice if
diff --git a/m4/groff.m4 b/m4/groff.m4
index 361fa082..5ad62803 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -426,59 +426,60 @@ AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS],
# <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.
AC_DEFUN([GROFF_GHOSTSCRIPT_VERSION_CHECK], [
- if test "$GHOSTSCRIPT" != "missing"
+ if test "$GHOSTSCRIPT" != missing
then
AC_MSG_CHECKING([for gs version with good left sidebearing handling])
ghostscript_notice=
- GHOSTSCRIPT_VERSION_GOOD=
- GHOSTSCRIPT_V_STRING=`"$GHOSTSCRIPT" -v | sed 1q`
+ ghostscript_version_good=
+ ghostscript_v_string=`"$GHOSTSCRIPT" -v | sed 1q`
# Get first word.
- GHOSTSCRIPT_WORDS=`echo "$GHOSTSCRIPT_V_STRING" | cut -d\ -f1-`
+ ghostscript_words=`echo "$ghostscript_v_string" | cut -d\ -f1-`
# If the first word is "GPL", discard it.
- if expr "$GHOSTSCRIPT_WORDS" : "GPL" > /dev/null
+ if expr "$ghostscript_words" : "GPL" > /dev/null
then
- GHOSTSCRIPT_WORDS=`echo "$GHOSTSCRIPT_WORDS" | cut -d\ -f2-`
+ ghostscript_words=`echo "$ghostscript_words" | cut -d\ -f2-`
fi
# Only do a version check if the program calls itself Ghostscript.
- if expr "$GHOSTSCRIPT_WORDS" : "Ghostscript" > /dev/null
+ if expr "$ghostscript_words" : "Ghostscript" > /dev/null
then
- GHOSTSCRIPT_VERSION_GOOD=no
- GHOSTSCRIPT_VERSION=`echo "$GHOSTSCRIPT_WORDS" | cut -d\ -f2`
- GHOSTSCRIPT_MAJOR=`echo "$GHOSTSCRIPT_VERSION" | cut -d. -f1`
- GHOSTSCRIPT_MINOR=`echo "$GHOSTSCRIPT_VERSION" | cut -d. -f2`
+ ghostscript_version_good=no
+ ghostscript_version=`echo "$ghostscript_words" | cut -d\ -f2`
+ ghostscript_major=`echo "$ghostscript_version" | cut -d. -f1`
+ ghostscript_minor=`echo "$ghostscript_version" | cut -d. -f2`
- if test "$GHOSTSCRIPT_MAJOR" -lt 9
+ if test "$ghostscript_major" -lt 9
then
- GHOSTSCRIPT_VERSION_GOOD=yes
- elif test "$GHOSTSCRIPT_MAJOR" -ge 10
+ ghostscript_version_good=yes
+ elif test "$ghostscript_major" -ge 10
then
- GHOSTSCRIPT_VERSION_GOOD=yes
- elif test "$GHOSTSCRIPT_MINOR" -ge 54
+ ghostscript_version_good=yes
+ elif test "$ghostscript_minor" -ge 54
then
- GHOSTSCRIPT_VERSION_GOOD=yes
+ ghostscript_version_good=yes
fi
fi
- if test "$GHOSTSCRIPT_VERSION_GOOD" = "yes"
+ if test "$ghostscript_version_good" = yes
then
- GHOSTSCRIPT_VERSION="$GHOSTSCRIPT_VERSION (good)"
- elif test "$GHOSTSCRIPT_VERSION_GOOD" = "no"
+ ghostscript_version="$ghostscript_version (good)"
+ elif test "$ghostscript_version_good" = no
then
- GHOSTSCRIPT_VERSION="$GHOSTSCRIPT_VERSION (buggy)"
+ ghostscript_version="$ghostscript_version (buggy)"
ghostscript_notice="Buggy version of Ghostscript detected."
else
ghostscript_notice="Unable to determine version of Ghostscript."
fi
- if test -n "$GHOSTSCRIPT_VERSION"
+ if test -n "$ghostscript_version"
then
- AC_MSG_RESULT([got $GHOSTSCRIPT_VERSION])
+ AC_MSG_RESULT([got $ghostscript_version])
else
AC_MSG_RESULT([unable to determine])
fi
- fi])
+ fi
+])
AC_DEFUN([GROFF_GHOSTSCRIPT_VERSION_NOTICE], [
if test -n "$ghostscript_notice"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 16/28: m4/groff.m4: Fix code style nits.,
G. Branden Robinson <=