mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
use obstack_printf
This is not just nicer, it is also much safer, since we were using sprintf... * bootstrap.conf: Require it. * src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3) (obstack_fgrow4): Remove. Adjust dependencies.
This commit is contained in:
@@ -70,7 +70,7 @@ Name (char const *name, \
|
||||
int i; \
|
||||
int j = 1; \
|
||||
\
|
||||
obstack_fgrow1 (&format_obstack, "%6d", first); \
|
||||
obstack_printf (&format_obstack, "%6d", first); \
|
||||
for (i = begin; i < end; ++i) \
|
||||
{ \
|
||||
obstack_1grow (&format_obstack, ','); \
|
||||
@@ -81,7 +81,7 @@ Name (char const *name, \
|
||||
} \
|
||||
else \
|
||||
++j; \
|
||||
obstack_fgrow1 (&format_obstack, "%6d", table_data[i]); \
|
||||
obstack_printf (&format_obstack, "%6d", table_data[i]); \
|
||||
if (table_data[i] < min) \
|
||||
min = table_data[i]; \
|
||||
if (max < table_data[i]) \
|
||||
@@ -93,10 +93,10 @@ Name (char const *name, \
|
||||
lmin = min; \
|
||||
lmax = max; \
|
||||
/* Build `NAME_min' and `NAME_max' in the obstack. */ \
|
||||
obstack_fgrow1 (&format_obstack, "%s_min", name); \
|
||||
obstack_printf (&format_obstack, "%s_min", name); \
|
||||
obstack_1grow (&format_obstack, 0); \
|
||||
MUSCLE_INSERT_LONG_INT (obstack_finish (&format_obstack), lmin); \
|
||||
obstack_fgrow1 (&format_obstack, "%s_max", name); \
|
||||
obstack_printf (&format_obstack, "%s_max", name); \
|
||||
obstack_1grow (&format_obstack, 0); \
|
||||
MUSCLE_INSERT_LONG_INT (obstack_finish (&format_obstack), lmax); \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user