style: move argument handling of -W into the diagnostics module

This allows to reduce the number of public interfaces.

* src/getargs.c (--yacc): Use warning_argmatch instead of tweaking
directly warnings_flag (which will be private).
(warning_argmatch, warnings_argmatch): Move to...
* src/complain.h, src/complain.c: here.

* src/getargs.h, src/getargs.c (warnings_args, warnings_types): Move to...
* src/complain.c: here, now private.

* src/complain.h (severity, warnings_flag): Move to...
* src/complain.c: here, now private.
This commit is contained in:
Akim Demaille
2013-02-14 14:35:24 +01:00
parent 808e523db4
commit 12bc1c9e47
4 changed files with 159 additions and 145 deletions

View File

@@ -121,13 +121,6 @@ enum feature
/** What additional features to use. */
extern int feature_flag;
/*------------.
| --warning. |
`------------*/
/* Null-terminated list. */
extern const char * const warnings_args[];
extern const int warnings_types[];
/** Process the command line arguments.
*