Standard formatting of error messages.
https://www.gnu.org/prep/standards/html_node/Errors.html Issue: https://github.com/cc65/cc65/issues/1494
This commit is contained in:
committed by
Oliver Schmidt
parent
bda5bf70ce
commit
bcc670ee36
@@ -133,7 +133,7 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
|
||||
SB_Terminate (&Ident);
|
||||
} else {
|
||||
if (!IgnoreUnknown) {
|
||||
Error ("%s(%u): Syntax error", Filename, Line);
|
||||
Error ("%s:%u: Syntax error", Filename, Line);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
|
||||
++L;
|
||||
} else {
|
||||
if (!IgnoreUnknown) {
|
||||
Error ("%s(%u): Missing '='", Filename, Line);
|
||||
Error ("%s:%u: Missing '='", Filename, Line);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
|
||||
/* Must have at least one digit */
|
||||
if (Digits == 0) {
|
||||
if (!IgnoreUnknown) {
|
||||
Error ("%s(%u): Error in number format", Filename, Line);
|
||||
Error ("%s:%u: Error in number format", Filename, Line);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
|
||||
/* Check for a comment character or end of line */
|
||||
if (*L != CommentStart && *L != '\0') {
|
||||
if (!IgnoreUnknown) {
|
||||
Error ("%s(%u): Trailing garbage", Filename, Line);
|
||||
Error ("%s:%u: Trailing garbage", Filename, Line);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void InfoWarning (const char* Format, ...)
|
||||
xvsprintf (Buf, sizeof (Buf), Format, ap);
|
||||
va_end (ap);
|
||||
|
||||
fprintf (stderr, "%s(%u): Warning: %s\n",
|
||||
fprintf (stderr, "%s:%u: Warning: %s\n",
|
||||
InputSrcName, InfoErrorLine, Buf);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ void InfoError (const char* Format, ...)
|
||||
xvsprintf (Buf, sizeof (Buf), Format, ap);
|
||||
va_end (ap);
|
||||
|
||||
fprintf (stderr, "%s(%u): Error: %s\n",
|
||||
fprintf (stderr, "%s:%u: Error: %s\n",
|
||||
InputSrcName, InfoErrorLine, Buf);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user