]> git.sur5r.net Git - cc65/blobdiff - src/ld65/error.c
New module strstack
[cc65] / src / ld65 / error.c
index 53b06d16bdffcbe60bf815093f3a92c576b08684..807a48cae30558d1018964647181632223f17e09 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998     Ullrich von Bassewitz                                        */
-/*              Wacholderweg 14                                              */
-/*              D-70597 Stuttgart                                            */
-/* EMail:       uz@musoftware.de                                             */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+                
+/* common */
+#include "cmdline.h"
 
+/* ld65 */
 #include "error.h"
 
 
 
-/*****************************************************************************/
-/*                                  Data                                    */
-/*****************************************************************************/
-
-
-
-/* Messages for internal compiler errors */
-const char _MsgCheckFailed [] =
-    "Check failed: `%s' (= %d), file `%s', line %u\n";
-const char _MsgPrecondition [] =
-    "Precondition violated: `%s' (= %d), file `%s', line %u\n";
-const char _MsgFail [] =
-    "%s, file `%s', line %u\n";
-
-
-
 /*****************************************************************************/
 /*                                          Code                                    */
 /*****************************************************************************/
@@ -68,7 +56,7 @@ void Warning (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Warning: ");
+    fprintf (stderr, "%s: Warning: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -81,7 +69,7 @@ void Error (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Error: ");
+    fprintf (stderr, "%s: Error: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -95,7 +83,7 @@ void Internal (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Internal error: ");
+    fprintf (stderr, "%s: Internal error: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -103,4 +91,4 @@ void Internal (const char* Format, ...)
 }
 
 
-
+