gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4929-g8f04cdf5


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4929-g8f04cdf5
Date: Sat, 15 Oct 2022 15:30:26 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.2-stable has been updated
       via  8f04cdf533547184cf1cb42f1a27659ef0cfd2d0 (commit)
       via  2ec86635b769e99215cd07a40f7f69f7d7bd9e40 (commit)
      from  3e617086b4ce161ecaf08919697afb7fd0e5523b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=8f04cdf533547184cf1cb42f1a27659ef0cfd2d0

commit 8f04cdf533547184cf1cb42f1a27659ef0cfd2d0
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sat Oct 15 22:30:01 2022 +0300

    Update support files.

diff --git a/support/ChangeLog b/support/ChangeLog
index c1e3b234..980f7e2d 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-15         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * intprops.h, localeinfo.c, verify.h: Updated from GNULIB.
+       * intprops_internal.h: Yet another new file. Sigh.
+
 2022-09-21         Arnold D. Robbins     <arnold@skeeve.com>
 
        * pma.c: Add define for MAP_NORESERVE to zero if it's not defined.
diff --git a/support/intprops-internal.h b/support/intprops-internal.h
new file mode 100644
index 00000000..f6455f78
--- /dev/null
+++ b/support/intprops-internal.h
@@ -0,0 +1,392 @@
+/* intprops-internal.h -- properties of integer types not visible to users
+
+   Copyright (C) 2001-2022 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2.1 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_INTPROPS_INTERNAL_H
+#define _GL_INTPROPS_INTERNAL_H
+
+#include <limits.h>
+
+/* Return a value with the common real type of E and V and the value of V.
+   Do not evaluate E.  */
+#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the real type T is signed.  */
+#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the real expression E, after promotion, has a
+   signed or floating type.  Do not evaluate E.  */
+#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions.  */
+
+/* The width in bits of the integer type or expression T.
+   Do not evaluate T.  T must not be a bit-field expression.
+   Padding bits are not supported; this is checked at compile-time below.  */
+#define _GL_TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E is not evaluated.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_EXPR_SIGNED (e)                                                  \
+   ? ~ _GL_SIGNED_INT_MAXIMUM (e)                                       \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_EXPR_SIGNED (e)                                                  \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99.  */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
+/* This include file assumes that signed types are two's complement without
+   padding bits; the above macros have undefined behavior otherwise.
+   If this is a problem for you, please let us know how to fix it for your 
host.
+   This assumption is tested by the intprops-tests module.  */
+
+/* Does the __typeof__ keyword work?  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if (2 <= __GNUC__ \
+     || (4 <= __clang_major__) \
+     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+     || (0x5110 <= __SUNPRO_C && !__STDC__))
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  T must not be a bit-field expression.
+   This macro does not evaluate its argument, and expands to an
+   integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) _GL_TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   A should not have side effects, and A's type should be an
+   integer with minimum value MIN and maximum MAX.  */
+#define _GL_INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
+  ((min) < 0 ? (a) < - (max) : 0 < (a))
+
+/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
+   (A, B, P) work when P is non-null.  */
+#ifdef __EDG__
+/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
+   <https://bugs.gnu.org/53256>.  */
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
+/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
+   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
+#elif 7 <= __GNUC__
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#endif
+
+/* True if __builtin_mul_overflow (A, B, P) works when P is non-null.  */
+#if defined __clang_major__ && __clang_major__ < 14
+/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>.  */
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
+#else
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
+   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
+#ifdef __EDG__
+/* In EDG-based compilers like ICC 2021.3 and earlier,
+   __builtin_add_overflow_p etc. are not treated as integral constant
+   expressions even when all arguments are.  */
+# define _GL_HAS_BUILTIN_OVERFLOW_P 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+#endif
+
+#if (!defined _GL_STDCKDINT_H && 202311 <= __STDC_VERSION__ \
+     && ! (_GL_HAS_BUILTIN_ADD_OVERFLOW && _GL_HAS_BUILTIN_MUL_OVERFLOW))
+# include <stdckdint.h>
+#endif
+
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+   Return 1 if the result overflows.  Arguments should not have side
+   effects and A, B and *R can be of any integer type other than char,
+   bool, a bit-precise integer type, or an enumeration type.  */
+#if _GL_HAS_BUILTIN_ADD_OVERFLOW
+# define _GL_INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
+#elif defined ckd_add && defined ckd_sub && !defined _GL_STDCKDINT_H
+# define _GL_INT_ADD_WRAPV(a, b, r) ckd_add (r, + (a), + (b))
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, + (a), + (b))
+#else
+# define _GL_INT_ADD_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
+#endif
+#if _GL_HAS_BUILTIN_MUL_OVERFLOW
+# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
+       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
+      && !defined __EDG__)
+#  define _GL_INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
+# else
+   /* Work around GCC bug 91450.  */
+#  define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+    ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && 
_GL_EXPR_SIGNED (b) \
+      && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
+     ? ((void) __builtin_mul_overflow (a, b, r), 1) \
+     : __builtin_mul_overflow (a, b, r))
+# endif
+#elif defined ckd_mul && !defined _GL_STDCKDINT_H
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, + (a), + (b))
+#else
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
+#endif
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+   https://llvm.org/bugs/show_bug.cgi?id=25390
+   For now, assume all versions of GCC-like compilers generate bogus
+   warnings for _Generic.  This matters only for compilers that
+   lack relevant builtins.  */
+#if __GNUC__ || defined __clang__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation and OVERFLOW the overflow predicate.  Return 1 if the
+   result overflows.  Arguments should not have side effects,
+   and A, B and *R can be of any integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.  */
+#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+   (_Generic \
+    (*(r), \
+     signed char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        signed char, SCHAR_MIN, SCHAR_MAX), \
+     unsigned char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned char, 0, UCHAR_MAX), \
+     short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        short int, SHRT_MIN, SHRT_MAX), \
+     unsigned short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned short int, 0, USHRT_MAX), \
+     int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        int, INT_MIN, INT_MAX), \
+     unsigned int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned int, 0, UINT_MAX), \
+     long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX), \
+     unsigned long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX), \
+     long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        long long int, LLONG_MIN, LLONG_MAX), \
+     unsigned long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        unsigned long long int, 0, ULLONG_MAX)))
+#else
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation and OVERFLOW the overflow predicate.  If *R is
+   signed, its type is ST with bounds SMIN..SMAX; otherwise its type
+   is UT with bounds U..UMAX.  ST and UT are narrower than int.
+   Return 1 if the result overflows.  Arguments should not have side
+   effects, and A, B and *R can be of any integer type other than
+   char, bool, a bit-precise integer type, or an enumeration type.  */
+# if _GL_HAVE___TYPEOF__
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (_GL_TYPE_SIGNED (__typeof__ (*(r))) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
+# else
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (overflow (a, b, smin, smax) \
+     ? (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
+     : (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
+# endif
+
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+   (sizeof *(r) == sizeof (signed char) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 signed char, SCHAR_MIN, SCHAR_MAX, \
+                                 unsigned char, UCHAR_MAX) \
+    : sizeof *(r) == sizeof (short int) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 short int, SHRT_MIN, SHRT_MAX, \
+                                 unsigned short int, USHRT_MAX) \
+    : sizeof *(r) == sizeof (int) \
+    ? (_GL_EXPR_SIGNED (*(r)) \
+       ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          int, INT_MIN, INT_MAX) \
+       : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          unsigned int, 0, UINT_MAX)) \
+    : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    (sizeof *(r) == sizeof (long int) \
+     ? (_GL_EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           long int, LONG_MIN, LONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           unsigned long int, 0, ULONG_MAX)) \
+     : (_GL_EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           long long int, LLONG_MIN, LLONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           unsigned long long int, 0, ULLONG_MAX)))
+# else
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    (_GL_EXPR_SIGNED (*(r)) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX))
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+   is given by OP.  Use the unsigned type UT for calculation to avoid
+   overflow problems.  *R's type is T, with extrema TMIN and TMAX.
+   T can be any signed integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.
+   Return 1 if the result overflows.  */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+  (overflow (a, b, tmin, tmax) \
+   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return 1 if the integer expressions A - B and -A would overflow,
+   respectively.  Arguments should not have side effects,
+   and can be any signed integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.
+   These macros are tuned for their last input argument being a constant.  */
+
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+   __builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0)
+#else
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+   _GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
+
+/* Return the low-order bits of A <op> B, where the operation is given
+   by OP.  Use the unsigned type UT for calculation to avoid undefined
+   behavior on signed integer overflow, and convert the result to type T.
+   UT is at least as wide as T and is no narrower than unsigned int,
+   T is two's complement, and there is no padding or trap representations.
+   Assume that converting UT to T yields the low-order bits, as is
+   done in all known two's-complement C compilers.  E.g., see:
+   https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+   According to the C standard, converting UT to T yields an
+   implementation-defined result or signal for values outside T's
+   range.  However, code that works around this theoretical problem
+   runs afoul of a compiler bug in Oracle Studio 12.3 x86.  See:
+   https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+   As the compiler bug is real, don't try to work around the
+   theoretical problem.  */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+  ((t) ((ut) (a) op (ut) (b)))
+
+/* Return true if the numeric values A + B, A - B, A * B fall outside
+   the range TMIN..TMAX.  Arguments should not have side effects
+   and can be any integer type other than char, bool,
+   a bit-precise integer type, or an enumeration type.
+   TMIN should be signed and nonpositive.
+   TMAX should be positive, and should be signed unless TMIN is zero.  */
+#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? (((tmin) \
+       ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < 
(tmin)) \
+          && (a) < (tmin) - (b)) \
+       : (a) <= -1 - (b)) \
+      || ((_GL_EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + 
(b))) \
+   : (a) < 0 \
+   ? (((tmin) \
+       ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < 
(tmin)) \
+          && (b) < (tmin) - (a)) \
+       : (b) <= -1 - (a)) \
+      || ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
+          && (tmax) < (a) + (b))) \
+   : (tmax) < (b) || (tmax) - (b) < (a))
+#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  (((a) < 0) == ((b) < 0) \
+   ? ((a) < (b) \
+      ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
+      : (tmax) < (a) - (b)) \
+   : (a) < 0 \
+   ? ((!_GL_EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 
0) \
+      || (a) - (tmin) < (b)) \
+   : ((! (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+          && _GL_EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
+       && (tmax) <= -1 - (b)) \
+      || (tmax) + (b) < (a)))
+#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? ((a) < 0 \
+      ? (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+         ? (a) < (tmax) / (b) \
+         : ((_GL_INT_NEGATE_OVERFLOW (b) \
+             ? _GL_INT_CONVERT (b, tmax) >> (_GL_TYPE_WIDTH (+ (b)) - 1) \
+             : (tmax) / -(b)) \
+            <= -1 - (a))) \
+      : _GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
+      ? (_GL_EXPR_SIGNED (a) \
+         ? 0 < (a) + (tmin) \
+         : 0 < (a) && -1 - (tmin) < (a) - 1) \
+      : (tmin) / (b) < (a)) \
+   : (b) == 0 \
+   ? 0 \
+   : ((a) < 0 \
+      ? (_GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
+         ? (_GL_EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
+         : (tmin) / (a) < (b)) \
+      : (tmax) / (b) < (a)))
+
+#endif /* _GL_INTPROPS_INTERNAL_H */
diff --git a/support/intprops.h b/support/intprops.h
index d4a917f7..f182ddc1 100644
--- a/support/intprops.h
+++ b/support/intprops.h
@@ -15,19 +15,10 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-
 #ifndef _GL_INTPROPS_H
 #define _GL_INTPROPS_H
 
