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
@@ -129,7 +129,7 @@ void Fatal (const char* Format, ...)
|
||||
LineNum = GetCurrentLine ();
|
||||
}
|
||||
|
||||
fprintf (stderr, "%s(%u): Fatal: ", FileName, LineNum);
|
||||
fprintf (stderr, "%s:%u: Fatal: ", FileName, LineNum);
|
||||
|
||||
va_start (ap, Format);
|
||||
vfprintf (stderr, Format, ap);
|
||||
@@ -159,7 +159,7 @@ void Internal (const char* Format, ...)
|
||||
LineNum = GetCurrentLine ();
|
||||
}
|
||||
|
||||
fprintf (stderr, "%s(%u): Internal compiler error:\n",
|
||||
fprintf (stderr, "%s:%u: Internal compiler error:\n",
|
||||
FileName, LineNum);
|
||||
|
||||
va_start (ap, Format);
|
||||
@@ -186,7 +186,7 @@ void Internal (const char* Format, ...)
|
||||
static void IntError (const char* Filename, unsigned LineNo, const char* Msg, va_list ap)
|
||||
/* Print an error message - internal function*/
|
||||
{
|
||||
fprintf (stderr, "%s(%u): Error: ", Filename, LineNo);
|
||||
fprintf (stderr, "%s:%u: Error: ", Filename, LineNo);
|
||||
vfprintf (stderr, Msg, ap);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
@@ -250,7 +250,7 @@ static void IntWarning (const char* Filename, unsigned LineNo, const char* Msg,
|
||||
|
||||
} else if (IS_Get (&WarnEnable)) {
|
||||
|
||||
fprintf (stderr, "%s(%u): Warning: ", Filename, LineNo);
|
||||
fprintf (stderr, "%s:%u: Warning: ", Filename, LineNo);
|
||||
vfprintf (stderr, Msg, ap);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
|
||||
@@ -784,7 +784,7 @@ static void IntPragma (StrBuf* B, IntStack* Stack, long Low, long High)
|
||||
|
||||
static void MakeMessage (const char* Message)
|
||||
{
|
||||
fprintf (stderr, "%s(%u): Note: %s\n", GetInputName (CurTok.LI), GetInputLine (CurTok.LI), Message);
|
||||
fprintf (stderr, "%s:%u: Note: %s\n", GetInputName (CurTok.LI), GetInputLine (CurTok.LI), Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1396,7 +1396,7 @@ void Preprocess (void)
|
||||
|
||||
Done:
|
||||
if (Verbosity > 1 && SB_NotEmpty (Line)) {
|
||||
printf ("%s(%u): %.*s\n", GetCurrentFile (), GetCurrentLine (),
|
||||
printf ("%s:%u: %.*s\n", GetCurrentFile (), GetCurrentLine (),
|
||||
(int) SB_GetLen (Line), SB_GetConstBuf (Line));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user