mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Partial m4sugar merge from autoconf: m4_shiftn.
* data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation. (m4_shift2, m4_shift3): New macros. (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients. * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def) (b4_c_ansi_function_decl, b4_c_function_call): Likewise. * data/java.m4 (b4_remove_comma): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
13
data/c.m4
13
data/c.m4
@@ -1,7 +1,8 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -228,8 +229,8 @@ m4_define([b4_c_function_def],
|
||||
b4_c_ansi_function_def($@)
|
||||
#else
|
||||
$2
|
||||
$1 (b4_c_knr_formal_names(m4_shiftn(2, $@)))
|
||||
b4_c_knr_formal_decls(m4_shiftn(2, $@))
|
||||
$1 (b4_c_knr_formal_names(m4_shift2($@)))
|
||||
b4_c_knr_formal_decls(m4_shift2($@))
|
||||
#endif[]dnl
|
||||
])
|
||||
|
||||
@@ -239,7 +240,7 @@ b4_c_knr_formal_decls(m4_shiftn(2, $@))
|
||||
# Declare the function NAME in ANSI.
|
||||
m4_define([b4_c_ansi_function_def],
|
||||
[$2
|
||||
$1 (b4_c_ansi_formals(m4_shiftn(2, $@)))[]dnl
|
||||
$1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
|
||||
])
|
||||
|
||||
|
||||
@@ -301,7 +302,7 @@ $2 $1 ();
|
||||
# ----------------------------------------------------------------
|
||||
# Declare the function NAME.
|
||||
m4_define([b4_c_ansi_function_decl],
|
||||
[$2 $1 (b4_c_ansi_formals(m4_shiftn(2, $@)));[]dnl
|
||||
[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl
|
||||
])
|
||||
|
||||
|
||||
@@ -316,7 +317,7 @@ m4_define([b4_c_ansi_function_decl],
|
||||
# -----------------------------------------------------------
|
||||
# Call the function NAME with arguments NAME1, NAME2 etc.
|
||||
m4_define([b4_c_function_call],
|
||||
[$1 (b4_c_args(m4_shiftn(2, $@)))[]dnl
|
||||
[$1 (b4_c_args(m4_shift2($@)))[]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user