]> git.gag.com Git - fw/sdcc/commitdiff
Tell us at least the linenumber
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 6 Feb 2001 17:22:27 +0000 (17:22 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 6 Feb 2001 17:22:27 +0000 (17:22 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@592 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCerr.c
support/Util/SDCCerr.c
support/Util/SDCCerr.h

index be2946cfe74c8d23f5b994ba8f31a4f52f85a69e..be6f255266dbc7e0d953b3cd66231dbec44ec646 100644 (file)
@@ -164,6 +164,8 @@ void        vwerror (int errNum, va_list marker)
     
     if ( filename && lineno ) {
        fprintf(ERRSINK, "%s(%d):",filename,lineno);
+    } else {
+        fprintf(ERRSINK, "at %d:",lineno);
     }
     vfprintf(ERRSINK, ErrTab[errNum].errText,marker);
 }
index 25f772e64598cf58f8ec49f57e1495a03bf22dda..7cd6602a909a78dbb963786b7e1499fea202d9ae 100644 (file)
@@ -202,18 +202,20 @@ vwerror - Output a standard eror message with variable number of arguements
 */
 
 void vwerror (int errNum, va_list marker)
-
 {
-if (!ErrorOut)
-       ErrorOut = DEFAULT_ERROR_OUT ;
-
-if ( ErrTab[errNum].errType == ERROR )
+  if (!ErrorOut)
+    ErrorOut = DEFAULT_ERROR_OUT ;
+  
+  if ( ErrTab[errNum].errType == ERROR )
     fatalError++ ;
-
-if ( filename && lineno ) 
+  
+  if ( filename && lineno ) {
     fprintf(ErrorOut, "%s(%d):",filename,lineno);
-
-vfprintf(ErrorOut, ErrTab[errNum].errText,marker);
+  } else {
+    fprintf(ErrorOut, "at %d:", lineno);
+  }
+  
+  vfprintf(ErrorOut, ErrTab[errNum].errText,marker);
 }
 /*
 -------------------------------------------------------------------------------
index bc18d4cd278e6441e6c6cc32d915c0abdc2c4b6e..9c4e0d8798d98738913e2359317b314828487888 100644 (file)
@@ -117,7 +117,7 @@ SDCCERR - SDCC Standard error handler
 #define  E_CODE_NO_INIT     99          /* vars in code space must have initializer */
 #define  E_OPS_INTEGRAL    100          /* operans must be integral for certian assignments */
 #define  E_TOO_MANY_PARMS  101          /* too many parameters */
-#define  E_TO_FEW_PARMS    102          /* to few parameters   */
+#define  E_TOO_FEW_PARMS    102          /* to few parameters   */
 #define  E_FUNC_NO_CODE    103          /* fatalError          */
 #define  E_TYPE_MISMATCH_PARM 104       /* type mismatch for parameter */
 #define  E_INVALID_FLOAT_CONST 105      /* invalid floating point literal string */