mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
* src/main.c: Include macrotab.h.
* src/macrotab.h (macro_entry_s): Constify fields. Adjust functions prototypes. * src/macrotab.c (macro_insert): Constify key and value. (macro_find): Constify key. (macro_insert): Include 'xalloc.h' (macro_insert): Use XMALLOC. (macro_find): Constify return value. * src/output.c (output_table_data): Rename table to table_data. (output_parser): Constify macro_key, macro_value.
This commit is contained in:
@@ -130,7 +130,7 @@ struct obstack output_obstack;
|
||||
|
||||
static inline void
|
||||
output_table_data (struct obstack* oout,
|
||||
short* table,
|
||||
short* table_data,
|
||||
short first,
|
||||
short begin,
|
||||
short end)
|
||||
@@ -149,7 +149,7 @@ output_table_data (struct obstack* oout,
|
||||
}
|
||||
else
|
||||
++j;
|
||||
obstack_fgrow1 (oout, "%6d", table[i]);
|
||||
obstack_fgrow1 (oout, "%6d", table_data[i]);
|
||||
}
|
||||
obstack_1grow (oout, 0);
|
||||
}
|
||||
@@ -984,8 +984,8 @@ output_parser (void)
|
||||
else if ((c = getc (fskel)) == '%')
|
||||
{
|
||||
/* Read the macro. */
|
||||
char* macro_key = 0;
|
||||
char* macro_value = 0;
|
||||
const char* macro_key = 0;
|
||||
const char* macro_value = 0;
|
||||
while (isalnum (c = getc (fskel)) || c == '_')
|
||||
obstack_1grow (¯o_obstack, c);
|
||||
obstack_1grow (¯o_obstack, 0);
|
||||
|
||||
Reference in New Issue
Block a user