+2008-10-28 Eric Blake <ebb9@byu.net>
+
+ Allow m4sugar to be used without autom4te, such as in bison.
+ * lib/m4sugar/m4sugar.m4 (m4_text_wrap, m4_qlen): Document that
+ alternate escape sequences can be used.
+ (m4_text_box): Likewise. Don't output quadrigraphs.
+ (m4_qdelta): Delete unused macro.
+
2008-10-28 Paolo Bonzini <bonzini@gnu.org>
Add m4_stack_foreach and m4_stack_foreach_lifo.
* tests/m4sugar.at (m4_stack_foreach): New test.
2008-10-28 Paolo Bonzini <bonzini@gnu.org>
-
+
use a shell function for AC_TYPE_INTx_T
* lib/autoconf/types.m4 (_AC_TYPE_INT_BODY, _AC_TYPE_UNSIGNED_INT_BODY):
New.
# FIRST-PREFIX will be left alone on the first line.
#
# No expansion occurs on the contents STRING, PREFIX, or FIRST-PREFIX,
-# although quadrigraphs are correctly recognized.
+# although quadrigraphs are correctly recognized. More precisely,
+# you may redefine m4_qlen to recognize whatever escape sequences that
+# you will post-process.
#
# Typical outputs are:
#
# ## MESSAGE ##
# ## ------- ##
# using FRAME-CHARACTER in the border.
+#
+# Quadrigraphs are correctly recognized. More precisely, you may
+# redefine m4_qlen to recognize whatever escape sequences that you
+# will post-process.
m4_define([m4_text_box],
[m4_pushdef([m4_Border],
m4_translit(m4_format([%*s], m4_qlen(m4_expand([$1])), []),
[ ], m4_default_quoted([$2], [-])))dnl
-@%:@@%:@ m4_Border @%:@@%:@
-@%:@@%:@ $1 @%:@@%:@
-@%:@@%:@ m4_Border @%:@@%:@_m4_popdef([m4_Border])dnl
-])
+[##] m4_Border [##]
+[##] $1 [##]
+[##] m4_Border [##]_m4_popdef([m4_Border])])
# m4_qlen(STRING)
# ---------------
# Expands to the length of STRING after autom4te converts all quadrigraphs.
#
+# If you use some other means of post-processing m4 output rather than
+# autom4te, then you may redefine this macro to recognize whatever
+# escape sequences your post-processor will handle. For that matter,
+# m4_define([m4_qlen], m4_defn([m4_len])) is sufficient if you don't
+# do any post-processing.
+#
# Avoid bpatsubsts for the common case of no quadrigraphs. Cache
# results, as configure scripts tend to ask about lengths of common
# strings like `/*' and `*/' rather frequently. Minimize the number
[\3]))]))_m4_defn([m4_qlen-$1])])
-# m4_qdelta(STRING)
-# -----------------
-# Expands to the net change in the length of STRING from autom4te converting the
-# quadrigraphs in STRING. This number is always negative or zero.
-m4_define([m4_qdelta],
-[m4_eval(m4_qlen([$1]) - m4_len([$1]))])
-
-
-
## ----------------------- ##
## 13. Number processing. ##
## ----------------------- ##