errors: pointerize complain_at_indent

* src/complain.c (complain_at_indent): Rename as...
(complaint_indent): This, and take the location as a pointer.
* src/complain.h, src/muscle-tab.c, src/reader.c, src/scan-code.l,
src/symtab.c: Adjust.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-04 10:35:40 +00:00
committed by Akim Demaille
parent 9ec79612e8
commit b999409e09
7 changed files with 62 additions and 64 deletions

View File

@@ -194,11 +194,11 @@ symbol_redeclaration (symbol *s, const char *what, location first,
location second)
{
unsigned i = 0;
complain_at_indent (second, complaint, &i,
_("%s redeclaration for %s"), what, s->tag);
complain_indent (&second, complaint, &i,
_("%s redeclaration for %s"), what, s->tag);
i += SUB_INDENT;
complain_at_indent (first, complaint, &i,
_("previous declaration"));
complain_indent (&first, complaint, &i,
_("previous declaration"));
}
static void
@@ -206,11 +206,11 @@ semantic_type_redeclaration (semantic_type *s, const char *what, location first,
location second)
{
unsigned i = 0;
complain_at_indent (second, complaint, &i,
_("%s redeclaration for <%s>"), what, s->tag);
complain_indent (&second, complaint, &i,
_("%s redeclaration for <%s>"), what, s->tag);
i += SUB_INDENT;
complain_at_indent (first, complaint, &i,
_("previous declaration"));
complain_indent (&first, complaint, &i,
_("previous declaration"));
}
@@ -566,13 +566,13 @@ user_token_number_redeclaration (int num, symbol *first, symbol *second)
first = second;
second = tmp;
}
complain_at_indent (second->location, complaint, &i,
_("user token number %d redeclaration for %s"),
num, second->tag);
complain_indent (&second->location, complaint, &i,
_("user token number %d redeclaration for %s"),
num, second->tag);
i += SUB_INDENT;
complain_at_indent (first->location, complaint, &i,
_("previous declaration for %s"),
first->tag);
complain_indent (&first->location, complaint, &i,
_("previous declaration for %s"),
first->tag);
}
/*--------------------------------------------------.