-#include <limits.h>
-
-/* Return a value with the common real type of E and V and the value of V.
-   Do not evaluate E.  */
-#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
-
-/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
-   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.  */
-#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+#include "intprops-internal.h"
 
 /* The extra casts in the following macros work around compiler bugs,
    e.g., in Cray C 5.0.3.0.  */
@@ -37,11 +28,11 @@
 #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
 
 /* True if the real type T is signed.  */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) _GL_TYPE_SIGNED (t)
 
 /* Return 1 if the real expression E, after promotion, has a
    signed or floating type.  Do not evaluate E.  */
-#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
 
 
 /* Minimum and maximum values for integer types and expressions.  */
@@ -49,7 +40,7 @@
 /* The width in bits of the integer type or expression T.
    Do not evaluate T.  T must not be a bit-field expression.
    Padding bits are not supported; this is checked at compile-time below.  */
-#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+#define TYPE_WIDTH(t) _GL_TYPE_WIDTH (t)
 
 /* The maximum and minimum values for the integer type T.  */
 #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
@@ -58,51 +49,6 @@
         ? (t) -1                                                        \
         : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
 
-/* The maximum and minimum values for the type of the expression E,
-   after integer promotion.  E is not evaluated.  */
-#define _GL_INT_MINIMUM(e)                                              \
-  (EXPR_SIGNED (e)                                                      \
-   ? ~ _GL_SIGNED_INT_MAXIMUM (e)                                       \
-   : _GL_INT_CONVERT (e, 0))
-#define _GL_INT_MAXIMUM(e)                                              \
-  (EXPR_SIGNED (e)                                                      \
-   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
-   : _GL_INT_NEGATE_CONVERT (e, 1))
-#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
-  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
-
-/* Work around OpenVMS incompatibility with C99.  */
-#if !defined LLONG_MAX && defined __INT64_MAX
-# define LLONG_MAX __INT64_MAX
-# define LLONG_MIN __INT64_MIN
-#endif
-
-/* This include file assumes that signed types are two's complement without
-   padding bits; the above macros have undefined behavior otherwise.
-   If this is a problem for you, please let us know how to fix it for your 
host.
-   This assumption is tested by the intprops-tests module.  */
-
-/* Does the __typeof__ keyword work?  This could be done by
-   'configure', but for now it's easier to do it by hand.  */
-#if (2 <= __GNUC__ \
-     || (4 <= __clang_major__) \
-     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
-     || (0x5110 <= __SUNPRO_C && !__STDC__))
-# define _GL_HAVE___TYPEOF__ 1
-#else
-# define _GL_HAVE___TYPEOF__ 0
-#endif
-
-/* Return 1 if the integer type or expression T might be signed.  Return 0
-   if it is definitely unsigned.  T must not be a bit-field expression.
-   This macro does not evaluate its argument, and expands to an
-   integer constant expression.  */
-#if _GL_HAVE___TYPEOF__
-# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
-#else
-# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
-#endif
-
 /* Bound on length of the string representing an unsigned integer
    value representable in B bits.  log10 (2.0) < 146/485.  The
    smallest value of B where this bound is not tight is 2621.  */
@@ -129,12 +75,11 @@
 /* Range overflow checks.
 
    The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
-   operators might not yield numerically correct answers due to
-   arithmetic overflow.  They do not rely on undefined or
-   implementation-defined behavior.  Their implementations are simple
-   and straightforward, but they are harder to use and may be less
-   efficient than the INT_<op>_WRAPV, INT_<op>_OK, and
-   INT_<op>_OVERFLOW macros described below.
+   operators overflow arithmetically when given the same arguments.
+   These macros do not rely on undefined or implementation-defined behavior.
+   Although their implementations are simple and straightforward,
+   they are harder to use and may be less efficient than the
+   INT_<op>_WRAPV, INT_<op>_OK, and INT_<op>_OVERFLOW macros described below.
 
    Example usage:
 
@@ -181,9 +126,7 @@
 /* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
    See above for restrictions.  */
 #define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
-  ((min) < 0                                            \
-   ? (a) < - (max)                                      \
-   : 0 < (a))
+  _GL_INT_NEGATE_RANGE_OVERFLOW (a, min, max)
 
 /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
    See above for restrictions.  Avoid && and || as they tickle
@@ -227,43 +170,6 @@
    ? (a) < (min) >> (b)                                 \
    : (max) >> (b) < (a))
 
