diff --git a/ide/fptools.pas b/ide/fptools.pas index 88f3255b15..03658d2806 100644 --- a/ide/fptools.pas +++ b/ide/fptools.pas @@ -150,7 +150,7 @@ const procedure RegisterFPTools; {$ifdef DEBUG} -Procedure FpToolsDebugMessage(AFileName, AText : string; ALine, APos : sw_word); +Procedure FpToolsDebugMessage(AFileName, AText : string; ALine, APos : string;nrline,nrpos:sw_word); {$endif DEBUG} implementation @@ -1652,13 +1652,13 @@ begin end; {$ifdef DEBUG} -Procedure FpToolsDebugMessage(AFileName, AText : string; ALine, APos : sw_word); +Procedure FpToolsDebugMessage(AFileName, AText : string; ALine, APos :string ;nrline,nrpos:sw_word); begin - AddToolMessage(AFileName,AText,Aline,APos); + AddToolMessage(AFileName,AText,nrline,nrPos); UpdateToolMessages; end; begin - DebugMessage:=@FpToolsDebugMessage; + DebugMessageS:=@FpToolsDebugMessage; {$endif DEBUG} END. diff --git a/ide/wchmhwrap.pas b/ide/wchmhwrap.pas index a43fe6bfa0..fc3a77ea75 100644 --- a/ide/wchmhwrap.pas +++ b/ide/wchmhwrap.pas @@ -45,7 +45,7 @@ function combinepaths(relpath,basepath:String):String; begin {$ifdef combinedebug} - debugmessageS({$i %file%},'combine in "'+relpath+'" and "'+basepath+'"',{$i %line%},'1'); + debugmessageS({$i %file%},'combine in "'+relpath+'" and "'+basepath+'"',{$i %line%},'1',0,0); {$endif} if relpath='' then exit; @@ -58,7 +58,7 @@ begin end; {$ifdef combinedebug} - debugmessageS({$i %file%},'combine out "'+relpath+'" and "'+basepath+'"',{$i %line%},'1'); + debugmessageS({$i %file%},'combine out "'+relpath+'" and "'+basepath+'"',{$i %line%},'1',0,0); {$endif} result:=basepath+relpath; @@ -78,12 +78,12 @@ begin exit; end; {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: before sitemap creation ',{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: before sitemap creation ',{$i %line%},'1',0,0); {$endif} findex:=TChmSiteMap.create(stindex); ftopic:=TChmSiteMap.create(sttoc); {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: after sitemap creation ',{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: after sitemap creation ',{$i %line%},'1',0,0); {$endif} floaded:=false; end; @@ -108,7 +108,7 @@ begin if not assigned (fchmr) then exit; if floaded then exit; {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: indexfilename:'+fchmr.indexfile,{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: indexfilename:'+fchmr.indexfile,{$i %line%},'1',0,0); {$endif} m:=fchmr.getobject(fchmr.indexfile); @@ -116,7 +116,7 @@ begin if assigned(m) then begin {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: stream size loaded :'+inttostr(m.size),{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: stream size loaded :'+inttostr(m.size),{$i %line%},'1',0,0); {$endif} findex.loadfromStream(m); end; @@ -124,7 +124,7 @@ begin freeandnil(m); end; {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: loadindex after final ',{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: loadindex after final ',{$i %line%},'1',0,0); {$endif} tli:=TopicLinks^.AddItem(fchmr.defaultpage); @@ -138,7 +138,7 @@ begin IndexEntries^.Insert(NewIndexEntry( FormatAlias(item.text),ID,TLI)); end; {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: endloadindex ',{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: endloadindex ',{$i %line%},'1',0,0); {$endif} floaded:=true; result:=true; @@ -159,7 +159,7 @@ begin linedata:=Classes.TStringList.create; try {$ifdef wdebug} - debugmessageS({$i %file%},'TCHMWrapper: Getting file '+name,{$i %line%},'1'); + debugmessageS({$i %file%},'TCHMWrapper: Getting file '+name,{$i %line%},'1',0,0); {$endif} // if uppercase(name)='TABLE OF CONTENTS' Then // m:=fchmr.getobject(fchmr.tocfile) diff --git a/ide/whtmlhlp.pas b/ide/whtmlhlp.pas index d0325c2287..8efb76a091 100644 --- a/ide/whtmlhlp.pas +++ b/ide/whtmlhlp.pas @@ -635,7 +635,7 @@ begin begin Topic^.NamedMarks^.InsertStr(Name); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Adding Name "'+Name+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Adding Name "'+Name+'"',{$i %line%},'1',0,0); {$endif WDEBUG} AddChar(hscNamedMark); end; @@ -647,7 +647,7 @@ begin InAnchor:=true; AddChar(hscLink); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Adding Link1 "'+HRef+'"'+' "'+url+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Adding Link1 "'+HRef+'"'+' "'+url+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} if pos('#',HRef)=1 then @@ -655,7 +655,7 @@ begin HRef:=canonicalizeURL(URL,HRef); LinkIndexes[LinkPtr]:=TopicLinks^.AddItem(HRef); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Adding Link2 "'+HRef+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Adding Link2 "'+HRef+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} Inc(LinkPtr); end; @@ -671,7 +671,7 @@ end; procedure THTMLTopicRenderer.DocUnknownTag; begin {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Unknown tag "'+TagName+'" params "'+TagParams+'"' ,{$i %line%},'1'); + DebugMessageS({$i %file%},' Unknown tag "'+TagName+'" params "'+TagParams+'"' ,{$i %line%},'1',0,0); {$endif WDEBUG} end; @@ -1300,7 +1300,7 @@ begin for I:=0 to Min(Topic^.LinkCount-1,High(LinkIndexes)-1) do begin {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Indexing links ('+inttostr(i)+')'+topiclinks^.at(linkindexes[i])^,{$i %line%},'1'); + DebugMessageS({$i %file%},' Indexing links ('+inttostr(i)+')'+topiclinks^.at(linkindexes[i])^,{$i %line%},'1',0,0); {$endif WDEBUG} Topic^.Links^[I].FileID:=Topic^.FileID; Topic^.Links^[I].Context:=EncodeHTMLCtx(Topic^.FileID,LinkIndexes[I]+1); @@ -1381,12 +1381,12 @@ begin begin Link:=TopicLinks^.At((T^.HelpCtx and $ffff)-1)^; {$IFDEF WDEBUG} - DebugMessageS({$i %file%},'(Topicinfo) Link before formatpath "'+link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},'(Topicinfo) Link before formatpath "'+link+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} Link:=FormatPath(Link); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},'(Topicinfo) Link after formatpath "'+link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},'(Topicinfo) Link after formatpath "'+link+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} P:=Pos('#',Link); if P>0 then @@ -1422,11 +1422,11 @@ begin begin Link:=TopicLinks^.At((T^.HelpCtx and $ffff)-1)^; {$IFDEF WDEBUG} - DebugMessageS({$i %file%},'(ReadTopic) Link before formatpath "'+link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},'(ReadTopic) Link before formatpath "'+link+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} Link:=FormatPath(Link); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},'(ReadTopic) Link before formatpath "'+link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},'(ReadTopic) Link before formatpath "'+link+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} P:=Pos('#',Link); if P>0 then @@ -1450,7 +1450,7 @@ begin if (HTMLFile=nil) then begin {$IFDEF WDEBUG} - DebugMessageS({$i %file%},'(ReadTopic) Filename not known: "'+link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},'(ReadTopic) Filename not known: "'+link+'"',{$i %line%},'1',0,0); {$ENDIF WDEBUG} end; if (p>1) and (HTMLFile=nil) then @@ -1645,7 +1645,7 @@ begin Link:=TopicLinks^.At((T^.HelpCtx and $ffff)-1)^; Link:=FormatPath(Link); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Looking for "'+Link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Looking for "'+Link+'"',{$i %line%},'1',0,0); {$endif WDEBUG} P:=Pos('#',Link); if P>0 then @@ -1681,11 +1681,11 @@ begin begin Link:=TopicLinks^.At((T^.HelpCtx and $ffff)-1)^; {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Looking for "'+Link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Looking for "'+Link+'"',{$i %line%},'1',0,0); {$endif WDEBUG} Link:=FormatPath(Link); {$IFDEF WDEBUG} - DebugMessageS({$i %file%},' Looking for (after formatpath) "'+Link+'"',{$i %line%},'1'); + DebugMessageS({$i %file%},' Looking for (after formatpath) "'+Link+'"',{$i %line%},'1',0,0); {$endif WDEBUG} P:=Pos('#',Link); if P>0 then diff --git a/ide/wutils.pas b/ide/wutils.pas index 4999e70fd9..d225e025c2 100644 --- a/ide/wutils.pas +++ b/ide/wutils.pas @@ -190,10 +190,10 @@ procedure RegisterWUtils; Procedure DebugMessage(AFileName, AText : string; ALine, APos : sw_word); // calls DebugMessage -Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string); +Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string; nrLine, nrPos : sw_word); type - TDebugMessage = procedure(AFileName, AText : string; ALine, APos : String); + TDebugMessage = procedure(AFileName, AText : string; ALine, APos : String; nrLine, nrPos : sw_word); Const DebugMessageS : TDebugMessage = @WUtilsDebugMessage; @@ -1276,10 +1276,10 @@ end; Procedure DebugMessage(AFileName, AText : string; ALine, APos : sw_word); // calls DebugMessage begin - WUtilsDebugMessage(Afilename,AText,inttostr(aline),inttostr(apos)); + DebugMessageS(Afilename,AText,'','',aline,apos); end; -Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string); +Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : string;nrLine, nrPos : sw_word); begin writeln(stderr,AFileName,' (',ALine,',',APos,') ',AText); flush(stderr);