muscle_syncline_grow (char const *key, location loc)
{
char *extension = NULL;
- obstack_fgrow1 (&muscle_obstack, "]b4_syncline(%d, [[", loc.start.line);
- obstack_escape (&muscle_obstack,
- quotearg_style (c_quoting_style, loc.start.file));
- obstack_sgrow (&muscle_obstack, "]])[");
+ obstack_printf (&muscle_obstack, "]b4_syncline(%d, ", loc.start.line);
+ obstack_quote (&muscle_obstack,
+ quotearg_style (c_quoting_style, loc.start.file));
+ obstack_sgrow (&muscle_obstack, ")[");
obstack_1grow (&muscle_obstack, 0);
extension = obstack_finish (&muscle_obstack);
muscle_grow (key, extension, "");
const char *a1, const char *a2)
{
char *pair;
- obstack_sgrow (&muscle_obstack, "[[[");
- obstack_escape (&muscle_obstack, a1);
- obstack_sgrow (&muscle_obstack, "]], [[");
- obstack_escape (&muscle_obstack, a2);
- obstack_sgrow (&muscle_obstack, "]]]");
+ obstack_sgrow (&muscle_obstack, "[");
+ obstack_quote (&muscle_obstack, a1);
+ obstack_sgrow (&muscle_obstack, ", ");
+ obstack_quote (&muscle_obstack, a2);
+ obstack_sgrow (&muscle_obstack, "]");
obstack_1grow (&muscle_obstack, 0);
pair = obstack_finish (&muscle_obstack);
muscle_grow (muscle, pair, ",\n");
muscle_boundary_grow (char const *key, boundary bound)
{
char *extension;
+ obstack_sgrow (&muscle_obstack, "[[");
obstack_escape (&muscle_obstack, bound.file);
- obstack_1grow (&muscle_obstack, ':');
- obstack_fgrow1 (&muscle_obstack, "%d", bound.line);
- obstack_1grow (&muscle_obstack, '.');
- obstack_fgrow1 (&muscle_obstack, "%d", bound.column);
- obstack_1grow (&muscle_obstack, '\0');
+ obstack_1grow (&muscle_obstack, ':');
+ obstack_printf (&muscle_obstack, "%d", bound.line);
+ obstack_1grow (&muscle_obstack, '.');
+ obstack_printf (&muscle_obstack, "%d", bound.column);
+ obstack_sgrow (&muscle_obstack, "]]");
+ obstack_1grow (&muscle_obstack, '\0');
extension = obstack_finish (&muscle_obstack);
muscle_grow (key, extension, "");
obstack_free (&muscle_obstack, extension);
static void
muscle_location_grow (char const *key, location loc)
{
- muscle_grow (key, "[[", "");
muscle_boundary_grow (key, loc.start);
- muscle_grow (key, "]], [[", "");
+ muscle_grow (key, "", ", ");
muscle_boundary_grow (key, loc.end);
- muscle_grow (key, "]]", "");
}
#define COMMON_DECODE(Value) \
if (how == MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
&& muscle_find_const (name))
{
+ unsigned i = 0;
muscle_percent_define_how how_old =
atoi (muscle_find_const (how_name));
if (how_old == MUSCLE_PERCENT_DEFINE_F)
free (variable_tr);
return;
}
- complain_at (variable_loc, _("%%define variable %s redefined"),
- quote (variable));
- complain_at (muscle_percent_define_get_loc (variable),
- _("previous definition"));
+ complain_at_indent (variable_loc, &i,
+ _("%%define variable %s redefined"), quote (variable));
+ i += SUB_INDENT;
+ complain_at_indent (muscle_percent_define_get_loc (variable), &i,
+ _("previous definition"));
}
MUSCLE_INSERT_STRING (name, value);
}
if (!*values)
{
+ unsigned i = 0;
location loc = muscle_percent_define_get_loc (*variablep);
- complain_at(loc,
- _("invalid value for %%define variable %s: %s"),
- quote (*variablep), quote_n (1, value));
+ complain_at_indent (loc, &i,
+ _("invalid value for %%define variable %s: %s"),
+ quote (*variablep), quote_n (1, value));
+ i += SUB_INDENT;
for (values = variablep + 1; *values; ++values)
- complain_at (loc, _("accepted value: %s"), quote (*values));
+ complain_at_indent (loc, &i, _("accepted value: %s"),
+ quote (*values));
}
else
{