浏览代码

Removed obsolete support for error codes in diagnostics

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8150 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 年之前
父节点
当前提交
0ed74d6258

+ 6 - 6
source/Compiler.Mod

@@ -52,7 +52,7 @@ TYPE
 		replacement := NIL;
 		replacement := NIL;
 		reader := Basic.GetFileReader(filename);
 		reader := Basic.GetFileReader(filename);
 		IF reader = NIL THEN
 		IF reader = NIL THEN
-			diagnostics.Error (filename, Diagnostics.Invalid, Diagnostics.Invalid, "failed to open");
+			diagnostics.Error (filename, Diagnostics.Invalid, "failed to open");
 		ELSE
 		ELSE
 
 
 			scanner := Scanner.NewScanner(filename, reader, 0, diagnostics);
 			scanner := Scanner.NewScanner(filename, reader, 0, diagnostics);
@@ -111,7 +111,7 @@ TYPE
 			Strings.Append (message, msg);
 			Strings.Append (message, msg);
 			IF error THEN
 			IF error THEN
 				IF diagnostics # NIL THEN
 				IF diagnostics # NIL THEN
-					diagnostics.Error (source, Diagnostics.Invalid, Diagnostics.Invalid, message);
+					diagnostics.Error (source, Diagnostics.Invalid, message);
 				END;
 				END;
 			ELSE
 			ELSE
 				IF (log # NIL) & ~(Silent IN options.flags) & ~(FindPC IN options.flags) THEN
 				IF (log # NIL) & ~(Silent IN options.flags) & ~(FindPC IN options.flags) THEN
@@ -272,7 +272,7 @@ TYPE
 		PROCEDURE Error(CONST error: ARRAY OF CHAR);
 		PROCEDURE Error(CONST error: ARRAY OF CHAR);
 		BEGIN
 		BEGIN
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Error("",Diagnostics.Invalid,Diagnostics.Invalid,error);
+				diagnostics.Error("",Diagnostics.Invalid,error);
 			END;
 			END;
 		END Error;
 		END Error;
 
 
@@ -467,7 +467,7 @@ TYPE
 				reader := Basic.GetFileReader(filename);
 				reader := Basic.GetFileReader(filename);
 
 
 				IF reader = NIL THEN
 				IF reader = NIL THEN
-					diagnostics.Error (filename, Diagnostics.Invalid, Diagnostics.Invalid, "failed to open"); error := TRUE;
+					diagnostics.Error (filename, Diagnostics.Invalid, "failed to open"); error := TRUE;
 				ELSE
 				ELSE
 					error := ~Modules(filename, reader, 0, diagnostics,context.out, options,  importCache);
 					error := ~Modules(filename, reader, 0, diagnostics,context.out, options,  importCache);
 				END;
 				END;
@@ -483,7 +483,7 @@ TYPE
 				WHILE replacement # NIL DO
 				WHILE replacement # NIL DO
 					IF ~replacement.used THEN
 					IF ~replacement.used THEN
 						name := replacement.name;
 						name := replacement.name;
-						diagnostics.Warning(name,  Diagnostics.Invalid, Diagnostics.Invalid, " unused replacement.");
+						diagnostics.Warning(name,  Diagnostics.Invalid, " unused replacement.");
 					END;
 					END;
 					replacement := replacement.next;
 					replacement := replacement.next;
 				END;
 				END;
@@ -506,7 +506,7 @@ TYPE
 		IF GetOptions(context.arg,context.error,diagnostics,options) THEN
 		IF GetOptions(context.arg,context.error,diagnostics,options) THEN
 
 
 			IF reader = NIL THEN
 			IF reader = NIL THEN
-				diagnostics.Error (filename, Diagnostics.Invalid, Diagnostics.Invalid, "failed to open"); error := TRUE;
+				diagnostics.Error (filename, Diagnostics.Invalid, "failed to open"); error := TRUE;
 			ELSE
 			ELSE
 				error := ~Modules(filename, reader, 0, diagnostics, context.out, options, importCache);
 				error := ~Modules(filename, reader, 0, diagnostics, context.out, options, importCache);
 			END;
 			END;

+ 3 - 3
source/CompilerInterface.Mod

@@ -41,12 +41,12 @@ TYPE
 			IF (compileText # NIL) THEN
 			IF (compileText # NIL) THEN
 				compileText(t, source, pos, pc, opt, log, diagnostics, error);
 				compileText(t, source, pos, pc, opt, log, diagnostics, error);
 			ELSIF (diagnostics # NIL) THEN
 			ELSIF (diagnostics # NIL) THEN
-				diagnostics.Error(source, Diagnostics.Invalid, Diagnostics.Invalid, "Text compile procedure not set");
+				diagnostics.Error(source, Diagnostics.Invalid, "Text compile procedure not set");
 			END;
 			END;
 		FINALLY
 		FINALLY
 			IF trap THEN (* trap will be set in case a trap occurs in the block above *)
 			IF trap THEN (* trap will be set in case a trap occurs in the block above *)
 				error := TRUE;
 				error := TRUE;
-				diagnostics.Error(source, Diagnostics.Invalid, Diagnostics.Invalid, "COMPILER TRAPPED");
+				diagnostics.Error(source, Diagnostics.Invalid, "COMPILER TRAPPED");
 				log.String("COMPILER TRAPPED!!!"); log.Update;
 				log.String("COMPILER TRAPPED!!!"); log.Update;
 			END;
 			END;
 		END CompileText;
 		END CompileText;
@@ -174,4 +174,4 @@ END CompilerInterface.
 
 
 CompilerInterface.Show ~
 CompilerInterface.Show ~
 
 
-System.Free CompilerInterface ~
+System.Free CompilerInterface ~

+ 22 - 28
source/Diagnostics.Mod

@@ -3,7 +3,7 @@ MODULE Diagnostics; (** AUTHOR "staubesv"; PURPOSE "Generic diagnostics reportin
 IMPORT Streams;
 IMPORT Streams;
 
 
 CONST
 CONST
-	(** Indicate that a position or an errorcode is not valid *)
+	(** Indicate that a position is not valid *)
 	Invalid* = -1;
 	Invalid* = -1;
 
 
 	(** Entry types *)
 	(** Entry types *)
@@ -20,13 +20,13 @@ TYPE
 
 
 	Diagnostics* = OBJECT
 	Diagnostics* = OBJECT
 
 
-		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		END Information;
 		END Information;
 
 
 	END Diagnostics;
 	END Diagnostics;
@@ -37,7 +37,6 @@ TYPE
 		type*: WORD;
 		type*: WORD;
 		source*: ARRAY 128 OF CHAR;
 		source*: ARRAY 128 OF CHAR;
 		position*: Streams.Position;
 		position*: Streams.Position;
-		errorCode*: WORD;
 		message*: ARRAY 256 OF CHAR;
 		message*: ARRAY 256 OF CHAR;
 		next*: Entry;
 		next*: Entry;
 	END;
 	END;
@@ -59,19 +58,19 @@ TYPE
 
 
 		nofMessages- : SIZE;
 		nofMessages- : SIZE;
 
 
-		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN {EXCLUSIVE}
 		BEGIN {EXCLUSIVE}
-			InsertSorted(TypeError, source, position, errorCode, message, nofErrors)
+			InsertSorted(TypeError, source, position, message, nofErrors)
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN {EXCLUSIVE}
 		BEGIN {EXCLUSIVE}
-			InsertSorted(TypeWarning, source, position, errorCode, message, nofWarnings);
+			InsertSorted(TypeWarning, source, position, message, nofWarnings);
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
+		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN {EXCLUSIVE}
 		BEGIN {EXCLUSIVE}
-			InsertSorted(TypeInformation, source, position, errorCode, message, nofInformations);
+			InsertSorted(TypeInformation, source, position, message, nofInformations);
 		END Information;
 		END Information;
 
 
 		PROCEDURE ToStream*(w : Streams.Writer; mask : SET);
 		PROCEDURE ToStream*(w : Streams.Writer; mask : SET);
@@ -81,7 +80,7 @@ TYPE
 			entry := entries;
 			entry := entries;
 			WHILE (entry # NIL) DO
 			WHILE (entry # NIL) DO
 				IF (entry.type IN mask) THEN
 				IF (entry.type IN mask) THEN
-					Print (w, entry.source, entry.position, entry.errorCode, entry.type, entry.message);
+					Print (w, entry.source, entry.position, entry.type, entry.message);
 				END;
 				END;
 				entry := entry.next;
 				entry := entry.next;
 			END;
 			END;
@@ -121,26 +120,25 @@ TYPE
 			RETURN result;
 			RETURN result;
 		END GetEntries;
 		END GetEntries;
 
 
-		PROCEDURE InsertSorted(type: WORD; CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR; VAR counter: SIZE);
+		PROCEDURE InsertSorted(type: WORD; CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR; VAR counter: SIZE);
 		VAR prev, entry : Entry;
 		VAR prev, entry : Entry;
 		BEGIN
 		BEGIN
 			entry := entries; prev := NIL;
 			entry := entries; prev := NIL;
 			WHILE (entry # NIL) & (entry.position <= position) DO prev := entry; entry := entry.next END;
 			WHILE (entry # NIL) & (entry.position <= position) DO prev := entry; entry := entry.next END;
-			IF (entry = NIL) OR (entry.type # type) OR (entry.position # position) OR (entry.errorCode # errorCode) OR (entry.message # message) THEN
+			IF (entry = NIL) OR (entry.type # type) OR (entry.position # position) OR (entry.message # message) THEN
 				INC(nofMessages); INC (counter);
 				INC(nofMessages); INC (counter);
-				entry := NewEntry (type, source, position, errorCode, message, entry);
+				entry := NewEntry (type, source, position, message, entry);
 				IF prev = NIL THEN entries := entry ELSE prev.next := entry END
 				IF prev = NIL THEN entries := entry ELSE prev.next := entry END
 			END
 			END
 		END InsertSorted;
 		END InsertSorted;
 
 
-		PROCEDURE NewEntry*(type: WORD; CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR; next: Entry) : Entry;
+		PROCEDURE NewEntry*(type: WORD; CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR; next: Entry) : Entry;
 		VAR entry : Entry;
 		VAR entry : Entry;
 		BEGIN
 		BEGIN
 			NEW(entry);
 			NEW(entry);
 			entry.type := type;
 			entry.type := type;
 			COPY (source, entry.source);
 			COPY (source, entry.source);
 			entry.position := position;
 			entry.position := position;
-			entry.errorCode := errorCode;
 			COPY (message, entry.message);
 			COPY (message, entry.message);
 			entry.next := next;
 			entry.next := next;
 			RETURN entry;
 			RETURN entry;
@@ -160,21 +158,21 @@ TYPE
 			writer := w;
 			writer := w;
 		END Init;
 		END Init;
 
 
-		PROCEDURE Error* (CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, TypeError, message);
+		PROCEDURE Error* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, TypeError, message);
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning* (CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, TypeWarning, message);
+		PROCEDURE Warning* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, TypeWarning, message);
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information* (CONST source : ARRAY OF CHAR; position : Streams.Position; errorCode : WORD; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, TypeInformation, message);
+		PROCEDURE Information* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, TypeInformation, message);
 		END Information;
 		END Information;
 
 
 	END StreamDiagnostics;
 	END StreamDiagnostics;
 
 
-PROCEDURE Print (w: Streams.Writer; CONST source : ARRAY OF CHAR; position: Streams.Position; errorCode: WORD; type: WORD; CONST message: ARRAY OF CHAR);
+PROCEDURE Print (w: Streams.Writer; CONST source : ARRAY OF CHAR; position: Streams.Position; type: WORD; CONST message: ARRAY OF CHAR);
 BEGIN
 BEGIN
 	w.Char(Tab);
 	w.Char(Tab);
 	IF (source # "") THEN w.String (source); END;
 	IF (source # "") THEN w.String (source); END;
@@ -185,10 +183,6 @@ BEGIN
 	ELSIF (type = TypeError) THEN
 	ELSIF (type = TypeError) THEN
 		w.String("error");
 		w.String("error");
 	END;
 	END;
-	IF (errorCode # Invalid) THEN
-		IF (type # TypeInformation) THEN w.Char (' ') END;
-		w.Int(errorCode, 0);
-	END;
 	IF (type # TypeInformation) THEN w.String(": ") END;
 	IF (type # TypeInformation) THEN w.String(": ") END;
 	w.String(message); w.Ln;
 	w.String(message); w.Ln;
 	w.Update;
 	w.Update;

+ 7 - 11
source/FoxA2Interface.Mod

@@ -87,22 +87,22 @@ TYPE
 			writer := w;
 			writer := w;
 		END Init;
 		END Init;
 
 
-		PROCEDURE Error* (CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, Diagnostics.TypeError, message);
+		PROCEDURE Error* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, Diagnostics.TypeError, message);
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning* (CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, Diagnostics.TypeWarning, message);
+		PROCEDURE Warning* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, Diagnostics.TypeWarning, message);
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information* (CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
-		BEGIN Print (writer, source, position, errorCode, Diagnostics.TypeInformation, message);
+		PROCEDURE Information* (CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
+		BEGIN Print (writer, source, position, Diagnostics.TypeInformation, message);
 		END Information;
 		END Information;
 
 
 	END StreamDiagnostics;
 	END StreamDiagnostics;
 
 
 
 
-	PROCEDURE Print (w: Streams.Writer; CONST source : ARRAY OF CHAR; position, errorCode, type: LONGINT; CONST message: ARRAY OF CHAR);
+	PROCEDURE Print (w: Streams.Writer; CONST source : ARRAY OF CHAR; position: Streams.Position; type: WORD; CONST message: ARRAY OF CHAR);
 	VAR attributes: Texts.Attributes;
 	VAR attributes: Texts.Attributes;
 	BEGIN
 	BEGIN
 		IF w IS TextUtilities.TextWriter THEN
 		IF w IS TextUtilities.TextWriter THEN
@@ -125,10 +125,6 @@ TYPE
 			w.String("error");
 			w.String("error");
 		ELSE
 		ELSE
 		END;
 		END;
-		IF (errorCode # Diagnostics.Invalid) THEN
-			IF (type # Diagnostics.TypeInformation) THEN w.Char (' ') END;
-			w.Int(errorCode, 0);
-		END;
 		IF (type # Diagnostics.TypeInformation) THEN w.String(": ") END;
 		IF (type # Diagnostics.TypeInformation) THEN w.String(": ") END;
 		w.String(message); w.Ln;
 		w.String(message); w.Ln;
 		w.Update;
 		w.Update;

+ 2 - 2
source/FoxActiveCells.Mod

@@ -1449,7 +1449,7 @@ TYPE
 				IF log # NIL THEN log.String(msg); log.Ln; END;
 				IF log # NIL THEN log.String(msg); log.Ln; END;
 				RETURN TRUE
 				RETURN TRUE
 			ELSE
 			ELSE
-				diagnostics.Error(fileName,Diagnostics.Invalid, Diagnostics.Invalid,"could not generate file");
+				diagnostics.Error(fileName,Diagnostics.Invalid, "could not generate file");
 				IF TraceError THEN HALT(100) ELSE RETURN FALSE END
 				IF TraceError THEN HALT(100) ELSE RETURN FALSE END
 			END;
 			END;
 		END Emit;
 		END Emit;
@@ -1832,4 +1832,4 @@ FoxActiveCells.ReadSpecification Test.spec ~
 FSTools.CopyFiles TL.spec => Test.spec ~
 FSTools.CopyFiles TL.spec => Test.spec ~
 FoxActiveCells.CompareSpecification Test TL ~~
 FoxActiveCells.CompareSpecification Test TL ~~
 
 
-System.FreeDownTo FoxActiveCells ~
+System.FreeDownTo FoxActiveCells ~

+ 9 - 10
source/FoxBasic.Mod

@@ -1648,32 +1648,31 @@ TYPE
 			SELF.diagnostics := diagnostics
 			SELF.diagnostics := diagnostics
 		END InitDiagnostics;
 		END InitDiagnostics;
 
 
-		PROCEDURE Error*(CONST source: ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Error*(CONST source: ARRAY OF CHAR; position: Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Error(source,position,errorCode,message);
+				diagnostics.Error(source,position,message);
 			END;
 			END;
 			D.Ln;
 			D.Ln;
 			D.String(" ---------------------- TRACE for COMPILER ERROR  < ");
 			D.String(" ---------------------- TRACE for COMPILER ERROR  < ");
 			D.String(source);
 			D.String(source);
 			IF position # Diagnostics.Invalid THEN D.String("@"); D.Int(position,1) END;
 			IF position # Diagnostics.Invalid THEN D.String("@"); D.Int(position,1) END;
-			IF errorCode # Diagnostics.Invalid THEN D.String(" "); D.Int(errorCode,1); END;
 			D.String(" "); D.String(message);
 			D.String(" "); D.String(message);
 			D.String(" > ---------------------- ");
 			D.String(" > ---------------------- ");
 			D.TraceBack
 			D.TraceBack
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position: Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Warning(source,position,errorCode,message);
+				diagnostics.Warning(source,position,message);
 			END;
 			END;
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position: Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Information(source,position,errorCode,message);
+				diagnostics.Information(source,position,message);
 			END;
 			END;
 		END Information;
 		END Information;
 
 
@@ -1798,7 +1797,7 @@ VAR
 	BEGIN
 	BEGIN
 		IF diagnostics # NIL THEN
 		IF diagnostics # NIL THEN
 			MakeDetailedMessage(pos, code, msg, GetReader(), message);
 			MakeDetailedMessage(pos, code, msg, GetReader(), message);
-			diagnostics.Error(source, pos.start, code, message);
+			diagnostics.Error(source, pos.start, message);
 		END;
 		END;
 	END ErrorC;
 	END ErrorC;
 
 
@@ -1815,7 +1814,7 @@ VAR
 	BEGIN
 	BEGIN
 		IF diagnostics # NIL THEN
 		IF diagnostics # NIL THEN
 			MakeMessage(pos, InvalidCode, msg,message);
 			MakeMessage(pos, InvalidCode, msg,message);
-			diagnostics.Warning(source, pos.start, InvalidCode, message);
+			diagnostics.Warning(source, pos.start, message);
 		END;
 		END;
 	END Warning;
 	END Warning;
 
 
@@ -1824,7 +1823,7 @@ VAR
 	BEGIN
 	BEGIN
 		IF diagnostics # NIL THEN
 		IF diagnostics # NIL THEN
 			MakeMessage(pos, InvalidCode, msg,message);
 			MakeMessage(pos, InvalidCode, msg,message);
-			diagnostics.Information(source, pos.start, InvalidCode, message);
+			diagnostics.Information(source, pos.start, message);
 		END;
 		END;
 	END Information;
 	END Information;
 
 

+ 2 - 2
source/GenericLinker.Mod

@@ -173,11 +173,11 @@ VAR
 	END SetLinkRoot;
 	END SetLinkRoot;
 
 
 	PROCEDURE Error* (CONST source, message: ARRAY OF CHAR);
 	PROCEDURE Error* (CONST source, message: ARRAY OF CHAR);
-	BEGIN diagnostics.Error (source, Diagnostics.Invalid, Diagnostics.Invalid, message); error := TRUE;
+	BEGIN diagnostics.Error (source, Diagnostics.Invalid, message); error := TRUE;
 	END Error;
 	END Error;
 
 
 	PROCEDURE Warning* (CONST source, message: ARRAY OF CHAR);
 	PROCEDURE Warning* (CONST source, message: ARRAY OF CHAR);
-	BEGIN diagnostics.Warning (source, Diagnostics.Invalid, Diagnostics.Invalid, message);
+	BEGIN diagnostics.Warning (source, Diagnostics.Invalid, message);
 	END Warning;
 	END Warning;
 
 
 	PROCEDURE ErrorP*(CONST pooledName: ObjectFile.SegmentedName; CONST message: ARRAY OF CHAR);
 	PROCEDURE ErrorP*(CONST pooledName: ObjectFile.SegmentedName; CONST message: ARRAY OF CHAR);

+ 1 - 1
source/ModuleParser.Mod

@@ -1599,7 +1599,7 @@ BEGIN
 		scanner := FoxScanner.NewScanner(filename, reader, 0, diagnostics);
 		scanner := FoxScanner.NewScanner(filename, reader, 0, diagnostics);
 		Parse(scanner, module);
 		Parse(scanner, module);
 	ELSIF (diagnostics # NIL) THEN
 	ELSIF (diagnostics # NIL) THEN
-		diagnostics.Error("ModuleParser", Diagnostics.Invalid, Diagnostics.Invalid, "File not found");
+		diagnostics.Error("ModuleParser", Diagnostics.Invalid, "File not found");
 	END;
 	END;
 	RETURN module
 	RETURN module
 END ParseFile;
 END ParseFile;

+ 2 - 7
source/Oberon.PC.Mod

@@ -105,12 +105,7 @@ END Locate;
 PROCEDURE ReportError(entry : Diagnostics.Entry);
 PROCEDURE ReportError(entry : Diagnostics.Entry);
 BEGIN
 BEGIN
 	PCM.LogW(9X);
 	PCM.LogW(9X);
-	IF entry.errorCode = -1 THEN
-		PCM.LogWStr("pos "); PCM.LogWNum(entry.position);
-	ELSIF (entry.type # Diagnostics.TypeInformation) THEN
-		PCM.LogWStr("pos  "); PCM.LogWNum(entry.position);
-		PCM.LogWStr("  err  "); PCM.LogWNum(entry.errorCode)
-	END;
+	PCM.LogWStr("pos "); PCM.LogWNum(entry.position);
 	PCM.LogW(9X);
 	PCM.LogW(9X);
 	PCM.LogWStr(entry.message);
 	PCM.LogWStr(entry.message);
 	PCM.LogWLn;
 	PCM.LogWLn;
@@ -301,4 +296,4 @@ END PC.
 	30.03.01	prk	object file version changed to 01X
 	30.03.01	prk	object file version changed to 01X
 	29.03.01	prk	Attributes.StrToTxt inlined
 	29.03.01	prk	Attributes.StrToTxt inlined
 	25.03.01	prk	renamed, was PCCompiler
 	25.03.01	prk	renamed, was PCCompiler
-*)
+*)

+ 2 - 2
source/PCAAMD64.Mod

@@ -1930,7 +1930,7 @@ BEGIN
 	TextUtilities.LoadAuto (text, fileName, format, res);
 	TextUtilities.LoadAuto (text, fileName, format, res);
 
 
 	IF res # 0 THEN
 	IF res # 0 THEN
-		diagnostics.Error (fileName, Diagnostics.Invalid, Diagnostics.Invalid, "failed to open file"); RETURN;
+		diagnostics.Error (fileName, Diagnostics.Invalid, "failed to open file"); RETURN;
 	END;
 	END;
 
 
 	NEW (assembly, diagnostics, NIL);
 	NEW (assembly, diagnostics, NIL);
@@ -1991,7 +1991,7 @@ BEGIN
 		writer.Update;
 		writer.Update;
 		Files.Register(file);
 		Files.Register(file);
 	ELSE
 	ELSE
-		diagnostics.Error(filename, Diagnostics.Invalid, Diagnostics.Invalid, "Could not create output file");
+		diagnostics.Error(filename, Diagnostics.Invalid, "Could not create output file");
 		error := TRUE;
 		error := TRUE;
 	END;
 	END;
 END WriteBinary;
 END WriteBinary;

+ 4 - 4
source/PCM.Mod

@@ -361,11 +361,11 @@ IMPORT
 				err := Diagnostics.Invalid; pos := Diagnostics.Invalid; str := "too many errors"
 				err := Diagnostics.Invalid; pos := Diagnostics.Invalid; str := "too many errors"
 			END;
 			END;
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Error (source, pos, err, str);
+				diagnostics.Error (source, pos, str);
 			END;
 			END;
 		ELSE
 		ELSE
 			IF diagnostics # NIL THEN
 			IF diagnostics # NIL THEN
-				diagnostics.Information (source, pos, err, str);
+				diagnostics.Information (source, pos, str);
 			END;
 			END;
 		END;
 		END;
 	END Error;
 	END Error;
@@ -390,7 +390,7 @@ IMPORT
 			GetMessage (err, msg, str);
 			GetMessage (err, msg, str);
 		END;
 		END;
 		IF diagnostics # NIL THEN
 		IF diagnostics # NIL THEN
-			diagnostics.Warning (source, pos, err, str);
+			diagnostics.Warning (source, pos, str);
 		END;
 		END;
 	END Warning;
 	END Warning;
 
 
@@ -556,4 +556,4 @@ END PCM.
 	25.04.01	prk	array allocation: if length < 0 then trap PCM.ArraySizeTrap
 	25.04.01	prk	array allocation: if length < 0 then trap PCM.ArraySizeTrap
 	30.03.01	prk	object file version changed to 01X
 	30.03.01	prk	object file version changed to 01X
 	29.03.01	prk	Java imports
 	29.03.01	prk	Java imports
-*)
+*)

+ 2 - 2
source/PETXMLTree.Mod

@@ -154,7 +154,7 @@ TYPE
 
 
 		PROCEDURE ReportError(pos, line, row : LONGINT; CONST msg : ARRAY OF CHAR);
 		PROCEDURE ReportError(pos, line, row : LONGINT; CONST msg : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
-			diagnostics.Error("PET", pos, Diagnostics.Invalid, msg);
+			diagnostics.Error("PET", pos, msg);
 			hasErrors := TRUE;
 			hasErrors := TRUE;
 		END ReportError;
 		END ReportError;
 
 
@@ -221,4 +221,4 @@ END Cleanup;
 BEGIN
 BEGIN
 	Modules.InstallTermHandler(Cleanup);
 	Modules.InstallTermHandler(Cleanup);
 	CompilerInterface.Register("XML", "XML Parser", "XML", ParseText);
 	CompilerInterface.Register("XML", "XML Parser", "XML", ParseText);
-END PETXMLTree.
+END PETXMLTree.

+ 26 - 26
source/Release.Mod

@@ -451,7 +451,7 @@ TYPE
 					COPY(build.name, temp);
 					COPY(build.name, temp);
 					Strings.Append(temp, ": Import # not found in file #");
 					Strings.Append(temp, ": Import # not found in file #");
 					MakeMessage(message, temp, module.imports[i], name);
 					MakeMessage(message, temp, module.imports[i], name);
-					diagnostics.Error(builds.source, pos, Diagnostics.Invalid, message);
+					diagnostics.Error(builds.source, pos, message);
 				END;
 				END;
 			END;
 			END;
 		END CheckImports;
 		END CheckImports;
@@ -473,7 +473,7 @@ TYPE
 					SplitName(name, pre, mid, suf);
 					SplitName(name, pre, mid, suf);
 					IF (module.name # mid)  THEN
 					IF (module.name # mid)  THEN
 						MakeMessage(message, "Module name not equal to filename in #", name, "");
 						MakeMessage(message, "Module name not equal to filename in #", name, "");
-						diagnostics.Warning(builds.source, pos, Diagnostics.Invalid, message);
+						diagnostics.Warning(builds.source, pos, message);
 					END;
 					END;
 					CreateContext(module.name, module.context);
 					CreateContext(module.name, module.context);
 				END;
 				END;
@@ -916,7 +916,7 @@ TYPE
 					END;
 					END;
 				END;
 				END;
 			ELSE
 			ELSE
-				diagnostics.Error("", Diagnostics.Invalid, Diagnostics.Invalid, "No packages");
+				diagnostics.Error("", Diagnostics.Invalid, "No packages");
 			END;
 			END;
 		END GenerateZipFiles;
 		END GenerateZipFiles;
 
 
@@ -1014,7 +1014,7 @@ TYPE
 					END;
 					END;
 					IF (file.file = NIL) THEN
 					IF (file.file = NIL) THEN
 						MakeMessage(message, "File # does not exists (Package #)", file.name, file.package.name);
 						MakeMessage(message, "File # does not exists (Package #)", file.name, file.package.name);
-						diagnostics.Warning(builds.source, file.pos, Diagnostics.Invalid, message);
+						diagnostics.Warning(builds.source, file.pos, message);
 					ELSIF file.IsSourceCode() THEN
 					ELSIF file.IsSourceCode() THEN
 						file.ParseModule(diagnostics);
 						file.ParseModule(diagnostics);
 					END;
 					END;
@@ -1299,7 +1299,7 @@ TYPE
 				END;
 				END;
 			ELSE
 			ELSE
 				MakeMessage(message, "File # not found", file.name, "");
 				MakeMessage(message, "File # not found", file.name, "");
-				diagnostics.Error("", file.pos, Diagnostics.Invalid, message);
+				diagnostics.Error("", file.pos, message);
 				error := TRUE;
 				error := TRUE;
 			END;
 			END;
 		END CompileFile;
 		END CompileFile;
@@ -1483,7 +1483,7 @@ TYPE
 					INC(nofPrefixes);
 					INC(nofPrefixes);
 				ELSE
 				ELSE
 					error := TRUE;
 					error := TRUE;
-					diagnostics.Warning("", Diagnostics.Invalid, Diagnostics.Invalid, "Maximum number of prefixes exceeded");
+					diagnostics.Warning("", Diagnostics.Invalid, "Maximum number of prefixes exceeded");
 					FOR j := 0 TO LEN(prefixes)-1 DO
 					FOR j := 0 TO LEN(prefixes)-1 DO
 						TRACE(prefixes[j]);
 						TRACE(prefixes[j]);
 					END;
 					END;
@@ -1517,9 +1517,9 @@ TYPE
 				IF (file.file = NIL) THEN
 				IF (file.file = NIL) THEN
 					MakeMessage(message, "File # does not exists (Package #)", file.name, file.package.name);
 					MakeMessage(message, "File # does not exists (Package #)", file.name, file.package.name);
 					IF file.IsSourceCode() THEN
 					IF file.IsSourceCode() THEN
-						diagnostics.Error(source, file.pos, Diagnostics.Invalid, message);
+						diagnostics.Error(source, file.pos, message);
 					ELSE
 					ELSE
-						diagnostics.Warning(source, file.pos, Diagnostics.Invalid, message);
+						diagnostics.Warning(source, file.pos, message);
 					END;
 					END;
 				ELSIF file.IsSourceCode() THEN
 				ELSIF file.IsSourceCode() THEN
 					file.ParseModule(diagnostics);
 					file.ParseModule(diagnostics);
@@ -1670,7 +1670,7 @@ TYPE
 				INC(nofBuilds);
 				INC(nofBuilds);
 			ELSE
 			ELSE
 				error := TRUE;
 				error := TRUE;
-				diagnostics.Error(source, Diagnostics.Invalid, Diagnostics.Invalid, "Maximum number of builds exceeded");
+				diagnostics.Error(source, Diagnostics.Invalid, "Maximum number of builds exceeded");
 			END;
 			END;
 			RETURN ~error;
 			RETURN ~error;
 		END AddBuild;
 		END AddBuild;
@@ -1754,7 +1754,7 @@ TYPE
 								MakeMessage(message, "Excluded package '#' in build '#' does not exist",
 								MakeMessage(message, "Excluded package '#' in build '#' does not exist",
 									builds[build].excludedPackages[package]^,
 									builds[build].excludedPackages[package]^,
 									builds[build].name);
 									builds[build].name);
-								diagnostics.Error(source, Diagnostics.Invalid, Diagnostics.Invalid, message);
+								diagnostics.Error(source, Diagnostics.Invalid, message);
 							END;
 							END;
 						END;
 						END;
 					END;
 					END;
@@ -1816,7 +1816,7 @@ TYPE
 		BEGIN
 		BEGIN
 			error := TRUE;
 			error := TRUE;
 			MakeMessage(message, msg, par1, par2);
 			MakeMessage(message, msg, par1, par2);
-			diagnostics.Error(source, pos, Diagnostics.Invalid, message);
+			diagnostics.Error(source, pos, message);
 		END Error;
 		END Error;
 
 
 		PROCEDURE Check(CONST token : Token) : BOOLEAN;
 		PROCEDURE Check(CONST token : Token) : BOOLEAN;
@@ -1958,14 +1958,14 @@ TYPE
 		BEGIN
 		BEGIN
 			error := TRUE;
 			error := TRUE;
 			MakeMessage(message, msg, par1, par2);
 			MakeMessage(message, msg, par1, par2);
-			diagnostics.Error(scanner.source, pos, Diagnostics.Invalid, message);
+			diagnostics.Error(scanner.source, pos, message);
 		END Error;
 		END Error;
 
 
 		PROCEDURE Warning(pos : LONGINT; CONST msg, par1, par2 : ARRAY OF CHAR);
 		PROCEDURE Warning(pos : LONGINT; CONST msg, par1, par2 : ARRAY OF CHAR);
 		VAR message : ARRAY 128 OF CHAR;
 		VAR message : ARRAY 128 OF CHAR;
 		BEGIN
 		BEGIN
 			MakeMessage(message, msg, par1, par2);
 			MakeMessage(message, msg, par1, par2);
-			diagnostics.Warning(scanner.source, pos, Diagnostics.Invalid, message);
+			diagnostics.Warning(scanner.source, pos, message);
 		END Warning;
 		END Warning;
 
 
 		PROCEDURE IsFilename(CONST token : Token) : BOOLEAN;
 		PROCEDURE IsFilename(CONST token : Token) : BOOLEAN;
@@ -2313,7 +2313,7 @@ TYPE
 							END;
 							END;
 							builds.AddFile(token, currentRelease, currentPackage, scanner.pos);
 							builds.AddFile(token, currentRelease, currentPackage, scanner.pos);
 						ELSE
 						ELSE
-							diagnostics.Warning(scanner.source, scanner.pos, Diagnostics.Invalid, "Expected filename (not file extension?)");
+							diagnostics.Warning(scanner.source, scanner.pos, "Expected filename (not file extension?)");
 						END;
 						END;
 					ELSE
 					ELSE
 						Error(scanner.pos, "Expected identifier, found #", token, "");
 						Error(scanner.pos, "Expected identifier, found #", token, "");
@@ -2333,7 +2333,7 @@ TYPE
 				Incl(release,index);
 				Incl(release,index);
 			ELSE
 			ELSE
 				MakeMessage(message, "Unknown build prefix #", token, "");
 				MakeMessage(message, "Unknown build prefix #", token, "");
-				diagnostics.Warning(scanner.source, scanner.pos, Diagnostics.Invalid, message);
+				diagnostics.Warning(scanner.source, scanner.pos, message);
 			END;
 			END;
 			IF scanner.Get(token) THEN
 			IF scanner.Get(token) THEN
 				IF (token = OPENSECTION) THEN
 				IF (token = OPENSECTION) THEN
@@ -2470,13 +2470,13 @@ PROCEDURE GetModuleInfo(
 				IF (context = "") THEN
 				IF (context = "") THEN
 					error := TRUE;
 					error := TRUE;
 					MakeMessage(message, "Context identifier missing in file #", filename, "");
 					MakeMessage(message, "Context identifier missing in file #", filename, "");
-					diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+					diagnostics.Error(source, errorPosition, message);
 				END;
 				END;
 				SkipComments(in);
 				SkipComments(in);
 			ELSE
 			ELSE
 				error := TRUE;
 				error := TRUE;
 				MakeMessage(message, "Expected 'IN' keyword in file #", filename, "");
 				MakeMessage(message, "Expected 'IN' keyword in file #", filename, "");
-				diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+				diagnostics.Error(source, errorPosition, message);
 			END;
 			END;
 		END;
 		END;
 	END GetContext;
 	END GetContext;
@@ -2500,17 +2500,17 @@ PROCEDURE GetModuleInfo(
 				IF ~error & (ch # ";") THEN
 				IF ~error & (ch # ";") THEN
 					error := TRUE;
 					error := TRUE;
 					MakeMessage(message, "Expected semicolon after module identifier in file #", filename, "");
 					MakeMessage(message, "Expected semicolon after module identifier in file #", filename, "");
-					diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+					diagnostics.Error(source, errorPosition, message);
 				END;
 				END;
 			ELSE
 			ELSE
 				error := TRUE;
 				error := TRUE;
 				MakeMessage(message, "Module identifier missing in file #", filename, "");
 				MakeMessage(message, "Module identifier missing in file #", filename, "");
-				diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+				diagnostics.Error(source, errorPosition, message);
 			END;
 			END;
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
 			MakeMessage(message, "MODULE keyword missing in file #, first token is #", filename, token);
 			MakeMessage(message, "MODULE keyword missing in file #, first token is #", filename, token);
-			diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+			diagnostics.Error(source, errorPosition, message);
 		END;
 		END;
 	END GetModuleNameAndContext;
 	END GetModuleNameAndContext;
 
 
@@ -2526,7 +2526,7 @@ PROCEDURE GetModuleInfo(
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
 			MakeMessage(message, "Identifier expected in import section of file #", filename, "");
 			MakeMessage(message, "Identifier expected in import section of file #", filename, "");
-			diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+			diagnostics.Error(source, errorPosition, message);
 		END;
 		END;
 	END GetImport;
 	END GetImport;
 
 
@@ -2550,7 +2550,7 @@ PROCEDURE GetModuleInfo(
 					ELSE
 					ELSE
 						error := TRUE;
 						error := TRUE;
 						MakeMessage(message, "Maximum number of supported imports exceeded in module #", filename, "");
 						MakeMessage(message, "Maximum number of supported imports exceeded in module #", filename, "");
-						diagnostics.Error(source, Diagnostics.Invalid, Diagnostics.Invalid, message);
+						diagnostics.Error(source, Diagnostics.Invalid, message);
 						EXIT;
 						EXIT;
 					END;
 					END;
 
 
@@ -2563,7 +2563,7 @@ PROCEDURE GetModuleInfo(
 					ELSE
 					ELSE
 						error := TRUE;
 						error := TRUE;
 						MakeMessage(message, "Parsing import section of module # failed", filename, "");
 						MakeMessage(message, "Parsing import section of module # failed", filename, "");
-						diagnostics.Error(source, errorPosition, Diagnostics.Invalid, message);
+						diagnostics.Error(source, errorPosition, message);
 						EXIT;
 						EXIT;
 					END;
 					END;
 				ELSE
 				ELSE
@@ -2679,7 +2679,7 @@ BEGIN
 			reader := fileReader;
 			reader := fileReader;
 		ELSE
 		ELSE
 			MakeMessage(message, "Could not open file #", file.name, "");
 			MakeMessage(message, "Could not open file #", file.name, "");
-			diagnostics.Error(file.name, file.pos, Diagnostics.Invalid, message);
+			diagnostics.Error(file.name, file.pos, message);
 		END;
 		END;
 	END;
 	END;
 	IF (reader = NIL) THEN
 	IF (reader = NIL) THEN
@@ -2690,7 +2690,7 @@ BEGIN
 			reader := textReader;
 			reader := textReader;
 		ELSE
 		ELSE
 			MakeMessage(message, "Could not open file # (Package = )", file.name, "");
 			MakeMessage(message, "Could not open file # (Package = )", file.name, "");
-			diagnostics.Error(file.name, file.pos, Diagnostics.Invalid, message);
+			diagnostics.Error(file.name, file.pos, message);
 		END;
 		END;
 	END;
 	END;
 	RETURN reader;
 	RETURN reader;
@@ -2752,7 +2752,7 @@ BEGIN
 	ELSE
 	ELSE
 		builds := NIL;
 		builds := NIL;
 		MakeMessage(message, "Could not open file #", filename, "");
 		MakeMessage(message, "Could not open file #", filename, "");
-		diagnostics.Error("", Diagnostics.Invalid, Diagnostics.Invalid, message);
+		diagnostics.Error("", Diagnostics.Invalid, message);
 		RETURN FALSE;
 		RETURN FALSE;
 	END;
 	END;
 END ParseBuildFile;
 END ParseBuildFile;

+ 33 - 33
source/SyntaxHighlighter.Mod

@@ -1435,7 +1435,7 @@ BEGIN
 				Copy(string^, fontname);
 				Copy(string^, fontname);
 			END;
 			END;
 		ELSE
 		ELSE
-			diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Style font name missing");
+			diagnostics.Warning(source, element.GetPos(), "Style font name missing");
 		END;
 		END;
 
 
 		fontsize := 0;
 		fontsize := 0;
@@ -1447,7 +1447,7 @@ BEGIN
 				Strings.StrToInt(string^, fontsize);
 				Strings.StrToInt(string^, fontsize);
 			END;
 			END;
 		ELSE
 		ELSE
-			diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Style attribute font size missing");
+			diagnostics.Warning(source, element.GetPos(), "Style attribute font size missing");
 		END;
 		END;
 
 
 		string := element.GetAttributeValue(XmlAttributeFontStyle);
 		string := element.GetAttributeValue(XmlAttributeFontStyle);
@@ -1468,10 +1468,10 @@ BEGIN
 				IF (res = Strings.Ok) THEN
 				IF (res = Strings.Ok) THEN
 					INCL(defined, Color);
 					INCL(defined, Color);
 				ELSE
 				ELSE
-					diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Style attribute color: Invalid value");
+					diagnostics.Warning(source, element.GetPos(), "Style attribute color: Invalid value");
 				END;
 				END;
 			END;
 			END;
-		ELSE diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Style attribute color missing");
+		ELSE diagnostics.Warning(source, element.GetPos(), "Style attribute color missing");
 		END;
 		END;
 
 
 		bgcolor := 0;
 		bgcolor := 0;
@@ -1483,7 +1483,7 @@ BEGIN
 				IF (res = Strings.Ok) THEN
 				IF (res = Strings.Ok) THEN
 					INCL(defined, BgColor);
 					INCL(defined, BgColor);
 				ELSE
 				ELSE
-					diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Style attribute background color: Invalid value");
+					diagnostics.Warning(source, element.GetPos(), "Style attribute background color: Invalid value");
 				END;
 				END;
 			END;
 			END;
 		ELSE
 		ELSE
@@ -1509,7 +1509,7 @@ BEGIN
 		styles.Add(style);
 		styles.Add(style);
 	ELSE
 	ELSE
 		error := TRUE;
 		error := TRUE;
-		diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Style name missing");
+		diagnostics.Error(source, element.GetPos(), "Style name missing");
 	END;
 	END;
 END ParseStyle;
 END ParseStyle;
 
 
@@ -1530,7 +1530,7 @@ BEGIN
 			IF (string # NIL) & (string^ = XmlStyle) THEN
 			IF (string # NIL) & (string^ = XmlStyle) THEN
 				ParseStyle(ptr(XML.Element), styles, source, diagnostics, error);
 				ParseStyle(ptr(XML.Element), styles, source, diagnostics, error);
 			ELSE
 			ELSE
-				diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Expected style element");
+				diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Expected style element");
 			END;
 			END;
 		END;
 		END;
 	END;
 	END;
@@ -1571,24 +1571,24 @@ BEGIN
 						END;
 						END;
 						IF (res # Ok) THEN
 						IF (res # Ok) THEN
 							error := TRUE;
 							error := TRUE;
-							diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Token too long");
+							diagnostics.Error(source, element.GetPos(), "Token too long");
 						END;
 						END;
 						reader.SkipWhitespace;
 						reader.SkipWhitespace;
 						reader.Token(token);
 						reader.Token(token);
 					END;
 					END;
 				ELSE
 				ELSE
-					diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Empty group (string)");
+					diagnostics.Warning(source, element.GetPos(), "Empty group (string)");
 				END;
 				END;
 			ELSE
 			ELSE
-				diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Empty group");
+				diagnostics.Warning(source, element.GetPos(), "Empty group");
 			END;
 			END;
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Could not find style for group...");
+			diagnostics.Error(source, element.GetPos(), "Could not find style for group...");
 		END;
 		END;
 	ELSE
 	ELSE
 		error := TRUE;
 		error := TRUE;
-		diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Group name missing");
+		diagnostics.Error(source, element.GetPos(), "Group name missing");
 	END;
 	END;
 END ParseGroup;
 END ParseGroup;
 
 
@@ -1609,7 +1609,7 @@ BEGIN
 			IF (string # NIL) & (string^ = XmlGroup) THEN
 			IF (string # NIL) & (string^ = XmlGroup) THEN
 				ParseGroup(ptr(XML.Element), highlighter, styles, TypeTokens, source, diagnostics, error);
 				ParseGroup(ptr(XML.Element), highlighter, styles, TypeTokens, source, diagnostics, error);
 			ELSE
 			ELSE
-				diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Expected group element");
+				diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Expected group element");
 			END;
 			END;
 		END;
 		END;
 	END;
 	END;
@@ -1633,7 +1633,7 @@ BEGIN
 			IF (string # NIL) & (string^ = XmlGroup) THEN
 			IF (string # NIL) & (string^ = XmlGroup) THEN
 				ParseGroup(ptr(XML.Element), highlighter, styles, TypeWords, source, diagnostics, error);
 				ParseGroup(ptr(XML.Element), highlighter, styles, TypeWords, source, diagnostics, error);
 			ELSE
 			ELSE
-				diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Expected group element");
+				diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Expected group element");
 			END;
 			END;
 		END;
 		END;
 	END;
 	END;
@@ -1649,7 +1649,7 @@ BEGIN
 	IF (string # NIL) THEN
 	IF (string # NIL) THEN
 		highlighter.numberStyle := styles.Find(string^);
 		highlighter.numberStyle := styles.Find(string^);
 		IF (highlighter.numberStyle = NIL) THEN
 		IF (highlighter.numberStyle = NIL) THEN
-			diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Number style not found");
+			diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Number style not found");
 		END;
 		END;
 	END;
 	END;
 END ParseWords;
 END ParseWords;
@@ -1677,7 +1677,7 @@ BEGIN
 			styleOpen := style;
 			styleOpen := style;
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "OpenStyle not found");
+			diagnostics.Error(source, element.GetPos(), "OpenStyle not found");
 		END;
 		END;
 	END;
 	END;
 
 
@@ -1688,7 +1688,7 @@ BEGIN
 			styleClose := style;
 			styleClose := style;
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "CloseStyle not found");
+			diagnostics.Error(source, element.GetPos(), "CloseStyle not found");
 		END;
 		END;
 	END;
 	END;
 
 
@@ -1699,7 +1699,7 @@ BEGIN
 			styleContent := style;
 			styleContent := style;
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "ContentStyle not found");
+			diagnostics.Error(source, element.GetPos(), "ContentStyle not found");
 		END;
 		END;
 	END;
 	END;
 
 
@@ -1708,17 +1708,17 @@ BEGIN
 		Copy(string^, open);
 		Copy(string^, open);
 		IF (open = "") THEN
 		IF (open = "") THEN
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Region attribute open is empty");
+			diagnostics.Error(source, element.GetPos(), "Region attribute open is empty");
 		END;
 		END;
 	ELSE
 	ELSE
 		error := TRUE;
 		error := TRUE;
-		diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Region attribute open missing");
+		diagnostics.Error(source, element.GetPos(), "Region attribute open missing");
 	END;
 	END;
 
 
 	string := element.GetAttributeValue(XmlAttributeClose);
 	string := element.GetAttributeValue(XmlAttributeClose);
 	IF (string # NIL) THEN
 	IF (string # NIL) THEN
 		Copy(string^, close);
 		Copy(string^, close);
-	ELSE diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Region attribute close missing");
+	ELSE diagnostics.Warning(source, element.GetPos(), "Region attribute close missing");
 	END;
 	END;
 
 
 	nesting := FALSE;
 	nesting := FALSE;
@@ -1726,7 +1726,7 @@ BEGIN
 	IF (string # NIL) THEN
 	IF (string # NIL) THEN
 		Strings.TrimWS(string^);
 		Strings.TrimWS(string^);
 		Strings.StrToBool(string^, nesting);
 		Strings.StrToBool(string^, nesting);
-	ELSE diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Region attribute nesting missing");
+	ELSE diagnostics.Warning(source, element.GetPos(), "Region attribute nesting missing");
 	END;
 	END;
 
 
 	multiline := FALSE;
 	multiline := FALSE;
@@ -1734,7 +1734,7 @@ BEGIN
 	IF (string # NIL) THEN
 	IF (string # NIL) THEN
 		Strings.TrimWS(string^);
 		Strings.TrimWS(string^);
 		Strings.StrToBool(string^, multiline);
 		Strings.StrToBool(string^, multiline);
-	ELSE diagnostics.Warning(source, element.GetPos(), Diagnostics.Invalid, "Region attribute multiline missing");
+	ELSE diagnostics.Warning(source, element.GetPos(), "Region attribute multiline missing");
 	END;
 	END;
 
 
 	IF ~error THEN
 	IF ~error THEN
@@ -1759,7 +1759,7 @@ BEGIN
 			IF (string # NIL) & (string^ = XmlRegion) THEN
 			IF (string # NIL) & (string^ = XmlRegion) THEN
 				ParseRegion(ptr(XML.Element), highlighter, styles, source, diagnostics, error);
 				ParseRegion(ptr(XML.Element), highlighter, styles, source, diagnostics, error);
 			ELSE
 			ELSE
-				diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Expected region element");
+				diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Expected region element");
 			END;
 			END;
 		END;
 		END;
 	END;
 	END;
@@ -1786,7 +1786,7 @@ BEGIN
 				highlighter.defaultStyle := styles.Find(string^);
 				highlighter.defaultStyle := styles.Find(string^);
 				IF (highlighter.defaultStyle = NIL) THEN
 				IF (highlighter.defaultStyle = NIL) THEN
 					error := TRUE;
 					error := TRUE;
-					diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Default style not found");
+					diagnostics.Error(source, element.GetPos(), "Default style not found");
 				END;
 				END;
 			END;
 			END;
 		END;
 		END;
@@ -1807,7 +1807,7 @@ BEGIN
 		END;
 		END;
 	ELSE
 	ELSE
 		error := TRUE;
 		error := TRUE;
-		diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Highlighter name missing");
+		diagnostics.Error(source, element.GetPos(), "Highlighter name missing");
 	END;
 	END;
 END ParseHighlighter;
 END ParseHighlighter;
 
 
@@ -1828,7 +1828,7 @@ BEGIN
 			IF (string # NIL) & (string^ = XmlHighlighter) THEN
 			IF (string # NIL) & (string^ = XmlHighlighter) THEN
 				ParseHighlighter(ptr(XML.Element), highlighters, styles, source, diagnostics, error);
 				ParseHighlighter(ptr(XML.Element), highlighters, styles, source, diagnostics, error);
 			ELSE
 			ELSE
-				diagnostics.Warning(source, ptr(XML.Element).GetPos(), Diagnostics.Invalid, "Expected highlighter element");
+				diagnostics.Warning(source, ptr(XML.Element).GetPos(), "Expected highlighter element");
 			END;
 			END;
 		END;
 		END;
 	END;
 	END;
@@ -1854,7 +1854,7 @@ BEGIN
 			ParseStyles(element, styles, source, diagnostics, error);
 			ParseStyles(element, styles, source, diagnostics, error);
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Styles section missing");
+			diagnostics.Error(source, element.GetPos(), "Styles section missing");
 		END;
 		END;
 
 
 		NEW(highlighters);
 		NEW(highlighters);
@@ -1863,11 +1863,11 @@ BEGIN
 			ParseHighlighters(element, highlighters, styles, source, diagnostics, error);
 			ParseHighlighters(element, highlighters, styles, source, diagnostics, error);
 		ELSE
 		ELSE
 			error := TRUE;
 			error := TRUE;
-			diagnostics.Error(source, element.GetPos(), Diagnostics.Invalid, "Highlighters section missing");
+			diagnostics.Error(source, element.GetPos(), "Highlighters section missing");
 		END;
 		END;
 	ELSE
 	ELSE
 		error := TRUE;
 		error := TRUE;
-		diagnostics.Error(source, root.GetPos(), Diagnostics.Invalid, "XML root element name mismatch");
+		diagnostics.Error(source, root.GetPos(), "XML root element name mismatch");
 	END;
 	END;
 END ParseDocument;
 END ParseDocument;
 
 
@@ -1907,7 +1907,7 @@ END FindChild;
 PROCEDURE TrapHandler(pos, line, row: LONGINT; CONST msg: ARRAY OF CHAR);
 PROCEDURE TrapHandler(pos, line, row: LONGINT; CONST msg: ARRAY OF CHAR);
 BEGIN
 BEGIN
 	error := TRUE;
 	error := TRUE;
-	diagnostics.Error(source, pos, Diagnostics.Invalid, msg);
+	diagnostics.Error(source, pos, msg);
 END TrapHandler;
 END TrapHandler;
 
 
 PROCEDURE LoadDocument(CONST filename : ARRAY OF CHAR; CONST d: Diagnostics.Diagnostics; VAR e : BOOLEAN) : XML.Document;
 PROCEDURE LoadDocument(CONST filename : ARRAY OF CHAR; CONST d: Diagnostics.Diagnostics; VAR e : BOOLEAN) : XML.Document;
@@ -1931,7 +1931,7 @@ BEGIN
 		END;
 		END;
 	ELSE
 	ELSE
 		e := TRUE;
 		e := TRUE;
-		d.Error(filename, Diagnostics.Invalid, Diagnostics.Invalid, "File not found");
+		d.Error(filename, Diagnostics.Invalid, "File not found");
 	END;
 	END;
 	diagnostics := NIL; source := "";
 	diagnostics := NIL; source := "";
 	ASSERT(error OR (document # NIL));
 	ASSERT(error OR (document # NIL));
@@ -2085,4 +2085,4 @@ WMPerfMonPluginModVars.Install SyntaxHighlighter
 	SyntaxHighlighter.NnofPiNestedFull SyntaxHighlighter.NnofPiNestedSimple,
 	SyntaxHighlighter.NnofPiNestedFull SyntaxHighlighter.NnofPiNestedSimple,
 	SyntaxHighlighter.NnofPiRescan SyntaxHighlighter.NnofPiSimple SyntaxHighlighter.NnofPiNoHit SyntaxHighlighter.NnofPiNoHitRescan
 	SyntaxHighlighter.NnofPiRescan SyntaxHighlighter.NnofPiSimple SyntaxHighlighter.NnofPiNoHit SyntaxHighlighter.NnofPiNoHitRescan
 	SyntaxHighlighter.NnofPiNoHitFull
 	SyntaxHighlighter.NnofPiNoHitFull
-~
+~

+ 2 - 2
source/TestSuite.Mod

@@ -59,10 +59,10 @@ TYPE
 		ClearList (tests);
 		ClearList (tests);
 		WHILE SkipComment (r) DO
 		WHILE SkipComment (r) DO
 			IF ~ReadType (r, type) OR ~SkipWhitespace (r) OR ~ReadText (r, name) THEN
 			IF ~ReadType (r, type) OR ~SkipWhitespace (r) OR ~ReadText (r, name) THEN
-				diagnostics.Error (name, r.Pos(), Diagnostics.Invalid, "parse error"); RETURN FALSE;
+				diagnostics.Error (name, r.Pos(), "parse error"); RETURN FALSE;
 			END;
 			END;
 			IF FindResult (tests, name) # NIL THEN
 			IF FindResult (tests, name) # NIL THEN
-				diagnostics.Error (name, Diagnostics.Invalid, Diagnostics.Invalid, "duplicated test"); RETURN FALSE;
+				diagnostics.Error (name, Diagnostics.Invalid, "duplicated test"); RETURN FALSE;
 			END;
 			END;
 			code.Clear; writer.Reset;
 			code.Clear; writer.Reset;
 			WHILE SkipLn (r) & Tabulator (r) & ReadText (r, line) DO writer.Char (09X); writer.String (line); writer.Char (0AX); END;
 			WHILE SkipLn (r) & Tabulator (r) & ReadText (r, line) DO writer.Char (09X); writer.String (line); writer.Char (0AX); END;

+ 3 - 3
source/TextConverter.Mod

@@ -13,12 +13,12 @@ BEGIN
 		IF res = 0 THEN
 		IF res = 0 THEN
 			converter (text, filename, res);
 			converter (text, filename, res);
 			IF res = 0 THEN
 			IF res = 0 THEN
-				diagnostics.Information (filename, Diagnostics.Invalid, Diagnostics.Invalid, "successfully converted");
+				diagnostics.Information (filename, Diagnostics.Invalid, "successfully converted");
 			ELSE
 			ELSE
-				diagnostics.Information (filename, Diagnostics.Invalid, Diagnostics.Invalid, "failed to store");
+				diagnostics.Information (filename, Diagnostics.Invalid, "failed to store");
 			END
 			END
 		ELSE
 		ELSE
-			diagnostics.Error (filename, Diagnostics.Invalid, Diagnostics.Invalid, "failed to load");
+			diagnostics.Error (filename, Diagnostics.Invalid, "failed to load");
 		END;
 		END;
 	END;
 	END;
 END Convert;
 END Convert;

+ 15 - 60
source/WMDiagnostics.Mod

@@ -1,7 +1,7 @@
 MODULE WMDiagnostics; (** AUTHOR "staubesv"; PURPOSE "Visual Component for Diagnostics Interface"; *)
 MODULE WMDiagnostics; (** AUTHOR "staubesv"; PURPOSE "Visual Component for Diagnostics Interface"; *)
 
 
 IMPORT
 IMPORT
-	Locks, Strings, Diagnostics, Files,
+	Locks, Strings, Diagnostics, Files, Streams,
 	WMRectangles, WMGraphics, WMGraphicUtilities, WMBitmapFont,
 	WMRectangles, WMGraphics, WMGraphicUtilities, WMBitmapFont,
 	WMEvents, WMProperties, WMGrids, WMTextView;
 	WMEvents, WMProperties, WMGrids, WMTextView;
 
 
@@ -32,15 +32,13 @@ CONST
 	SortByTypeDescending* = 1;
 	SortByTypeDescending* = 1;
 	SortByPositionAscending* = 2;
 	SortByPositionAscending* = 2;
 	SortByPositionDescending* = 3;
 	SortByPositionDescending* = 3;
-	SortByErrorCodeAscending* = 4;
-	SortByErrorCodeDescending* = 5;
 
 
 TYPE
 TYPE
 
 
 	Entry* = RECORD
 	Entry* = RECORD
 		type- : LONGINT;
 		type- : LONGINT;
 		source- : Files.FileName;
 		source- : Files.FileName;
-		position-, errorCode- : LONGINT;
+		position-: Streams.Position;
 		message- : ARRAY 256 OF CHAR;
 		message- : ARRAY 256 OF CHAR;
 	END;
 	END;
 
 
@@ -149,40 +147,39 @@ TYPE
 			END;
 			END;
 		END CheckEntriesSize;
 		END CheckEntriesSize;
 
 
-		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Error*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
-			Add(TypeError, source, position, errorCode, message, nofErrors)
+			Add(TypeError, source, position, message, nofErrors)
 		END Error;
 		END Error;
 
 
-		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Warning*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
-			Add(TypeWarning, source, position, errorCode, message, nofWarnings);
+			Add(TypeWarning, source, position, message, nofWarnings);
 		END Warning;
 		END Warning;
 
 
-		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR);
+		PROCEDURE Information*(CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR);
 		BEGIN
 		BEGIN
-			Add(TypeInformation, source, position, errorCode, message, nofInformations);
+			Add(TypeInformation, source, position, message, nofInformations);
 		END Information;
 		END Information;
 
 
-		PROCEDURE Exists(type, position, errorCode : LONGINT; CONST message: ARRAY OF CHAR) : BOOLEAN;
+		PROCEDURE Exists(type: WORD; position : Streams.Position; CONST message: ARRAY OF CHAR) : BOOLEAN;
 		VAR i : LONGINT;
 		VAR i : LONGINT;
 		BEGIN
 		BEGIN
 			i := 0;
 			i := 0;
-			WHILE (i < nofEntries) & ((entries[i].type # type) OR (entries[i].position # position) OR (entries[i].errorCode # errorCode) OR (entries[i].message # message)) DO
+			WHILE (i < nofEntries) & ((entries[i].type # type) OR (entries[i].position # position) OR (entries[i].message # message)) DO
 				INC(i);
 				INC(i);
 			END;
 			END;
 			RETURN (nofEntries > 0) & (i < nofEntries);
 			RETURN (nofEntries > 0) & (i < nofEntries);
 		END Exists;
 		END Exists;
 
 
-		PROCEDURE Add(type: LONGINT; CONST source : ARRAY OF CHAR; position, errorCode : LONGINT; CONST message : ARRAY OF CHAR; VAR counter: LONGINT);
+		PROCEDURE Add(type: WORD; CONST source : ARRAY OF CHAR; position : Streams.Position; CONST message : ARRAY OF CHAR; VAR counter: LONGINT);
 		BEGIN
 		BEGIN
 			AcquireWrite;
 			AcquireWrite;
-			IF ~Exists(type, position, errorCode,message) THEN
+			IF ~Exists(type, position, message) THEN
 				CheckEntriesSize;
 				CheckEntriesSize;
 				entries[nofEntries].type := type;
 				entries[nofEntries].type := type;
 				COPY(source, entries[nofEntries].source);
 				COPY(source, entries[nofEntries].source);
 				entries[nofEntries].position := position;
 				entries[nofEntries].position := position;
-				entries[nofEntries].errorCode := errorCode;
 				COPY(message, entries[nofEntries].message);
 				COPY(message, entries[nofEntries].message);
 				INC(nofEntries); INC(counter);
 				INC(nofEntries); INC(counter);
 				changed := TRUE;
 				changed := TRUE;
@@ -227,7 +224,6 @@ TYPE
 					IF SELF.entries[i].type = type THEN
 					IF SELF.entries[i].type = type THEN
 						entries[dest].type := SELF.entries[i].type;
 						entries[dest].type := SELF.entries[i].type;
 						entries[dest].position := SELF.entries[i].position;
 						entries[dest].position := SELF.entries[i].position;
-						entries[dest].errorCode := SELF.entries[i].errorCode;
 						entries[dest].source := SELF.entries[i].source;
 						entries[dest].source := SELF.entries[i].source;
 						entries[dest].message := SELF.entries[i].message;
 						entries[dest].message := SELF.entries[i].message;
 						INC(dest);
 						INC(dest);
@@ -333,7 +329,7 @@ TYPE
 		END RecacheProperties;
 		END RecacheProperties;
 
 
 		PROCEDURE OnClickHandler(sender, data : ANY);
 		PROCEDURE OnClickHandler(sender, data : ANY);
-		CONST Position = 0; ErrorCode = 1;
+		CONST Position = 0;
 		VAR column, row, newMode : LONGINT;
 		VAR column, row, newMode : LONGINT;
 		BEGIN
 		BEGIN
 			IF ~IsCallFromSequencer() THEN sequencer.ScheduleEvent(SELF.OnClickHandler, sender, data)
 			IF ~IsCallFromSequencer() THEN sequencer.ScheduleEvent(SELF.OnClickHandler, sender, data)
@@ -346,38 +342,18 @@ TYPE
 							|SortByTypeAscending:
 							|SortByTypeAscending:
 								IF (column = Position) THEN
 								IF (column = Position) THEN
 									newMode := SortByTypeDescending;
 									newMode := SortByTypeDescending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeAscending;
 								END;
 								END;
 							|SortByTypeDescending:
 							|SortByTypeDescending:
 								IF (column = Position) THEN
 								IF (column = Position) THEN
 									newMode := SortByTypeAscending;
 									newMode := SortByTypeAscending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeDescending;
 								END;
 								END;
 							|SortByPositionAscending:
 							|SortByPositionAscending:
 								IF (column = Position) THEN
 								IF (column = Position) THEN
 									newMode := SortByPositionDescending;
 									newMode := SortByPositionDescending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeAscending;
 								END;
 								END;
 							|SortByPositionDescending:
 							|SortByPositionDescending:
 								IF (column = Position) THEN
 								IF (column = Position) THEN
 									newMode := SortByPositionAscending;
 									newMode := SortByPositionAscending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeDescending;
-								END;
-							|SortByErrorCodeAscending:
-								IF (column = Position) THEN
-									newMode := SortByTypeAscending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeDescending;
-								END;
-							|SortByErrorCodeDescending:
-								IF (column = Position) THEN
-									newMode := SortByTypeDescending;
-								ELSIF (column = ErrorCode) THEN
-									newMode := SortByErrorCodeAscending;
 								END;
 								END;
 						ELSE
 						ELSE
 							newMode := sortByI; (* don't change *)
 							newMode := sortByI; (* don't change *)
@@ -412,8 +388,7 @@ TYPE
 		BEGIN
 		BEGIN
 			ASSERT(
 			ASSERT(
 				(mode = SortByTypeAscending) OR (mode = SortByTypeDescending) OR
 				(mode = SortByTypeAscending) OR (mode = SortByTypeDescending) OR
-				(mode = SortByPositionAscending) OR (mode = SortByPositionDescending) OR
-				(mode = SortByErrorCodeAscending) OR (mode = SortByErrorCodeDescending)
+				(mode = SortByPositionAscending) OR (mode = SortByPositionDescending)
 			);
 			);
 			Acquire;
 			Acquire;
 			IF (mode # sortByI) THEN
 			IF (mode # sortByI) THEN
@@ -423,8 +398,6 @@ TYPE
 					|SortByTypeDescending: SortEntries(CompareByType, FALSE);
 					|SortByTypeDescending: SortEntries(CompareByType, FALSE);
 					|SortByPositionAscending: SortEntries(CompareByPosition, TRUE);
 					|SortByPositionAscending: SortEntries(CompareByPosition, TRUE);
 					|SortByPositionDescending: SortEntries(CompareByPosition, FALSE);
 					|SortByPositionDescending: SortEntries(CompareByPosition, FALSE);
-					|SortByErrorCodeAscending: SortEntries(CompareByErrorCode, TRUE);
-					|SortByErrorCodeDescending: SortEntries(CompareByErrorCode, FALSE);
 				END;
 				END;
 				Invalidate;
 				Invalidate;
 			END;
 			END;
@@ -452,9 +425,7 @@ TYPE
 			IF (textViews # NIL) THEN
 			IF (textViews # NIL) THEN
 				FOR i := 0 TO nofEntries - 1 DO
 				FOR i := 0 TO nofEntries - 1 DO
 
 
-					IF (entries[i].errorCode = 400) THEN
-						picture := PicturePCPosition;
-					ELSIF (entries[i].type = Diagnostics.TypeError) THEN
+					IF (entries[i].type = Diagnostics.TypeError) THEN
 						picture := PictureError;
 						picture := PictureError;
 					ELSIF (entries[i].type = Diagnostics.TypeWarning) THEN
 					ELSIF (entries[i].type = Diagnostics.TypeWarning) THEN
 						picture := PictureWarning;
 						picture := PictureWarning;
@@ -649,11 +620,6 @@ TYPE
 						ELSIF entries[y - 1].type = TypeInformation THEN
 						ELSIF entries[y - 1].type = TypeInformation THEN
 							(* do nothing *)
 							(* do nothing *)
 						END;
 						END;
-					| 1 : IF (entries[y-1].errorCode # Invalid) THEN
-							Strings.IntToStr(entries[y - 1].errorCode, str);
-						ELSE
-							COPY("", str);
-						END;
 					| 2 : COPY(entries[y - 1].message, str)
 					| 2 : COPY(entries[y - 1].message, str)
 				ELSE
 				ELSE
 				END;
 				END;
@@ -681,17 +647,6 @@ BEGIN
 	RETURN result;
 	RETURN result;
 END CompareByPosition;
 END CompareByPosition;
 
 
-PROCEDURE CompareByErrorCode(CONST e1, e2 : Entry) : LONGINT;
-VAR result : LONGINT;
-BEGIN
-	IF (e1.errorCode < e2.errorCode) THEN result := Less;
-	ELSIF (e1.errorCode > e2.errorCode) THEN result := Greater;
-	ELSE
-		result := CompareByPosition(e1, e2);
-	END;
-	RETURN result;
-END CompareByErrorCode;
-
 PROCEDURE CompareByType(CONST e1, e2 : Entry) : LONGINT;
 PROCEDURE CompareByType(CONST e1, e2 : Entry) : LONGINT;
 VAR result : LONGINT;
 VAR result : LONGINT;
 BEGIN
 BEGIN

+ 1 - 1
source/WhitespaceRemover.Mod

@@ -53,7 +53,7 @@ BEGIN
 	WHILE ~reader.eot DO
 	WHILE ~reader.eot DO
 		IF (char = LineFeed) THEN
 		IF (char = LineFeed) THEN
 			IF lastCharWasWhitespace THEN
 			IF lastCharWasWhitespace THEN
-				diagnostics.Warning("", lastWhitespacePosition, Diagnostics.Invalid, "Whitespace at end of line");
+				diagnostics.Warning("", lastWhitespacePosition, "Whitespace at end of line");
 				lastCharWasWhitespace := FALSE;
 				lastCharWasWhitespace := FALSE;
 			END;
 			END;
 		ELSIF TextUtilities.IsWhiteSpace(char, text.isUTF) THEN
 		ELSIF TextUtilities.IsWhiteSpace(char, text.isUTF) THEN

+ 1 - 1
tools/builds/a2/DependencyWalker.Mod

@@ -7,7 +7,7 @@ VAR reader: Streams.Reader; scanner: FoxScanner.Scanner; parser: FoxParser.Parse
 VAR module: FoxSyntaxTree.Module; import: FoxSyntaxTree.Import; string: ARRAY 64 OF CHAR;
 VAR module: FoxSyntaxTree.Module; import: FoxSyntaxTree.Import; string: ARRAY 64 OF CHAR;
 BEGIN
 BEGIN
 	reader := FoxBasic.GetFileReader (moduleName);
 	reader := FoxBasic.GetFileReader (moduleName);
-	IF reader = NIL THEN diagnostics.Error (moduleName, Diagnostics.Invalid, Diagnostics.Invalid, "Failed to open module"); RETURN FALSE END;
+	IF reader = NIL THEN diagnostics.Error (moduleName, Diagnostics.Invalid, "Failed to open module"); RETURN FALSE END;
 	scanner := FoxScanner.NewScanner (moduleName, reader, 0, diagnostics);
 	scanner := FoxScanner.NewScanner (moduleName, reader, 0, diagnostics);
 	NEW (parser, scanner, diagnostics);
 	NEW (parser, scanner, diagnostics);
 	module := parser.Module ();
 	module := parser.Module ();