-/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
-   (A, B, P) work when P is non-null.  */
-#ifdef __EDG__
-/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
-   <https://bugs.gnu.org/53256>.  */
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
-/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
-   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
-#elif 7 <= __GNUC__
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
-#else
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#endif
-
-/* True if __builtin_mul_overflow (A, B, P) works when P is non-null.  */
-#if defined __clang_major__ && __clang_major__ < 14
-/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>.  */
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
-#else
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
-#endif
-
-/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
-   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
-#ifdef __EDG__
-/* In EDG-based compilers like ICC 2021.3 and earlier,
-   __builtin_add_overflow_p etc. are not treated as integral constant
-   expressions even when all arguments are.  */
-# define _GL_HAS_BUILTIN_OVERFLOW_P 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
-#else
-# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
-#endif
-
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
    (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
@@ -350,13 +256,18 @@
    Because the WRAPV macros convert the result, they report overflow
    in different circumstances than the OVERFLOW macros do.  For
    example, in the typical case with 16-bit 'short' and 32-bit 'int',
-   if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
+   if A, B and *R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
    returns false because the addition cannot overflow after A and B
-   are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns
+   are converted to 'int', whereas INT_ADD_WRAPV (A, B, R) returns
    true or false depending on whether the sum fits into 'short'.
 
    These macros are tuned for their last input argument being a constant.
 
+   A, B, and *R should be integers; they need not be the same type,
+   and they need not be all signed or all unsigned.
+   However, none of the integer types should be bit-precise,
+   and *R's type should not be char, bool, or an enumeration type.
+
    Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
    A % B, and A << B would overflow, respectively.  */
 
@@ -364,12 +275,7 @@
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
 #define INT_SUBTRACT_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#if _GL_HAS_BUILTIN_OVERFLOW_P
-# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
-#else
-# define INT_NEGATE_OVERFLOW(a) \
-   INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
-#endif
+#define INT_NEGATE_OVERFLOW(a) _GL_INT_NEGATE_OVERFLOW (a)
 #define INT_MULTIPLY_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
 #define INT_DIVIDE_OVERFLOW(a, b) \
@@ -391,224 +297,9 @@
 
 /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
    Return 1 if the result overflows.  See above for restrictions.  */
-#if _GL_HAS_BUILTIN_ADD_OVERFLOW
-# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
-# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
-#else
-# define INT_ADD_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
-# define INT_SUBTRACT_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
-#endif
-#if _GL_HAS_BUILTIN_MUL_OVERFLOW
-# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
-       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
-      && !defined __EDG__)
-#  define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
-# else
-   /* Work around GCC bug 91450.  */
-#  define INT_MULTIPLY_WRAPV(a, b, r) \
-    ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
-      && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
-     ? ((void) __builtin_mul_overflow (a, b, r), 1) \
-     : __builtin_mul_overflow (a, b, r))
-# endif
-#else
-# define INT_MULTIPLY_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
-#endif
-
-/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
-   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
-   https://llvm.org/bugs/show_bug.cgi?id=25390
-   For now, assume all versions of GCC-like compilers generate bogus
-   warnings for _Generic.  This matters only for compilers that
-   lack relevant builtins.  */
-#if __GNUC__ || defined __clang__
-# define _GL__GENERIC_BOGUS 1
-#else
-# define _GL__GENERIC_BOGUS 0
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where OP specifies
-   the operation and OVERFLOW the overflow predicate.  Return 1 if the
-   result overflows.  See above for restrictions.  */
-#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
-   (_Generic \
-    (*(r), \
-     signed char: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        signed char, SCHAR_MIN, SCHAR_MAX), \
-     unsigned char: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned char, 0, UCHAR_MAX), \
-     short int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        short int, SHRT_MIN, SHRT_MAX), \
-     unsigned short int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned short int, 0, USHRT_MAX), \
-     int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        int, INT_MIN, INT_MAX), \
-     unsigned int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned int, 0, UINT_MAX), \
-     long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        long int, LONG_MIN, LONG_MAX), \
-     unsigned long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        unsigned long int, 0, ULONG_MAX), \
-     long long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        long long int, LLONG_MIN, LLONG_MAX), \
-     unsigned long long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        unsigned long long int, 0, ULLONG_MAX)))
-#else
-/* Store the low-order bits of A <op> B into *R, where OP specifies
-   the operation and OVERFLOW the overflow predicate.  If *R is
-   signed, its type is ST with bounds SMIN..SMAX; otherwise its type
-   is UT with bounds U..UMAX.  ST and UT are narrower than int.
-   Return 1 if the result overflows.  See above for restrictions.  */
-# if _GL_HAVE___TYPEOF__
-#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
-    (TYPE_SIGNED (__typeof__ (*(r))) \
-     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
-     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
-# else
-#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
-    (overflow (a, b, smin, smax) \
-     ? (overflow (a, b, 0, umax) \
-        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
-        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
-     : (overflow (a, b, 0, umax) \
-        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
-        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
-# endif
-
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
-   (sizeof *(r) == sizeof (signed char) \
-    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
-                                 signed char, SCHAR_MIN, SCHAR_MAX, \
-                                 unsigned char, UCHAR_MAX) \
-    : sizeof *(r) == sizeof (short int) \
-    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
-                                 short int, SHRT_MIN, SHRT_MAX, \
-                                 unsigned short int, USHRT_MAX) \
-    : sizeof *(r) == sizeof (int) \
-    ? (EXPR_SIGNED (*(r)) \
-       ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                          int, INT_MIN, INT_MAX) \
-       : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                          unsigned int, 0, UINT_MAX)) \
-    : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
-# ifdef LLONG_MAX
-#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
-    (sizeof *(r) == sizeof (long int) \
-     ? (EXPR_SIGNED (*(r)) \
-        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                           long int, LONG_MIN, LONG_MAX) \
-        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                           unsigned long int, 0, ULONG_MAX)) \
-     : (EXPR_SIGNED (*(r)) \
-        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                           long long int, LLONG_MIN, LLONG_MAX) \
-        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                           unsigned long long int, 0, ULLONG_MAX)))
-# else
-#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
-    (EXPR_SIGNED (*(r)) \
-     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        long int, LONG_MIN, LONG_MAX) \
-     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        unsigned long int, 0, ULONG_MAX))
-# endif
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where the operation
-   is given by OP.  Use the unsigned type UT for calculation to avoid
-   overflow problems.  *R's type is T, with extrema TMIN and TMAX.
-   T must be a signed integer type.  Return 1 if the result overflows.  */
-#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
-  (overflow (a, b, tmin, tmax) \
-   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
-   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
-
-/* Return the low-order bits of A <op> B, where the operation is given
-   by OP.  Use the unsigned type UT for calculation to avoid undefined
-   behavior on signed integer overflow, and convert the result to type T.
-   UT is at least as wide as T and is no narrower than unsigned int,
-   T is two's complement, and there is no padding or trap representations.
-   Assume that converting UT to T yields the low-order bits, as is
-   done in all known two's-complement C compilers.  E.g., see:
-   https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
-
-   According to the C standard, converting UT to T yields an
-   implementation-defined result or signal for values outside T's
-   range.  However, code that works around this theoretical problem
-   runs afoul of a compiler bug in Oracle Studio 12.3 x86.  See:
-   https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
-   As the compiler bug is real, don't try to work around the
-   theoretical problem.  */
-
-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
-  ((t) ((ut) (a) op (ut) (b)))
-
-/* Return true if the numeric values A + B, A - B, A * B fall outside
-   the range TMIN..TMAX.  Arguments should be integer expressions
-   without side effects.  TMIN should be signed and nonpositive.
-   TMAX should be positive, and should be signed unless TMIN is zero.  */
-#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  ((b) < 0 \
-   ? (((tmin) \
-       ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
-          && (a) < (tmin) - (b)) \
-       : (a) <= -1 - (b)) \
-      || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
-   : (a) < 0 \
-   ? (((tmin) \
-       ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
-          && (b) < (tmin) - (a)) \
-       : (b) <= -1 - (a)) \
-      || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
-          && (tmax) < (a) + (b))) \
-   : (tmax) < (b) || (tmax) - (b) < (a))
-#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  (((a) < 0) == ((b) < 0) \
-   ? ((a) < (b) \
-      ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
-      : (tmax) < (a) - (b)) \
-   : (a) < 0 \
-   ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
-      || (a) - (tmin) < (b)) \
-   : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
-          && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
-       && (tmax) <= -1 - (b)) \
-      || (tmax) + (b) < (a)))
-#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  ((b) < 0 \
-   ? ((a) < 0 \
-      ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
-         ? (a) < (tmax) / (b) \
-         : ((INT_NEGATE_OVERFLOW (b) \
-             ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
-             : (tmax) / -(b)) \
-            <= -1 - (a))) \
-      : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
-      ? (EXPR_SIGNED (a) \
-         ? 0 < (a) + (tmin) \
-         : 0 < (a) && -1 - (tmin) < (a) - 1) \
-      : (tmin) / (b) < (a)) \
-   : (b) == 0 \
-   ? 0 \
-   : ((a) < 0 \
-      ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
-         ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
-         : (tmin) / (a) < (b)) \
-      : (tmax) / (b) < (a)))
+#define INT_ADD_WRAPV(a, b, r) _GL_INT_ADD_WRAPV (a, b, r)
+#define INT_SUBTRACT_WRAPV(a, b, r) _GL_INT_SUBTRACT_WRAPV (a, b, r)
+#define INT_MULTIPLY_WRAPV(a, b, r) _GL_INT_MULTIPLY_WRAPV (a, b, r)
 
 /* The following macros compute A + B, A - B, and A * B, respectively.
    If no overflow occurs, they set *R to the result and return 1;
@@ -624,6 +315,8 @@
 
    A, B, and *R should be integers; they need not be the same type,
    and they need not be all signed or all unsigned.
+   However, none of the integer types should be bit-precise,
+   and *R's type should not be char, bool, or an enumeration type.
 
    These macros work correctly on all known practical hosts, and do not rely
    on undefined behavior due to signed arithmetic overflow.
@@ -635,8 +328,8 @@
 
    These macros are tuned for B being a constant.  */
 
-#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
-#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
-#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
+#define INT_ADD_OK(a, b, r) (! INT_ADD_WRAPV (a, b, r))
+#define INT_SUBTRACT_OK(a, b, r) (! INT_SUBTRACT_WRAPV (a, b, r))
+#define INT_MULTIPLY_OK(a, b, r) (! INT_MULTIPLY_WRAPV (a, b, r))
 
 #endif /* _GL_INTPROPS_H */
diff --git a/support/localeinfo.c b/support/localeinfo.c
index 0e74f422..52b8a785 100644
--- a/support/localeinfo.c
+++ b/support/localeinfo.c
@@ -124,7 +124,7 @@ static short const lonesome_lower[] =
 /* Verify that the worst case fits.  This is 1 for towupper, 1 for
    towlower, and 1 for each entry in LONESOME_LOWER.  */
 verify (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
-        <= CASE_FOLDED_BUFSIZE);
+               <= CASE_FOLDED_BUFSIZE);
 
 /* Find the characters equal to C after case-folding, other than C
    itself, and store them into FOLDED.  Return the number of characters
diff --git a/support/verify.h b/support/verify.h
index 47b6ee66..99af8029 100644
--- a/support/verify.h
+++ b/support/verify.h
@@ -25,19 +25,19 @@
    works as per C11.  This is supported by GCC 4.6.0+ and by clang 4+.
 
    Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
-   per C2x.  This is supported by GCC 9.1+.
+   per C23.  This is supported by GCC 9.1+.
 
    Support compilers claiming conformance to the relevant standard,
    and also support GCC when not pedantic.  If we were willing to slow
    'configure' down we could also use it with other compilers, but
    since this affects only the quality of diagnostics, why bother?  */
 #ifndef __cplusplus
