mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
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:
11
src/system.h
11
src/system.h
@@ -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. |
|
||||
|
||||
Reference in New Issue
Block a user