autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] doc: clarify integer requirements in some functions


From: Mike Frysinger
Subject: [PATCH] doc: clarify integer requirements in some functions
Date: Sat, 12 Feb 2022 03:28:28 -0500

These functions do not accept decimal values with fractional parts.
Describe them in terms of integers to clarify.

* doc/autoconf.texi: Change decimal to integer for m4_count, m4_max, m4_min,
and AS_VAR_ARITH.
* lib/m4sugar/m4sh.m4: Change decimal to integer for AS_FUNCTION_DESCRIBE,
AS_HELP_STRING, and AS_VAR_ARITH.
---
 doc/autoconf.texi   | 10 +++++-----
 lib/m4sugar/m4sh.m4 | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 49ee61cd0a44..5bee1252c432 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12974,7 +12974,7 @@ m4_apply([m4_join], [[|], [1], [2]])
 
 @defmac m4_count (@var{arg}, @dots{})
 @msindex{count}
-This macro returns the decimal count of the number of arguments it was
+This macro returns the integer count of the number of arguments it was
 passed.
 @end defmac
 
@@ -13512,13 +13512,13 @@ m4_list_cmp([1],          [1, 2])
 
 @defmac m4_max (@var{arg}, @dots{})
 @msindex{max}
-This macro was introduced in Autoconf 2.62.  Expand to the decimal value
+This macro was introduced in Autoconf 2.62.  Expand to the integer value
 of the maximum arithmetic expression among all the arguments.
 @end defmac
 
 @defmac m4_min (@var{arg}, @dots{})
 @msindex{min}
-This macro was introduced in Autoconf 2.62.  Expand to the decimal value
+This macro was introduced in Autoconf 2.62.  Expand to the integer value
 of the minimum arithmetic expression among all the arguments.
 @end defmac
 
@@ -14332,7 +14332,7 @@ syntax for a valid @var{expression} is rather limited: 
all operators
 must occur as separate shell arguments and with proper quoting, there is
 no portable equality operator, all variables containing numeric values
 must be expanded prior to the computation, all numeric values must be
-provided in decimal without leading zeroes, and the first shell argument
+provided in integer without leading zeroes, and the first shell argument
 should not be a negative number.  In the following example, this snippet
 will print @samp{(2+3)*4 == 20}.
 
@@ -16942,7 +16942,7 @@ When it is available, using arithmetic expansion 
provides a noticeable
 speedup in script execution; but testing for support requires
 @command{eval} to avoid syntax errors.  The following construct is used
 by @code{AS_VAR_ARITH} to provide arithmetic computation when all
-arguments are provided in decimal and without a leading zero, and all
+arguments are provided in integer and without a leading zero, and all
 operators are properly quoted and appear as distinct arguments:
 
 @example
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index e0d50431803d..dee2fb7b9bca 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1498,7 +1498,7 @@ fi])
 # AS_FUNCTION_DESCRIBE(NAME, [ARGS], DESCRIPTION, [WRAP-COLUMN = 79])
 # -------------------------------------------------------------------
 # Output a shell comment describing NAME and its arguments ARGS, then
-# a separator line, then the DESCRIPTION wrapped at a decimal
+# a separator line, then the DESCRIPTION wrapped at an integer
 # WRAP-COLUMN.  The output resembles:
 #  # NAME ARGS
 #  # ---------
@@ -1518,9 +1518,9 @@ m4_text_wrap([$3], [@%:@ ], [], [$4])])
 #
 # Format a help string so that it looks pretty when the user executes
 # "script --help".  This macro takes up to four arguments, a
-# "left hand side" (LHS), a "right hand side" (RHS), a decimal
+# "left hand side" (LHS), a "right hand side" (RHS), an integer
 # INDENT-COLUMN which is the column where wrapped lines should begin
-# (the default of 26 is recommended), and a decimal WRAP-COLUMN which is
+# (the default of 26 is recommended), and an integer WRAP-COLUMN which is
 # the column where lines should wrap (the default of 79 is recommended).
 # LHS is expanded, RHS is not.
 #
@@ -2030,8 +2030,8 @@ m4_define([_AS_VAR_ARITH_WORKS],
 # Perform the arithmetic evaluation of the arguments in EXPR, and set
 # contents of the polymorphic shell variable VAR to the result, taking
 # advantage of any shell optimizations that perform arithmetic without
-# forks.  Note that numbers occurring within EXPR must be written in
-# decimal, and without leading zeroes; variables containing numbers
+# forks.  Note that numbers occurring within EXPR must be written as
+# integers, and without leading zeroes; variables containing numbers
 # must be expanded prior to arithmetic evaluation; the first argument
 # must not be a negative number; there is no portable equality
 # operator; and operators must be given as separate arguments and
-- 
2.34.1




reply via email to

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