* data/c.m4 (b4_null, b4_case): Define.

* src/output.c (prepare_symbols): Use b4_null.
(user_actions_output): Use b4_case.
This commit is contained in:
Paul Eggert
2006-09-12 17:26:02 +00:00
parent aef3da8689
commit 8e1687aef6
3 changed files with 30 additions and 14 deletions

View File

@@ -81,7 +81,6 @@ m4_define([b4_identification],
])
## ---------------- ##
## Default values. ##
## ---------------- ##
@@ -100,7 +99,6 @@ m4_define_default([b4_location_initial_line], [1])
## Pure/impure interfaces. ##
## ------------------------ ##
# b4_user_args
# ------------
m4_define([b4_user_args],
@@ -137,11 +135,11 @@ m4_define([b4_parse_param_use],
])dnl
])
## ------------ ##
## Data Types. ##
## ------------ ##
# b4_ints_in(INT1, INT2, LOW, HIGH)
# ---------------------------------
# Return 1 iff both INT1 and INT2 are in [LOW, HIGH], 0 otherwise.
@@ -173,6 +171,17 @@ m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
## ---------##
## Values. ##
## ---------##
# b4_null
---------
# Return a null pointer constant. NULL infringes on the user name
# space in C, so use 0 rather than NULL.
m4_define([b4_null], [0])
## ------------------ ##
## Decoding options. ##
## ------------------ ##
@@ -458,6 +467,13 @@ b4_define_user_code([stype])
## User actions. ##
## -------------- ##
# b4_case(LABEL, STATEMENTS)
# --------------------------
m4_define([b4_case],
[ case $1:
$2
break;])
# b4_symbol_actions(FILENAME, LINENO,
# SYMBOL-TAG, SYMBOL-NUM,
# SYMBOL-ACTION, SYMBOL-TYPENAME)