Normalize conflict related messages.

* src/complain.h, src/complain.c (warn, complain): New.
* src/conflicts.c (conflicts_print): Use them.
(conflict_report_yacc): New, extracted from...
(conflicts_print): here.
* tests/conflicts.at, tests/existing.at: Adjust.
This commit is contained in:
Akim Demaille
2002-07-30 11:09:59 +00:00
parent e8832397ea
commit 52489d4445
6 changed files with 115 additions and 36 deletions

View File

@@ -29,11 +29,17 @@ extern "C" {
/* Informative messages, but we proceed. */
void warn (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
void warn_at (location_t location, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
/* Something bad happen, but let's continue and die later. */
void complain (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
void complain_at (location_t location, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
@@ -46,7 +52,9 @@ void fatal_at (location_t location, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
# else
void warn ();
void warn_at ();
void complain ();
void complain_at ();
void fatal ();
void fatal_at ();