-# if (201112L <= __STDC_VERSION__ \
+# if (201112 <= __STDC_VERSION__ \
       || (!defined __STRICT_ANSI__ \
           && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__)))
 #  define _GL_HAVE__STATIC_ASSERT 1
 # endif
-# if (202000L <= __STDC_VERSION__ \
+# if (202000 <= __STDC_VERSION__ \
       || (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
 #  define _GL_HAVE__STATIC_ASSERT1 1
 # endif
@@ -202,12 +202,12 @@ template <int w>
 
    This macro requires three or more arguments but uses at most the first
    two, so that the _Static_assert macro optionally defined below supports
-   both the C11 two-argument syntax and the C2x one-argument syntax.
+   both the C11 two-argument syntax and the C23 one-argument syntax.
 
    Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
-#if 200410 <= __cpp_static_assert
+#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert
 # define _GL_VERIFY(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC)
 #elif defined _GL_HAVE__STATIC_ASSERT
 # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
@@ -223,11 +223,30 @@ template <int w>
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
 #ifdef _GL_STATIC_ASSERT_H
 # if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-#  define _Static_assert(...) \
-     _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+#  define _Static_assert(R, ...) \
+     _GL_VERIFY ((R), "static assertion failed", -)
 # endif
-# if __cpp_static_assert < 201411 && !defined static_assert
-#  define static_assert _Static_assert /* C11 requires this #define.  */
+# if (!defined static_assert \
+      && __STDC_VERSION__ < 202311 \
+      && (!defined __cplusplus \
+          || (__cpp_static_assert < 201411 \
+              && __GNUG__ < 6 && __clang_major__ < 6)))
+#  if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
+/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
+   the one-argument static_assert, and it does not support _Static_assert.
+   We have to play preprocessor tricks to distinguish the two cases.
+   Since the MSVC preprocessor is not ISO C compliant (cf.
+   <https://stackoverflow.com/questions/5134523/>), the solution is specific
+   to MSVC.  */
+#   define _GL_EXPAND(x) x
+#   define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
+#   define _GL_SA2 static_assert
+#   define _GL_SA3 static_assert
+#   define _GL_SA_PICK(x1,x2,x3,x4,...) x4
+#   define static_assert(...) 
_GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__)
+#  else
+#   define static_assert _Static_assert /* C11 requires this #define. */
+#  endif
 # endif
 #endif
 
@@ -303,7 +322,7 @@ template <int w>
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
 #elif 1200 <= _MSC_VER
 # define assume(R) __assume (R)
-#elif 202311L <= __STDC_VERSION__
+#elif 202311 <= __STDC_VERSION__
 # include <stddef.h>
 # define assume(R) ((R) ? (void) 0 : unreachable ())
 #elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=2ec86635b769e99215cd07a40f7f69f7d7bd9e40

commit 2ec86635b769e99215cd07a40f7f69f7d7bd9e40
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sat Oct 15 22:15:42 2022 +0300

    Update build-aux.

diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog
index 3f441530..22adabac 100644
--- a/build-aux/ChangeLog
+++ b/build-aux/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-15         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * config.guess, config.sub, texinfo.tex: Updated from GNULIB.
+
 2022-09-04         Arnold D. Robbins     <arnold@skeeve.com>
 
        * 5.2.0: Release tar ball made.
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 1817bdce..980b0208 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -4,7 +4,7 @@
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2022-05-25'
+timestamp='2022-09-17'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -966,6 +966,12 @@ EOF
        GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
        GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
        ;;
+    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+       GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+       ;;
+    *:[Mm]anagarm:*:*)
+       GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
+       ;;
     *:Minix:*:*)
        GUESS=$UNAME_MACHINE-unknown-minix
        ;;
@@ -1036,7 +1042,7 @@ EOF
     k1om:Linux:*:*)
        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
        ;;
-    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
        ;;
     m32r*:Linux:*:*)
diff --git a/build-aux/config.sub b/build-aux/config.sub
index dba16e84..baf1512b 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -4,7 +4,7 @@
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2022-01-03'
+timestamp='2022-09-17'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -145,7 +145,7 @@ case $1 in
                        nto-qnx* | linux-* | uclinux-uclibc* \
                        | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | 
netbsd*-gnu* \
                        | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
-                       | storm-chaos* | os2-emx* | rtmk-nova*)
+                       | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
                                basic_machine=$field1
                                basic_os=$maybe_os
                                ;;
@@ -1207,7 +1207,7 @@ case $cpu-$vendor in
                        | k1om \
                        | le32 | le64 \
                        | lm32 \
-                       | loongarch32 | loongarch64 | loongarchx32 \
+                       | loongarch32 | loongarch64 \
                        | m32c | m32r | m32rle \
                        | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | 
m68k \
                        | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1341,6 +1341,10 @@ EOF
                kernel=linux
                os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
                ;;
+       managarm*)
+               kernel=managarm
+               os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
+               ;;
        *)
                kernel=
                os=$basic_os
@@ -1754,7 +1758,7 @@ case $os in
             | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
             | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
             | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
-            | fiwix* )
+            | fiwix* | mlibc* )
                ;;
        # This one is extra strict with allowed versions
        sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1762,6 +1766,9 @@ case $os in
                ;;
        none)
                ;;
