CVSROOT: /sources/m4 Module name: m4 Changes by: Eric Blake <ericb> 06/10/27 04:03:28
Index: m4/macro.c =================================================================== RCS file: /sources/m4/m4/m4/macro.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -b -r1.60 -r1.61 --- m4/macro.c 25 Oct 2006 12:45:45 -0000 1.60 +++ m4/macro.c 27 Oct 2006 04:03:28 -0000 1.61 @@ -95,7 +95,7 @@ m4__token_type type, m4_symbol_value *token) { m4_symbol *symbol; - char *text = (m4_is_symbol_value_text (token) + const char *text = (m4_is_symbol_value_text (token) ? m4_get_symbol_value_text (token) : NULL); switch (type) @@ -115,7 +115,7 @@ case M4_TOKEN_WORD: { - unsigned char *textp = text; + const unsigned char *textp = text; if (m4_has_syntax (M4SYNTAX, *textp, M4_SYNTAX_ESCAPE)) ++textp; @@ -153,7 +153,7 @@ { m4__token_type type; m4_symbol_value token; - unsigned char *text; + const unsigned char *text; int paren_level = 0; const char *file = m4_get_current_file (context); int line = m4_get_current_line (context); @@ -237,7 +237,7 @@ static void expand_macro (m4 *context, const char *name, m4_symbol *symbol) { - char *argc_base; /* Base of argc_stack on entry. */ + char *argc_base = NULL; /* Base of argc_stack on entry. */ unsigned int argc_size; /* Size of argc_stack on entry. */ unsigned int argv_size; /* Size of argv_stack on entry. */ m4_symbol_value **argv; @@ -293,7 +293,8 @@ argc = ((obstack_object_size (&argv_stack) - argv_size) / sizeof (m4_symbol_value *)); - argv = (m4_symbol_value **) (obstack_base (&argv_stack) + argv_size); + argv = (m4_symbol_value **) ((char *) obstack_base (&argv_stack) + + argv_size); /* Calling collect_arguments invalidated name, but we copied it as argv[0]. */ name = m4_get_symbol_value_text (argv[0]);