* small enhancement to wutils 'writeln(stderr,...); kind of debugging'

git-svn-id: trunk@11886 -
This commit is contained in:
marco 2008-10-12 10:56:15 +00:00
parent a091b51e31
commit 9ad5720e46

View File

@ -184,13 +184,15 @@ const LastStrToIntResult : integer = 0;
procedure RegisterWUtils;
Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : sw_word);
Procedure DebugMessage(AFileName, AText : string; ALine, APos : sw_word); // calls DebugMessage
Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string);
type
TDebugMessage = procedure(AFileName, AText : string; ALine, APos : sw_word);
TDebugMessage = procedure(AFileName, AText : string; ALine, APos : String);
Const
DebugMessage : TDebugMessage = @WUtilsDebugMessage;
DebugMessageS : TDebugMessage = @WUtilsDebugMessage;
implementation
@ -1265,9 +1267,15 @@ begin
{$endif}
end;
Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : sw_word);
Procedure DebugMessage(AFileName, AText : string; ALine, APos : sw_word); // calls DebugMessage
begin
WUtilsDebugMessage(Afilename,AText,inttostr(aline),inttostr(apos));
end;
Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string);
begin
writeln(stderr,AFileName,' (',ALine,',',APos,') ',AText);
flush(stderr);
end;
BEGIN