[Lazarus] Size of binaries etc.

Sven Barth pascaldragon at googlemail.com
Thu Mar 22 14:41:30 CET 2012


Am 22.03.2012 14:02, schrieb Graeme Geldenhuys:
> On 22 March 2012 14:49, Felipe Monteiro de Carvalho wrote:
>>
>> Could you show me the output of "locate .ttf" ? (a stripped down
>> version ideally with each dir occuring only once)
>
>
> I zipped the output to make it smaller. Sorry, I have no idea how to
> "filter" the output to only show unique directory paths. Your regex
> skills are probably better than mine.

Now that you have attached your file I need to say: You don't need regex 
skills for that. The following program would have been sufficient:

=== program begin ===

program uniquepaths;

{$mode objfpc}{$H+}

uses
   sysutils, inifiles;

var
   slist: THashedStringList;
   s: String;
begin
   slist := THashedStringList.Create;
   try
     while not Eof(Input) do begin
       Readln(s);
       s := ExtractFilePath(s);
       if slist.IndexOf(s) < 0 then begin
         slist.Add(s);
         Writeln(s);
       end;
     end;
   finally
     slist.Free;
   end;
end.

=== program end ===

Regards,
Sven





More information about the Lazarus mailing list