errors: prefix the output with "error: "

This improves readability. This is also what gcc does.

* NEWS: Document this change.
* src/complain.c (complain_at): Prefix all errors with "error: ".
(complain_at_indent, warn_at_indent): Do not prefix the context
information of errors, which are basically just indented errors.
* tests/conflicts.at, tests/glr-regression.at, tests/input.at,
tests/named-refs.at, tests/output.at, tests/push.at,
tests/regression.at, tests/skeletons.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-09-26 11:49:22 +02:00
committed by Akim Demaille
parent a974c1ec26
commit b8e7ad5887
9 changed files with 180 additions and 180 deletions

View File

@@ -124,7 +124,7 @@ warn_at_indent (location loc, unsigned *indent,
return;
set_warning_issued ();
indent_ptr = indent;
ERROR_MESSAGE (&loc, _("warning"), message);
ERROR_MESSAGE (&loc, *indent ? NULL : _("warning"), message);
}
void
@@ -144,7 +144,7 @@ warn (const char *message, ...)
void
complain_at (location loc, const char *message, ...)
{
ERROR_MESSAGE (&loc, NULL, message);
ERROR_MESSAGE (&loc, _("error"), message);
complaint_issued = true;
}
@@ -153,14 +153,14 @@ complain_at_indent (location loc, unsigned *indent,
const char *message, ...)
{
indent_ptr = indent;
ERROR_MESSAGE (&loc, NULL, message);
ERROR_MESSAGE (&loc, *indent ? NULL : _("error"), message);
complaint_issued = true;
}
void
complain (const char *message, ...)
{
ERROR_MESSAGE (NULL, NULL, message);
ERROR_MESSAGE (NULL, _("error"), message);
complaint_issued = true;
}