summaryrefslogtreecommitdiff
path: root/m4/m4module.h
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-08-03 22:23:11 -0600
committerEric Blake <ebb9@byu.net>2008-08-03 22:23:11 -0600
commitacb5619a320c331d846e1a4ad51cf9b72829e5c9 (patch)
tree16cc31b278230b7611e1f7aa414a73d1d12b2aad /m4/m4module.h
parentaefa7adecf8d255496f5d06ffa35491c86793d47 (diff)
downloadm4-acb5619a320c331d846e1a4ad51cf9b72829e5c9.tar.gz
Stage 26: Allow embedded NUL in macro definitions.
* m4/m4module.h (m4_arg_len): Add parameter. (M4ARGLEN): Provide default for the parameter. * m4/m4private.h (includes): Share xmemdup0.h among all libm4 files. * m4/macro.c (m4_arg_len): Fail if builtins are not flattened. * m4/syntax.c (includes): Rely on m4private.h for xmemdup0. * m4/symtab.c (includes): Likewise. (m4_symbol_value_copy): Use xmemdup0. * m4/module.c (install_macro_table): Likewise. * src/freeze.c (reload_frozen_state): Likewise. * tests/freeze.at (reloading nul): Enhance test. * tests/null.m4: Likewise. * tests/null.err: Update expected output. * tests/null.out: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'm4/m4module.h')
-rw-r--r--m4/m4module.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/m4module.h b/m4/m4module.h
index 70a062e4..c17c98ab 100644
--- a/m4/m4module.h
+++ b/m4/m4module.h
@@ -165,7 +165,7 @@ struct m4_string_pair
/* Grab the length of the text contents of argument I, or abort if the
argument is not text. Assumes that `m4 *context' and
`m4_macro_args *argv' are in scope. */
-#define M4ARGLEN(i) m4_arg_len (context, argv, i)
+#define M4ARGLEN(i) m4_arg_len (context, argv, i, false)
extern bool m4_bad_argc (m4 *, size_t, const m4_call_info *, size_t,
size_t, bool);
@@ -362,7 +362,7 @@ extern const char *m4_arg_text (m4 *, m4_macro_args *, size_t, bool);
extern bool m4_arg_equal (m4 *, m4_macro_args *, size_t,
size_t);
extern bool m4_arg_empty (m4_macro_args *, size_t);
-extern size_t m4_arg_len (m4 *, m4_macro_args *, size_t);
+extern size_t m4_arg_len (m4 *, m4_macro_args *, size_t, bool);
extern m4_builtin_func *m4_arg_func (m4_macro_args *, size_t);
extern m4_obstack *m4_arg_scratch (m4 *);
extern m4_macro_args *m4_make_argv_ref (m4 *, m4_macro_args *, const char *,