Also handle the output file (--verbose) with obstacks.

* files.c (foutput): Remove.
(output_obstack): New.
Adjust all dependencies.
* src/conflicts.c: Return a string.
* src/system.h (obstack_grow_string): Rename as...
(obstack_sgrow): this.  Be ready to work with non literals.
(obstack_fgrow4): New.
This commit is contained in:
Akim Demaille
2000-12-20 17:21:14 +00:00
parent 956dba3a7c
commit ff4423cc28
9 changed files with 242 additions and 206 deletions

View File

@@ -145,8 +145,8 @@ typedef int bool;
#define obstack_chunk_free free
#include "obstack.h"
#define obstack_grow_string(Obs, Str) \
obstack_grow (Obs, Str, sizeof (Str) - 1)
#define obstack_sgrow(Obs, Str) \
obstack_grow (Obs, Str, strlen (Str))
#define obstack_fgrow1(Obs, Format, Arg1) \
do { \
@@ -169,6 +169,13 @@ do { \
obstack_grow (Obs, buf, strlen (buf)); \
} while (0)
#define obstack_fgrow4(Obs, Format, Arg1, Arg2, Arg3, Arg4) \
do { \
char buf[4096]; \
sprintf (buf, Format, Arg1, Arg2, Arg3, Arg4); \
obstack_grow (Obs, buf, strlen (buf)); \
} while (0)
/*---------------------------------.
| Machine-dependencies for Bison. |