]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sugar.m4 (m4_qlen, m4_qdelta): New macros.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Dec 2004 14:40:36 +0000 (14:40 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Dec 2004 14:40:36 +0000 (14:40 +0000)
* lib/autotest/general.m4 (AT_SETUP): Use m4_qdelta.

ChangeLog
lib/autotest/general.m4
lib/m4sugar/m4sugar.m4

index 4559f9d125edf3debf0adbaf8395cd808e485e48..b2ff8e672d73f0c0f720ca4a180818739edb6d9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index 27ade86da043fcfc03d5494abfc92bb0aae7d0aa..44adef6b1a0851aaa6c1536717465cd94a635d2b 100644 (file)
@@ -1048,8 +1048,8 @@ m4_divert_push([TESTS])dnl
   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
 ])
 
index 7ebf55ebdf85170e0b9b5895dae460332f4caa5d..3cbed975b42be8eff81340457a322c0413e7df0e 100644 (file)
@@ -3,7 +3,7 @@ divert(-1)#                                                  -*- Autoconf -*-
 # 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
@@ -1615,6 +1615,21 @@ m4_define([m4_text_box],
 ])
 
 
+# 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.  ##