+       kernel* )
+               # Restricted further below
+               ;;
        *)
                echo Invalid configuration \`"$1"\': OS \`"$os"\' not 
recognized 1>&2
                exit 1
@@ -1772,16 +1779,26 @@ esac
 # (given a valid OS), if there is a kernel.
 case $kernel-$os in
        linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
-                  | linux-musl* | linux-relibc* | linux-uclibc* )
+                  | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* 
)
                ;;
        uclinux-uclibc* )
                ;;
-       -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+       managarm-mlibc* | managarm-kernel* )
+               ;;
+       -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
                # These are just libc implementations, not actual OSes, and thus
                # require a kernel.
                echo "Invalid configuration \`$1': libc \`$os' needs explicit 
kernel." 1>&2
                exit 1
                ;;
+       -kernel* )
+               echo "Invalid configuration \`$1': \`$os' needs explicit 
kernel." 1>&2
+               exit 1
+               ;;
+       *-kernel* )
+               echo "Invalid configuration \`$1': \`$kernel' does not support 
\`$os'." 1>&2
+               exit 1
+               ;;
        kfreebsd*-gnu* | kopensolaris*-gnu*)
                ;;
        vxworks-simlinux | vxworks-simwindows | vxworks-spe)
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 6e3de226..9ad8fafc 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2022-09-01.06}
+\def\texinfoversion{2022-10-01.15}
 %
 % Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
 %
@@ -314,16 +314,8 @@
 \newbox\footlinebox
 
 % When outputting the double column layout for indices, an output routine
-% is run several times, which hides the original value of \topmark.  This
-% can lead to a page heading being output and duplicating the chapter heading
-% of the index.  Hence, save the contents of \topmark at the beginning of
-% the output routine.  The saved contents are valid until we actually
-% \shipout a page.
-%
-% (We used to run a short output routine to actually set \topmark and
-% \firstmark to the right values, but if this was called with an empty page
-% containing whatsits for writing index entries, the whatsits would be thrown
-% away and the index auxiliary file would remain empty.)
+% is run several times, hiding the original value of \topmark.  Hence, save
+% \topmark at the beginning.
 %
 \newtoks\savedtopmark
 \newif\iftopmarksaved
@@ -348,15 +340,9 @@
   %
   \checkchapterpage
   %
-  % Retrieve the information for the headings from the marks in the page,
-  % and call Plain TeX's \makeheadline and \makefootline, which use the
-  % values in \headline and \footline.
-  %
-  % Common context changes for both heading and footing.
-  % Do this outside of the \shipout so @code etc. will be expanded in
-  % the headline as they should be, not taken literally (outputting ''code).
+  % Make the heading and footing.  \makeheadline and \makefootline
+  % use the contents of \headline and \footline.
   \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
-  %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
   \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
@@ -614,21 +600,6 @@
 % @? is an end-of-sentence query.
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
-% @frenchspacing on|off  says whether to put extra space after punctuation.
-%
-\def\onword{on}
-\def\offword{off}
-%
-\parseargdef\frenchspacing{%
-  \def\temp{#1}%
-  \ifx\temp\onword \plainfrenchspacing
-  \else\ifx\temp\offword \plainnonfrenchspacing
-  \else
-    \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
-  \fi\fi
-}
-
 % @w prevents a word break.  Without the \leavevmode, @w at the
 % beginning of a paragraph, when TeX is still in vertical mode, would
 % produce a whole line of output instead of starting the paragraph.
@@ -2573,34 +2544,30 @@ end
   \scriptfont\sffam=\sevensf
 }
 
-%
 
-% The font-changing commands (all called \...fonts) redefine the meanings
-% of \STYLEfont, instead of just \STYLE.  We do this because \STYLE needs
-% to also set the current \fam for math mode.  Our \STYLE (e.g., \rm)
-% commands hardwire \STYLEfont to set the current font.
-%
-% The fonts used for \ifont are for "math italics"  (\itfont is for italics
-% in regular text).  \syfont is also used in math mode only.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
+
+% \defineassignfonts{SIZE} -
+%   Define sequence \assignfontsSIZE, which switches between font sizes
+% by redefining the meanings of \STYLEfont.  (Just \STYLE additionally sets
+% the current \fam for math mode.)
 %
+\def\defineassignfonts#1{%
+  \expandafter\edef\csname assignfonts#1\endcsname{%
+    \let\noexpand\rmfont\csname #1rm\endcsname
+    \let\noexpand\itfont\csname #1it\endcsname
+    \let\noexpand\slfont\csname #1sl\endcsname
+    \let\noexpand\bffont\csname #1bf\endcsname
+    \let\noexpand\ttfont\csname #1tt\endcsname
+    \let\noexpand\smallcaps\csname #1sc\endcsname
+    \let\noexpand\sffont  \csname #1sf\endcsname
+    \let\noexpand\ifont   \csname #1i\endcsname
+    \let\noexpand\syfont  \csname #1sy\endcsname
+    \let\noexpand\ttslfont\csname #1ttsl\endcsname
+  }
+}
 
 \def\assignfonts#1{%
-  \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
-  \expandafter\let\expandafter\itfont\csname #1it\endcsname
-  \expandafter\let\expandafter\slfont\csname #1sl\endcsname
-  \expandafter\let\expandafter\bffont\csname #1bf\endcsname
-  \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
-  \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
-  \expandafter\let\expandafter\sffont  \csname #1sf\endcsname
-  \expandafter\let\expandafter\ifont   \csname #1i\endcsname
-  \expandafter\let\expandafter\syfont  \csname #1sy\endcsname
-  \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+  \csname assignfonts#1\endcsname
 }
 
 \newif\ifrmisbold
@@ -2624,12 +2591,21 @@ end
    \csname\curfontstyle\endcsname
 }%
 
+% Define the font-changing commands (all called \...fonts).
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower).  These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
+%
+% Note: The fonts used for \ifont are for "math italics"  (\itfont is for
+% italics in regular text).  \syfont is also used in math mode only.
+%
 \def\definefontsetatsize#1#2#3#4#5{%
+  \defineassignfonts{#1}%
 \expandafter\def\csname #1fonts\endcsname{%
   \def\curfontsize{#1}%
   \def\lsize{#2}\def\lllsize{#3}%
   \csname rmisbold#5\endcsname
-  \assignfonts{#1}%
+  \csname assignfonts#1\endcsname
   \resetmathfonts
   \setleading{#4}%
 }}
@@ -2674,9 +2650,16 @@ end
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% this property, we can check that font parameter. #1 is what to
+% print if we are indeed using \tt; #2 is what to print otherwise.
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font.  Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts.  But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
 
 % Check if internal flag is clear, i.e. has not been @set.
 \def\ifflagclear#1#2#3{%
@@ -2684,8 +2667,6 @@ end
   #2\else#3\fi
 }
 
-
-
 {
 \catcode`\'=\active
 \catcode`\`=\active
@@ -2701,33 +2682,28 @@ end
 % lilypond developers report.  xpdf does work with the regular 0x27.
 %
 \def\codequoteright{%
-  \ifmonospace
-    \ifflagclear{txicodequoteundirected}{%
-      \ifflagclear{codequoteundirected}{%
-        '%
-      }{\char'15 }%
-    }{\char'15 }%
-  \else
-    '%
-  \fi
+  \ifusingtt
+      {\ifflagclear{txicodequoteundirected}%
+          {\ifflagclear{codequoteundirected}%
+              {'}%
+              {\char'15 }}%
+          {\char'15 }}%
+      {'}%
 }
-%
+
 % and a similar option for the left quote char vs. a grave accent.
 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
 % the code environments to do likewise.
+% \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
-  \ifmonospace
-    \ifflagclear{txicodequotebacktick}{%
-      \ifflagclear{codequotebacktick}{%
-        % [Knuth] pp. 380,381,391
-        % \relax disables Spanish ligatures ?` and !` of \tt font.
-        \relax`%
-      }{\char'22 }%
-    }{\char'22 }%
-  \else
-    \relax`%
-  \fi
+  \ifusingtt
+      {\ifflagclear{txicodequotebacktick}%
+          {\ifflagclear{codequotebacktick}%
+              {\relax`}%
+              {\char'22 }}%
+          {\char'22 }}%
+      {\relax`}%
 }
 
 % Commands to set the quote options.
@@ -2806,12 +2782,11 @@ end
 \def\var#1{%
   \let\saveaftersmartic = \aftersmartic
   \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
-  \ifusingtt{%
-    \ifflagclear{txicodevaristt}%
-       {{\sl #1}}%
-       {{\ttsl #1}}%
-  }{{\sl #1}}%
-  \smartitaliccorrection
+  %
+  \ifflagclear{txicodevaristt}%
+    {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
+    {\def\varnext{\smartslanted{#1}}}%
+  \varnext
 }
 
 % To be removed after next release
@@ -2847,24 +2822,51 @@ end
 \def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
 \def\restorehyphenation{\hyphenchar\font = `- }
 
+\newif\iffrenchspacing
+\frenchspacingfalse
+
 % Set sfcode to normal for the chars that usually have another value.
 % Can't use plain's \frenchspacing because it uses the `\x notation, and
 % sometimes \x has an active definition that messes things up.
 %
 \catcode`@=11
   \def\plainfrenchspacing{%
-    \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
-    \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
-    \def\endofsentencespacefactor{1000}% for @. and friends
+    \iffrenchspacing\else
+      \frenchspacingtrue
+      \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+      \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
+      \def\endofsentencespacefactor{1000}% for @. and friends
+    \fi
   }
   \def\plainnonfrenchspacing{%
-    \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
-    \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
-    \def\endofsentencespacefactor{3000}% for @. and friends
+    \iffrenchspacing
+      \frenchspacingfalse
+       \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+       \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+       \def\endofsentencespacefactor{3000}% for @. and friends
+    \fi
   }
 \catcode`@=\other
 \def\endofsentencespacefactor{3000}% default
 
+% @frenchspacing on|off  says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\let\frenchspacingsetting\plainnonfrenchspacing % used in output routine
+\parseargdef\frenchspacing{%
+  \def\temp{#1}%
+  \ifx\temp\onword \let\frenchspacingsetting\plainfrenchspacing
+  \else\ifx\temp\offword \let\frenchspacingsetting\plainnonfrenchspacing
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+  \fi\fi
+  \frenchspacingsetting
+}
+
+
 % @t, explicit typewriter.
 \def\t#1{%
   {\tt \defcharsdefault \plainfrenchspacing #1}%
@@ -3401,8 +3403,8 @@ $$%
 \let\atchar=\@
 
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
-\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
+\def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
 \let\{=\lbracechar
 \let\}=\rbracechar
 
@@ -3549,7 +3551,7 @@ $$%
 
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
-\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
+\def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
 
 % @euro{} comes from a separate font, depending on the current style.
 % We use the free feym* fonts from the eurosym package by Henrik
@@ -3663,18 +3665,17 @@ $$%
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifmonospace
-    % typewriter:
-    \font\thisecfont = #1ctt\ecsize \space at \nominalsize
-  \else
-    \ifx\curfontstyle\bfstylename
-      % bold:
-      \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
-    \else
-      % regular:
-      \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
-    \fi
-  \fi
+  \ifusingtt
+      % typewriter:
+     {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
+  % else
+     {\ifx\curfontstyle\bfstylename
+        % bold:
+        \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+      \else
+        % regular:
+        \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+      \fi}%
   \thisecfont
 }
 
@@ -3707,11 +3708,11 @@ $$%
 % only change font for tt for correct kerning and to avoid using
 % \ecfont unless necessary.
 \def\quotedblleft{%
-  \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi
+  \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
 }
 
 \def\quotedblright{%
-  \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+  \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
 }
 
 
@@ -3841,15 +3842,16 @@ $$%
 \newtoks\oddfootline     % footline on odd pages
 
 % Now make \makeheadline and \makefootline in Plain TeX use those variables
-\headline={{\textfonts\rm
+\headline={{\textfonts\rm\frenchspacingsetting
             \ifchapterpage
               \ifodd\pageno\the\oddchapheadline\else\the\evenchapheadline\fi
             \else
               \ifodd\pageno\the\oddheadline\else\the\evenheadline\fi
             \fi}}
 
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
-                            \else \the\evenfootline \fi}\HEADINGShook}
+\footline={{\textfonts\rm\frenchspacingsetting
+            \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}%
+           \HEADINGShook}
 \let\HEADINGShook=\relax
 
 % Commands to set those variables.
@@ -4363,8 +4365,7 @@ $$%
 % undo it ourselves.
 \def\headitemfont{\b}% for people to use in the template row; not changeable
 \def\headitem{%
-  \checkenv\multitable
-  \crcr
+  \crcr % must appear first
   \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
   \global\everytab={\bf}% can't use \headitemfont since the parsing differs
   \the\everytab % for the first item
@@ -6767,6 +6768,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \ifnum\romancount=0 \global\romancount=\pagecount \fi
 }
 
+% \raggedbottom in plain.tex hardcodes \topskip so override it
+\catcode`\@=11
+\def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
+\catcode`\@=\other
+
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
 %
@@ -7127,7 +7133,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   % collide with the section heading.
   \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
   %
-  \setbox\groupbox=\vbox\bgroup
+  \setbox\groupbox=\vtop\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
       \hbox\bgroup
@@ -7813,6 +7819,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Print arguments.  Use slanted for @def*, typewriter for @deftype*.
 \def\defunargs#1{%
   \df \ifdoingtypefn \tt \else \sl \fi
+  \ifflagclear{txicodevaristt}{}%
+    {\def\var##1{{\setregularquotes \ttsl ##1}}}%
   #1%
 }
 
@@ -9323,6 +9331,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \imagexxx #1,,,,,\finish
   \fi
 }
+
+% Approximate height of a line in the standard text font.
+\newdimen\capheight
+\setbox0=\vbox{\tenrm H}
+\capheight=\ht0
+
 %
 % Arguments to @image:
 % #1 is (mandatory) image filename; we tack on .eps extension.
@@ -9337,13 +9351,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \makevalueexpandable
   \ifvmode
     \imagevmodetrue
-  \else \ifx\centersub\centerV
-    % for @center @image, we need a vbox so we can have our vertical space
-    \imagevmodetrue
-    \vbox\bgroup % vbox has better behavior than vtop here
-  \fi\fi
-  %
-  \ifimagevmode
     \medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
@@ -9352,17 +9359,20 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     %
     % Place image in a \vtop for a top page margin that is (close to) correct,
     % as \topskip glue is relative to the first baseline.
-    \vtop\bgroup\hrule height 0pt\vskip-\parskip
+    \vtop\bgroup \kern -\capheight \vskip-\parskip
   \fi
   %
-  % Enter horizontal mode so that indentation from an enclosing
-  %  environment such as @quotation is respected.
-  % However, if we're at the top level, we don't want the
-  %  normal paragraph indentation.
-  % On the other hand, if we are in the case of @center @image, we don't
-  %  want to start a paragraph, which will create a hsize-width box and
-  %  eradicate the centering.
-  \ifx\centersub\centerV \else \imageindent \fi
+  \ifx\centersub\centerV
+    % For @center @image, enter vertical mode and add vertical space
+    % Enter an extra \parskip because @center doesn't add space itself.
+    \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
+  \else
+    % Enter horizontal mode so that indentation from an enclosing
+    %  environment such as @quotation is respected.
+    % However, if we're at the top level, we don't want the
+    %  normal paragraph indentation.
+    \imageindent
+  \fi
   %
   % Output the image.
   \ifpdf
@@ -9387,7 +9397,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \egroup
     \medskip  % space after a standalone image
   \fi
-  \ifx\centersub\centerV \egroup \fi
+  \ifx\centersub\centerV % @center @image
+    \medskip
+    \egroup % close \vbox
+  \fi
 \endgroup}
 
 
@@ -11399,7 +11412,129 @@ directory should work if nowhere else does.}
 % Default value of \hfuzz, for suppressing warnings about overfull hboxes.
 \hfuzz = 1pt
 
-\ifx\eTeXversion\thisisundefined\else \lastlinefit=500 \fi
+
+\message{microtype,}
+
+% protrusion, from Thanh's protcode.tex.
+\def\mtsetprotcode#1{%
+  \rpcode#1`\!=200  \rpcode#1`\,=700  \rpcode#1`\-=700  \rpcode#1`\.=700
+  \rpcode#1`\;=500  \rpcode#1`\:=500  \rpcode#1`\?=200
+  \rpcode#1`\'=700
+  \rpcode#1 34=500  % ''
+  \rpcode#1 123=300 % --
+  \rpcode#1 124=200 % ---
+  \rpcode#1`\)=50   \rpcode#1`\A=50   \rpcode#1`\F=50   \rpcode#1`\K=50
+  \rpcode#1`\L=50   \rpcode#1`\T=50   \rpcode#1`\V=50   \rpcode#1`\W=50
+  \rpcode#1`\X=50   \rpcode#1`\Y=50   \rpcode#1`\k=50   \rpcode#1`\r=50
+  \rpcode#1`\t=50   \rpcode#1`\v=50   \rpcode#1`\w=50   \rpcode#1`\x=50
+  \rpcode#1`\y=50
+  %
+  \lpcode#1`\`=700
+  \lpcode#1 92=500  % ``
+  \lpcode#1`\(=50   \lpcode#1`\A=50   \lpcode#1`\J=50   \lpcode#1`\T=50
+  \lpcode#1`\V=50   \lpcode#1`\W=50   \lpcode#1`\X=50   \lpcode#1`\Y=50
+  \lpcode#1`\v=50   \lpcode#1`\w=50   \lpcode#1`\x=50   \lpcode#1`\y=0
+  %
+  \mtadjustprotcode#1\relax
+}
+
+\def\mtadjustprotcode#1{%
+  \countA=0
+  \loop
+    \ifcase\lpcode#1\countA\else
+      \mtadjustcp\lpcode#1\countA
+    \fi
+    \ifcase\rpcode#1\countA\else
+      \mtadjustcp\rpcode#1\countA
+    \fi
+    \advance\countA 1
+  \ifnum\countA < 256 \repeat
+}
+
+\newcount\countB
+\def\mtadjustcp#1#2#3{%
+  \setbox\boxA=\hbox{%
+    \ifx#2\font\else#2\fi
+    \char#3}%
+  \countB=\wd\boxA
+  \multiply\countB #1#2#3\relax
+  \divide\countB \fontdimen6 #2\relax
+  #1#2#3=\countB\relax
+}
+
+\ifx\XeTeXrevision\thisisundefined
+  \ifx\luatexversion\thisisundefined
+    \ifpdf % pdfTeX
+      \mtsetprotcode\textrm
+      \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
+    \else % TeX
+      \def\mtfontexpand#1{}
+    \fi
+  \else % LuaTeX
+    \mtsetprotcode\textrm
+    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+  \fi
+\else % XeTeX
+  \mtsetprotcode\textrm
+  \def\mtfontexpand#1{}
+\fi
+
+
+\newif\ifmicrotype
+
+\def\microtypeON{%
+  \microtypetrue
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=2
+        \pdfprotrudechars=2
+      \fi
+    \else % LuaTeX
+      \adjustspacing=2
+      \protrudechars=2
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=2
+  \fi
+  %
+  \mtfontexpand\textrm
+  \mtfontexpand\textsl
+  \mtfontexpand\textbf
+}
+
+\def\microtypeOFF{%
+  \microtypefalse
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=0
+        \pdfprotrudechars=0
+      \fi
+    \else % LuaTeX
+      \adjustspacing=0
+      \protrudechars=0
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=0
+  \fi
+}
+
+\microtypeON
+
+\parseargdef\microtype{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\onword
+    \microtypeON
+  \else\ifx\txiarg\offword
+    \microtypeOFF
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
+  \fi\fi
+}
 
 
 \message{and turning on texinfo input format.}
