diff --git a/src/ca65/error.c b/src/ca65/error.c index 69446b3fc..7e1457964 100644 --- a/src/ca65/error.c +++ b/src/ca65/error.c @@ -84,7 +84,7 @@ static void VPrintMsg (const FilePos* Pos, const char* Desc, SB_Terminate (&Msg); /* Format the message header */ - SB_Printf (&S, "%s(%u): %s: ", + SB_Printf (&S, "%s:%u: %s: ", SB_GetConstBuf (GetFileName (Pos->Name)), Pos->Line, Desc); diff --git a/src/cc65/error.c b/src/cc65/error.c index b1529d0b5..f0e023969 100644 --- a/src/cc65/error.c +++ b/src/cc65/error.c @@ -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"); diff --git a/src/cc65/pragma.c b/src/cc65/pragma.c index e4bb4cdeb..b0478ce2a 100644 --- a/src/cc65/pragma.c +++ b/src/cc65/pragma.c @@ -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); } diff --git a/src/cc65/preproc.c b/src/cc65/preproc.c index cc160c1c3..37073e784 100644 --- a/src/cc65/preproc.c +++ b/src/cc65/preproc.c @@ -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)); } } diff --git a/src/da65/asminc.c b/src/da65/asminc.c index 59ba0aab4..4d9da2594 100644 --- a/src/da65/asminc.c +++ b/src/da65/asminc.c @@ -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; } diff --git a/src/da65/scanner.c b/src/da65/scanner.c index 85853d6c4..33fb3a826 100644 --- a/src/da65/scanner.c +++ b/src/da65/scanner.c @@ -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); } diff --git a/src/ld65/asserts.c b/src/ld65/asserts.c index 626ed94a6..e9bae83e5 100644 --- a/src/ld65/asserts.c +++ b/src/ld65/asserts.c @@ -140,12 +140,12 @@ void CheckAssertions (void) case ASSERT_ACT_WARN: case ASSERT_ACT_LDWARN: - Warning ("%s(%u): %s", Module, Line, Message); + Warning ("%s:%u: %s", Module, Line, Message); break; case ASSERT_ACT_ERROR: case ASSERT_ACT_LDERROR: - Error ("%s(%u): %s", Module, Line, Message); + Error ("%s:%u: %s", Module, Line, Message); break; default: diff --git a/src/ld65/exports.c b/src/ld65/exports.c index 5df7a37c9..872db5143 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -774,17 +774,19 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data) if (E->Expr == 0 && E->ImpCount > 0 && F (E->Name, Data) == 0) { /* Unresolved external */ Import* Imp = E->ImpList; + const char * name = GetString (E->Name); fprintf (stderr, "Unresolved external '%s' referenced in:\n", - GetString (E->Name)); + name); while (Imp) { unsigned J; for (J = 0; J < CollCount (&Imp->RefLines); ++J) { const LineInfo* LI = CollConstAt (&Imp->RefLines, J); fprintf (stderr, - " %s(%u)\n", + " %s:%u: Error: Unresolved external '%s'\n", GetSourceName (LI), - GetSourceLine (LI)); + GetSourceLine (LI), + name); } Imp = Imp->Next; } diff --git a/src/ld65/scanner.c b/src/ld65/scanner.c index d6278abbd..256d47f07 100644 --- a/src/ld65/scanner.c +++ b/src/ld65/scanner.c @@ -92,7 +92,7 @@ void CfgWarning (const FilePos* Pos, const char* Format, ...) SB_VPrintf (&Buf, Format, ap); va_end (ap); - Warning ("%s(%u): %s", + Warning ("%s:%u: %s", GetString (Pos->Name), Pos->Line, SB_GetConstBuf (&Buf)); SB_Done (&Buf); } @@ -109,7 +109,7 @@ void CfgError (const FilePos* Pos, const char* Format, ...) SB_VPrintf (&Buf, Format, ap); va_end (ap); - Error ("%s(%u): %s", + Error ("%s:%u: %s", GetString (Pos->Name), Pos->Line, SB_GetConstBuf (&Buf)); SB_Done (&Buf); }