Partial m4sugar merge from autoconf: m4_map.

* data/m4sugar/m4sugar.m4 (m4_fst): Delete.
(m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
(m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
* data/java.m4 (b4_token_enums): Use more efficient short-circuit
for empty list.
* data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
Likewise.
(b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
declares it.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake
2008-08-15 10:59:32 -06:00
parent 8dce3875bc
commit 6bbb2ed5ef
4 changed files with 99 additions and 30 deletions

View File

@@ -106,7 +106,7 @@ m4_define([b4_token_enum],
# -----------------------------------------------------
# Output the definition of the tokens (if there are) as enums.
m4_define([b4_token_enums],
[m4_if([$@], [[]], [],
[m4_if([$#$1], [1], [],
[/* Tokens. */
m4_map([b4_token_enum], [$@])])
])