@@ -11421,23 +11556,6 @@ directory should work if nowhere else does.}
 \catcode`\|=\other \def\normalverticalbar{|}
 \catcode`\~=\other \def\normaltilde{~}
 
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise.  Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font.  Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts.  But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
 % Set catcodes for Texinfo file
 
 % Active characters for printing the wanted glyph.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 3f541041..a968e867 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-15         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * texinfo.tex: Updated from GNULIB.
+
 2022-10-14         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawktexi.in (Statements/Lines): Add a pointer to the bug list
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 6e3de226..9ad8fafc 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2022-09-01.06}
+\def\texinfoversion{2022-10-01.15}
 %
 % Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
 %
@@ -314,16 +314,8 @@
 \newbox\footlinebox
 
 % When outputting the double column layout for indices, an output routine
-% is run several times, which hides the original value of \topmark.  This
-% can lead to a page heading being output and duplicating the chapter heading
-% of the index.  Hence, save the contents of \topmark at the beginning of
-% the output routine.  The saved contents are valid until we actually
-% \shipout a page.
-%
-% (We used to run a short output routine to actually set \topmark and
-% \firstmark to the right values, but if this was called with an empty page
-% containing whatsits for writing index entries, the whatsits would be thrown
-% away and the index auxiliary file would remain empty.)
+% is run several times, hiding the original value of \topmark.  Hence, save
+% \topmark at the beginning.
 %
 \newtoks\savedtopmark
 \newif\iftopmarksaved
@@ -348,15 +340,9 @@
   %
   \checkchapterpage
   %
-  % Retrieve the information for the headings from the marks in the page,
-  % and call Plain TeX's \makeheadline and \makefootline, which use the
-  % values in \headline and \footline.
-  %
-  % Common context changes for both heading and footing.
-  % Do this outside of the \shipout so @code etc. will be expanded in
-  % the headline as they should be, not taken literally (outputting ''code).
+  % Make the heading and footing.  \makeheadline and \makefootline
+  % use the contents of \headline and \footline.
   \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
-  %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
   \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
