summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b0cfa28)
obstack. It was done too late here.
* src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
completely wrong.
(reader): Initialize the macro obstack here, since we need it to grow
'%define' directives.
* src/reader.h: Declare the macro obstack as extern.
+2001-08-27 Robert Anisko <robert.anisko@epita.fr>
+
+ * src/output.c (output): Remove the initialization of the macro
+ obstack. It was done too late here.
+
+ * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
+ completely wrong.
+ (reader): Initialize the macro obstack here, since we need it to grow
+ '%define' directives.
+
+ * src/reader.h: Declare the macro obstack as extern.
+
2001-08-27 Robert Anisko <robert.anisko@epita.fr>
* src/output.c (output_parser): Fix. Store single '%' characters in
2001-08-27 Robert Anisko <robert.anisko@epita.fr>
* src/output.c (output_parser): Fix. Store single '%' characters in
- obstack_init (¯o_obstack);
obstack_init (&output_obstack);
#if 0
obstack_init (&output_obstack);
#if 0
int ch = ungetc (skip_white_space (), finput);
char* macro_key;
char* macro_value;
int ch = ungetc (skip_white_space (), finput);
char* macro_key;
char* macro_value;
- struct obstack macro_obstack;
-
- obstack_init (¯o_obstack);
/* Read key. */
if (!isalpha (ch) && ch != '_')
/* Read key. */
if (!isalpha (ch) && ch != '_')
return;
}
copy_identifier (finput, ¯o_obstack);
return;
}
copy_identifier (finput, ¯o_obstack);
+ obstack_1grow (¯o_obstack, 0);
macro_key = obstack_finish (¯o_obstack);
/* Read value. */
macro_key = obstack_finish (¯o_obstack);
/* Read value. */
else
fatal (_("Premature EOF after %s"), "\"");
}
else
fatal (_("Premature EOF after %s"), "\"");
}
- copy_string (finput, ¯o_obstack, '"');
+ copy_string2 (finput, ¯o_obstack, '"', 0);
+ obstack_1grow (¯o_obstack, 0);
macro_value = obstack_finish (¯o_obstack);
macro_value = obstack_finish (¯o_obstack);
- obstack_free (¯o_obstack, 0);
-
/* Store the (key, value) pair in the environment. */
macro_insert (macro_key, macro_value);
}
/* Store the (key, value) pair in the environment. */
macro_insert (macro_key, macro_value);
}
+ /* Initialize the macro obstack. */
+ obstack_init (¯o_obstack);
+
/* Initialize the symbol table. */
tabinit ();
/* Initialize the symbol table. */
tabinit ();
extern char **tags;
extern short *user_toknums;
extern char **tags;
extern short *user_toknums;
+extern struct obstack macro_obstack;
+