+2004-12-18 Noah Misch <noah@cs.caltech.edu>
+
+ * lib/m4sugar/m4sugar.m4 (m4_qlen, m4_qdelta): New macros.
+ * lib/autotest/general.m4 (AT_SETUP): Use m4_qdelta.
+
2004-12-18 Noah Misch <noah@cs.caltech.edu>
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): New macro.
AT_ordinal ) @%:@ AT_ordinal. m4_defn([AT_line]): $1
at_setup_line='m4_defn([AT_line])'
at_desc='$1'
- $at_quiet $ECHO_N "m4_format([[%3d: %-45s]],
- AT_ordinal, [$1])[]$ECHO_C"
+ $at_quiet $ECHO_N "m4_format([%3d: %-]m4_eval(47 - m4_qdelta([$1]))[s],
+ AT_ordinal, [[$1]])[]$ECHO_C"
m4_divert_push([TEST_SCRIPT])dnl
])
# Base M4 layer.
# Requires GNU M4.
#
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation,
# Inc.
#
# This program is free software; you can redistribute it and/or modify
])
+# m4_qlen(STRING)
+# ---------------
+# Expands to the length of STRING after autom4te converts all quadrigraphs.
+m4_define([m4_qlen],
+[m4_len(m4_bpatsubsts([[$1]], [@\(<:\|:>\|S|\|%:\)@], [P], [@&t@]))])
+
+
+# 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]))])
+
+
## ----------------------- ##
## 10. Number processing. ##