@@ -614,21 +600,6 @@
 % @? is an end-of-sentence query.
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
-% @frenchspacing on|off  says whether to put extra space after punctuation.
-%
-\def\onword{on}
-\def\offword{off}
-%
-\parseargdef\frenchspacing{%
-  \def\temp{#1}%
-  \ifx\temp\onword \plainfrenchspacing
-  \else\ifx\temp\offword \plainnonfrenchspacing
-  \else
-    \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
-  \fi\fi
-}
-
 % @w prevents a word break.  Without the \leavevmode, @w at the
 % beginning of a paragraph, when TeX is still in vertical mode, would
 % produce a whole line of output instead of starting the paragraph.
@@ -2573,34 +2544,30 @@ end
   \scriptfont\sffam=\sevensf
 }
 
-%
 
-% The font-changing commands (all called \...fonts) redefine the meanings
-% of \STYLEfont, instead of just \STYLE.  We do this because \STYLE needs
-% to also set the current \fam for math mode.  Our \STYLE (e.g., \rm)
-% commands hardwire \STYLEfont to set the current font.
-%
-% The fonts used for \ifont are for "math italics"  (\itfont is for italics
-% in regular text).  \syfont is also used in math mode only.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
+
+% \defineassignfonts{SIZE} -
+%   Define sequence \assignfontsSIZE, which switches between font sizes
+% by redefining the meanings of \STYLEfont.  (Just \STYLE additionally sets
+% the current \fam for math mode.)
 %
+\def\defineassignfonts#1{%
+  \expandafter\edef\csname assignfonts#1\endcsname{%
+    \let\noexpand\rmfont\csname #1rm\endcsname
+    \let\noexpand\itfont\csname #1it\endcsname
+    \let\noexpand\slfont\csname #1sl\endcsname
+    \let\noexpand\bffont\csname #1bf\endcsname
+    \let\noexpand\ttfont\csname #1tt\endcsname
+    \let\noexpand\smallcaps\csname #1sc\endcsname
+    \let\noexpand\sffont  \csname #1sf\endcsname
+    \let\noexpand\ifont   \csname #1i\endcsname
+    \let\noexpand\syfont  \csname #1sy\endcsname
+    \let\noexpand\ttslfont\csname #1ttsl\endcsname
+  }
+}
 
 \def\assignfonts#1{%
-  \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
-  \expandafter\let\expandafter\itfont\csname #1it\endcsname
-  \expandafter\let\expandafter\slfont\csname #1sl\endcsname
-  \expandafter\let\expandafter\bffont\csname #1bf\endcsname
-  \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
-  \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
-  \expandafter\let\expandafter\sffont  \csname #1sf\endcsname
-  \expandafter\let\expandafter\ifont   \csname #1i\endcsname
-  \expandafter\let\expandafter\syfont  \csname #1sy\endcsname
-  \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+  \csname assignfonts#1\endcsname
 }
 
 \newif\ifrmisbold
@@ -2624,12 +2591,21 @@ end
    \csname\curfontstyle\endcsname
 }%
 
+% Define the font-changing commands (all called \...fonts).
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower).  These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
+%
+% Note: The fonts used for \ifont are for "math italics"  (\itfont is for
+% italics in regular text).  \syfont is also used in math mode only.
+%
 \def\definefontsetatsize#1#2#3#4#5{%
