[fpc-devel] [patch] pscanner: differentiate between EOL & Tab characters from general Whitespace

Ċ½ilvinas Ledas zilvinas.ledas at dict.lt
Sat Aug 28 21:51:05 CEST 2010


On 2010-08-28 01:38, Graeme Geldenhuys wrote:
>
> Alternatively (though not tested) - you should be able to download a
> zip archive of the latest code via this URL:
>     http://github.com/graemeg/fpprofiler/zipball/HEAD
Tried sample project today. Some a comment and a question:
1) I have a strange error when the same file is modified twice (and 
afterwards restored twice). One is:
insert: E:\lazarus\components\fpprofiler\demo\test001\test001.pp 
.......... OK
and another is:
insert: .\test001.pp
  - After these two modifications modified units have compilation errors 
(duplicate uses units).
  - When modifications are removed - duplicate files are deleted totally.
  - (BTW, when -r is used for fpp it is passed to fpc and fpc is not happy.)
  - I am attaching console output if it helps at all.
  - I used a workaround:
In procedure InsertProfilingCode(FileList: TStrings; ModTokenProc: 
TModTokenProc);
-----
   //make a copy of the original files and process them
   for i := 0 to FileList.Count - 1 do
   begin
     if FileExists(FileList[i] + FPPROF_EXT) then begin  // <-- if the 
file is processed (backup exists) - do not process it again
       writer.AddIgnoredFile(FileList[i]);  // <-- (don't know if this 
is required?)
       Continue; // <--
     end; // <--
-----
In procedure RemoveProfilingCodeFromFile(const FileName: string);
-----
begin
   if FileExists(FileName) then begin  // <-- if there is no backup file 
- do not delete original file
-----

2) Where should I write comments/bug reports for fpprofiler?


Regards
Ċ½ilvinas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fpprof_outout.txt
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100828/525cd988/attachment.txt>


More information about the fpc-devel mailing list