From: DeaDDooMER <deaddoomer@deadsoftware.ru>
Date: Sun, 28 Jul 2019 20:24:00 +0000 (+0300)
Subject: errors and warnings marked explicitly
X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=073d3da6c76a1ad619cea1221474d46f1d8f570e;p=cpc.git

errors and warnings marked explicitly
---

diff --git a/src/generic/Dev/Mod/CPC486.odc b/src/generic/Dev/Mod/CPC486.odc
index 0898cd2..b3e870d 100644
Binary files a/src/generic/Dev/Mod/CPC486.odc and b/src/generic/Dev/Mod/CPC486.odc differ
diff --git a/src/generic/Dev/Mod/CPM.cp b/src/generic/Dev/Mod/CPM.cp
index 38cfe53..97c6b3e 100644
--- a/src/generic/Dev/Mod/CPM.cp
+++ b/src/generic/Dev/Mod/CPM.cp
@@ -503,7 +503,7 @@ MODULE DevCPM;
 			END;
 			IF trap IN options THEN HALT(100) END;
 		ELSIF (n <= -700) & (errors < maxErrors) THEN
-			errNo[errors] := -n; errPos[errors] := pos; INC(errors)
+			errNo[errors] := n; errPos[errors] := pos; INC(errors)
 		END
 	END Mark;
 	
@@ -514,7 +514,7 @@ MODULE DevCPM;
 	
 	PROCEDURE GetErrorMsg (err: INTEGER; OUT msg: ARRAY OF CHAR);
 	BEGIN
-		CASE err OF
+		CASE ABS(err) OF
 		| 0: msg := 'undeclared identifier'
 		| 1: msg := 'multiply defined identifier'
 		| 2: msg := 'illegal character in number'
@@ -757,6 +757,15 @@ MODULE DevCPM;
 		| 411: msg := 'no proofable return'
 		| 412: msg := 'illegal constructor call'
 		| 413: msg := 'missing constructor call'
+(* COM-related
+                | 700: msg := '700'
+                | 701: msg := '701'
+                | 702: msg := '702'
+                | 703: msg := '703'
+*)
+                | 777: msg := 'register not released'
+                | 778: msg := 'float register not released'
+                | 779: msg := 'float register overallocated'
 		ELSE Strings.IntToString(err, msg)
 		END
 	END GetErrorMsg;
@@ -791,6 +800,9 @@ MODULE DevCPM;
 				Console.WriteChar(":");
 				Strings.IntToString(errPos[n], s); Console.WriteStr(s);
 				Console.WriteStr(": ");
+				IF errNo[n] >= 0 THEN Console.WriteStr("error: ")
+				ELSE Console.WriteStr("warning: ")
+				END;
 				GetErrorMsg(errNo[n], s);
 				Console.WriteStr(s);
 				Console.WriteLn;