+  \defineassignfonts{#1}%
 \expandafter\def\csname #1fonts\endcsname{%
   \def\curfontsize{#1}%
   \def\lsize{#2}\def\lllsize{#3}%
   \csname rmisbold#5\endcsname
-  \assignfonts{#1}%
+  \csname assignfonts#1\endcsname
   \resetmathfonts
   \setleading{#4}%
 }}
@@ -2674,9 +2650,16 @@ end
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% this property, we can check that font parameter. #1 is what to
+% print if we are indeed using \tt; #2 is what to print otherwise.
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font.  Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts.  But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
 
 % Check if internal flag is clear, i.e. has not been @set.
 \def\ifflagclear#1#2#3{%
@@ -2684,8 +2667,6 @@ end
   #2\else#3\fi
 }
 
-
-
 {
 \catcode`\'=\active
 \catcode`\`=\active
@@ -2701,33 +2682,28 @@ end
 % lilypond developers report.  xpdf does work with the regular 0x27.
 %
 \def\codequoteright{%
-  \ifmonospace
-    \ifflagclear{txicodequoteundirected}{%
-      \ifflagclear{codequoteundirected}{%
-        '%
-      }{\char'15 }%
-    }{\char'15 }%
-  \else
-    '%
-  \fi
+  \ifusingtt
+      {\ifflagclear{txicodequoteundirected}%
+          {\ifflagclear{codequoteundirected}%
+              {'}%
+              {\char'15 }}%
+          {\char'15 }}%
+      {'}%
 }
-%
+
 % and a similar option for the left quote char vs. a grave accent.
 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
 % the code environments to do likewise.
+% \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
-  \ifmonospace
-    \ifflagclear{txicodequotebacktick}{%
-      \ifflagclear{codequotebacktick}{%
-        % [Knuth] pp. 380,381,391
-        % \relax disables Spanish ligatures ?` and !` of \tt font.
-        \relax`%
-      }{\char'22 }%
-    }{\char'22 }%
-  \else
-    \relax`%
-  \fi
+  \ifusingtt
+      {\ifflagclear{txicodequotebacktick}%
+          {\ifflagclear{codequotebacktick}%
+              {\relax`}%
+              {\char'22 }}%
+          {\char'22 }}%
+      {\relax`}%
 }
 
 % Commands to set the quote options.
@@ -2806,12 +2782,11 @@ end
 \def\var#1{%
   \let\saveaftersmartic = \aftersmartic
   \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
-  \ifusingtt{%
-    \ifflagclear{txicodevaristt}%
-       {{\sl #1}}%
-       {{\ttsl #1}}%
-  }{{\sl #1}}%
-  \smartitaliccorrection
+  %
+  \ifflagclear{txicodevaristt}%
+    {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
+    {\def\varnext{\smartslanted{#1}}}%
+  \varnext
 }
 
 % To be removed after next release
@@ -2847,24 +2822,51 @@ end
 \def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
 \def\restorehyphenation{\hyphenchar\font = `- }
 
+\newif\iffrenchspacing
+\frenchspacingfalse
+
 % Set sfcode to normal for the chars that usually have another value.
 % Can't use plain's \frenchspacing because it uses the `\x notation, and
 % sometimes \x has an active definition that messes things up.
 %
 \catcode`@=11
   \def\plainfrenchspacing{%
-    \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
-    \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
-    \def\endofsentencespacefactor{1000}% for @. and friends
+    \iffrenchspacing\else
+      \frenchspacingtrue
+      \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+      \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
+      \def\endofsentencespacefactor{1000}% for @. and friends
+    \fi
   }
   \def\plainnonfrenchspacing{%
-    \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
-    \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
-    \def\endofsentencespacefactor{3000}% for @. and friends
+    \iffrenchspacing
+      \frenchspacingfalse
+       \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+       \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+       \def\endofsentencespacefactor{3000}% for @. and friends
+    \fi
   }
 \catcode`@=\other
 \def\endofsentencespacefactor{3000}% default
 
+% @frenchspacing on|off  says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\let\frenchspacingsetting\plainnonfrenchspacing % used in output routine
+\parseargdef\frenchspacing{%
+  \def\temp{#1}%
+  \ifx\temp\onword \let\frenchspacingsetting\plainfrenchspacing
+  \else\ifx\temp\offword \let\frenchspacingsetting\plainnonfrenchspacing
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+  \fi\fi
+  \frenchspacingsetting
+}
+
+
 % @t, explicit typewriter.
 \def\t#1{%
   {\tt \defcharsdefault \plainfrenchspacing #1}%
@@ -3401,8 +3403,8 @@ $$%
 \let\atchar=\@
 
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
-\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
+\def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
 \let\{=\lbracechar
 \let\}=\rbracechar
 
@@ -3549,7 +3551,7 @@ $$%
 
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
-\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
+\def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
 
 % @euro{} comes from a separate font, depending on the current style.
 % We use the free feym* fonts from the eurosym package by Henrik
@@ -3663,18 +3665,17 @@ $$%
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifmonospace
-    % typewriter:
-    \font\thisecfont = #1ctt\ecsize \space at \nominalsize
-  \else
-    \ifx\curfontstyle\bfstylename
-      % bold:
-      \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
-    \else
-      % regular:
-      \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
-    \fi
-  \fi
+  \ifusingtt
+      % typewriter:
+     {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
+  % else
+     {\ifx\curfontstyle\bfstylename
+        % bold:
+        \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+      \else
+        % regular:
+        \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+      \fi}%
   \thisecfont
 }
 
@@ -3707,11 +3708,11 @@ $$%
 % only change font for tt for correct kerning and to avoid using
 % \ecfont unless necessary.
 \def\quotedblleft{%
-  \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi
+  \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
 }
 
 \def\quotedblright{%
-  \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+  \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
 }
 
 
@@ -3841,15 +3842,16 @@ $$%
 \newtoks\oddfootline     % footline on odd pages
 
 % Now make \makeheadline and \makefootline in Plain TeX use those variables
-\headline={{\textfonts\rm
+\headline={{\textfonts\rm\frenchspacingsetting
             \ifchapterpage
               \ifodd\pageno\the\oddchapheadline\else\the\evenchapheadline\fi
             \else
               \ifodd\pageno\the\oddheadline\else\the\evenheadline\fi
             \fi}}
 
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
-                            \else \the\evenfootline \fi}\HEADINGShook}
+\footline={{\textfonts\rm\frenchspacingsetting
+            \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}%
+           \HEADINGShook}
 \let\HEADINGShook=\relax
 
 % Commands to set those variables.
@@ -4363,8 +4365,7 @@ $$%
 % undo it ourselves.
 \def\headitemfont{\b}% for people to use in the template row; not changeable
 \def\headitem{%
-  \checkenv\multitable
-  \crcr
+  \crcr % must appear first
   \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
   \global\everytab={\bf}% can't use \headitemfont since the parsing differs
   \the\everytab % for the first item
@@ -6767,6 +6768,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \ifnum\romancount=0 \global\romancount=\pagecount \fi
 }
 
+% \raggedbottom in plain.tex hardcodes \topskip so override it
+\catcode`\@=11
+\def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
+\catcode`\@=\other
+
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
 %
@@ -7127,7 +7133,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   % collide with the section heading.
   \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
   %
-  \setbox\groupbox=\vbox\bgroup
+  \setbox\groupbox=\vtop\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
       \hbox\bgroup
@@ -7813,6 +7819,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Print arguments.  Use slanted for @def*, typewriter for @deftype*.
 \def\defunargs#1{%
   \df \ifdoingtypefn \tt \else \sl \fi
+  \ifflagclear{txicodevaristt}{}%
+    {\def\var##1{{\setregularquotes \ttsl ##1}}}%
   #1%
 }
 
@@ -9323,6 +9331,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \imagexxx #1,,,,,\finish
   \fi
 }
+
+% Approximate height of a line in the standard text font.
+\newdimen\capheight
+\setbox0=\vbox{\tenrm H}
+\capheight=\ht0
+
 %
 % Arguments to @image:
 % #1 is (mandatory) image filename; we tack on .eps extension.
@@ -9337,13 +9351,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \makevalueexpandable
   \ifvmode
     \imagevmodetrue
-  \else \ifx\centersub\centerV
-    % for @center @image, we need a vbox so we can have our vertical space
-    \imagevmodetrue
-    \vbox\bgroup % vbox has better behavior than vtop here
-  \fi\fi
-  %
-  \ifimagevmode
     \medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
@@ -9352,17 +9359,20 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     %
     % Place image in a \vtop for a top page margin that is (close to) correct,
     % as \topskip glue is relative to the first baseline.
-    \vtop\bgroup\hrule height 0pt\vskip-\parskip
+    \vtop\bgroup \kern -\capheight \vskip-\parskip
   \fi
   %
-  % Enter horizontal mode so that indentation from an enclosing
-  %  environment such as @quotation is respected.
-  % However, if we're at the top level, we don't want the
-  %  normal paragraph indentation.
-  % On the other hand, if we are in the case of @center @image, we don't
-  %  want to start a paragraph, which will create a hsize-width box and
-  %  eradicate the centering.
-  \ifx\centersub\centerV \else \imageindent \fi
+  \ifx\centersub\centerV
+    % For @center @image, enter vertical mode and add vertical space
+    % Enter an extra \parskip because @center doesn't add space itself.
+    \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
+  \else
+    % Enter horizontal mode so that indentation from an enclosing
+    %  environment such as @quotation is respected.
+    % However, if we're at the top level, we don't want the
+    %  normal paragraph indentation.
+    \imageindent
+  \fi
   %
   % Output the image.
   \ifpdf
@@ -9387,7 +9397,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \egroup
     \medskip  % space after a standalone image
   \fi
-  \ifx\centersub\centerV \egroup \fi
+  \ifx\centersub\centerV % @center @image
+    \medskip
+    \egroup % close \vbox
+  \fi
 \endgroup}
 
 
@@ -11399,7 +11412,129 @@ directory should work if nowhere else does.}
 % Default value of \hfuzz, for suppressing warnings about overfull hboxes.
 \hfuzz = 1pt
 
-\ifx\eTeXversion\thisisundefined\else \lastlinefit=500 \fi
+
+\message{microtype,}
+
+% protrusion, from Thanh's protcode.tex.
+\def\mtsetprotcode#1{%
+  \rpcode#1`\!=200  \rpcode#1`\,=700  \rpcode#1`\-=700  \rpcode#1`\.=700
+  \rpcode#1`\;=500  \rpcode#1`\:=500  \rpcode#1`\?=200
+  \rpcode#1`\'=700
+  \rpcode#1 34=500  % ''
+  \rpcode#1 123=300 % --
+  \rpcode#1 124=200 % ---
+  \rpcode#1`\)=50   \rpcode#1`\A=50   \rpcode#1`\F=50   \rpcode#1`\K=50
+  \rpcode#1`\L=50   \rpcode#1`\T=50   \rpcode#1`\V=50   \rpcode#1`\W=50
+  \rpcode#1`\X=50   \rpcode#1`\Y=50   \rpcode#1`\k=50   \rpcode#1`\r=50
+  \rpcode#1`\t=50   \rpcode#1`\v=50   \rpcode#1`\w=50   \rpcode#1`\x=50
+  \rpcode#1`\y=50
+  %
+  \lpcode#1`\`=700
+  \lpcode#1 92=500  % ``
+  \lpcode#1`\(=50   \lpcode#1`\A=50   \lpcode#1`\J=50   \lpcode#1`\T=50
+  \lpcode#1`\V=50   \lpcode#1`\W=50   \lpcode#1`\X=50   \lpcode#1`\Y=50
+  \lpcode#1`\v=50   \lpcode#1`\w=50   \lpcode#1`\x=50   \lpcode#1`\y=0
+  %
+  \mtadjustprotcode#1\relax
+}
+
+\def\mtadjustprotcode#1{%
+  \countA=0
+  \loop
+    \ifcase\lpcode#1\countA\else
+      \mtadjustcp\lpcode#1\countA
+    \fi
+    \ifcase\rpcode#1\countA\else
+      \mtadjustcp\rpcode#1\countA
+    \fi
+    \advance\countA 1
+  \ifnum\countA < 256 \repeat
+}
+
+\newcount\countB
+\def\mtadjustcp#1#2#3{%
+  \setbox\boxA=\hbox{%
+    \ifx#2\font\else#2\fi
+    \char#3}%
+  \countB=\wd\boxA
+  \multiply\countB #1#2#3\relax
+  \divide\countB \fontdimen6 #2\relax
+  #1#2#3=\countB\relax
+}
+
+\ifx\XeTeXrevision\thisisundefined
+  \ifx\luatexversion\thisisundefined
+    \ifpdf % pdfTeX
+      \mtsetprotcode\textrm
+      \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
+    \else % TeX
+      \def\mtfontexpand#1{}
+    \fi
+  \else % LuaTeX
+    \mtsetprotcode\textrm
+    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+  \fi
+\else % XeTeX
+  \mtsetprotcode\textrm
+  \def\mtfontexpand#1{}
+\fi
+
+
+\newif\ifmicrotype
+
+\def\microtypeON{%
+  \microtypetrue
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=2
+        \pdfprotrudechars=2
+      \fi
+    \else % LuaTeX
+      \adjustspacing=2
+      \protrudechars=2
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=2
+  \fi
+  %
+  \mtfontexpand\textrm
+  \mtfontexpand\textsl
+  \mtfontexpand\textbf
+}
+
+\def\microtypeOFF{%
+  \microtypefalse
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=0
+        \pdfprotrudechars=0
+      \fi
+    \else % LuaTeX
+      \adjustspacing=0
+      \protrudechars=0
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=0
+  \fi
+}
+
+\microtypeON
+
+\parseargdef\microtype{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\onword
+    \microtypeON
+  \else\ifx\txiarg\offword
+    \microtypeOFF
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
+  \fi\fi
+}
 
 
 \message{and turning on texinfo input format.}
@@ -11421,23 +11556,6 @@ directory should work if nowhere else does.}
 \catcode`\|=\other \def\normalverticalbar{|}
 \catcode`\~=\other \def\normaltilde{~}
 
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise.  Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font.  Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts.  But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
 % Set catcodes for Texinfo file
 
 % Active characters for printing the wanted glyph.

-----------------------------------------------------------------------

Summary of changes:
 build-aux/ChangeLog         |   4 +
 build-aux/config.guess      |  10 +-
 build-aux/config.sub        |  29 ++-
 build-aux/texinfo.tex       | 428 ++++++++++++++++++++++++++++----------------
 doc/ChangeLog               |   4 +
 doc/texinfo.tex             | 428 ++++++++++++++++++++++++++++----------------
 support/ChangeLog           |   5 +
 support/intprops-internal.h | 392 ++++++++++++++++++++++++++++++++++++++++
 support/intprops.h          | 359 +++----------------------------------
 support/localeinfo.c        |   2 +-
 support/verify.h            |  39 ++--
 11 files changed, 1038 insertions(+), 662 deletions(-)
 create mode 100644 support/intprops-internal.h


hooks/post-receive
-- 
gawk



reply via email to

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