warnings: organize variadic complaints call

Move the dispatch of variadic complains to complain.c, rather than do
it in a scanner.

* src/complain.h, src/complain.c (complain_args): New.
* src/scan-skel.l (at_directive_perform): Use it.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-01 15:01:00 +00:00
committed by Akim Demaille
parent bb8e56ff67
commit 782e818718
3 changed files with 45 additions and 55 deletions

View File

@@ -61,6 +61,9 @@ void warnings_print_categories (warnings warn_flags);
void complain (location const* loc, warnings flags, char const *message, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
/** Likewise, but with an \a argc/argv interface. */
void complain_args (location const *loc, warnings w, int argc, char *arg[]);
/** Make a complaint with location and some indentation. */
void complain_at_indent (location loc, warnings flags, unsigned *indent,
char const *message, ...)