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:
Akim Demaille
2012-07-30 18:05:10 +02:00
parent dbfcf7a89f
commit aaf63e45b6
10 changed files with 44 additions and 68 deletions

View File

@@ -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); \
}