mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 14:50:32 +02:00
* sort the paths alphabetically
git-svn-id: trunk@34319 -
This commit is contained in:
parent
0a1be7f985
commit
cdda4da2d3
@ -1,26 +1,35 @@
|
||||
program createlst;
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
SysUtils, Classes;
|
||||
|
||||
var
|
||||
i: LongInt;
|
||||
sr: TSearchRec;
|
||||
path: String;
|
||||
sl: TStringList;
|
||||
begin
|
||||
if ParamCount = 0 then begin
|
||||
Writeln('createlst PATH [PATH [...]]');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
sl := TStringList.Create;
|
||||
|
||||
for i := 1 to ParamCount do begin
|
||||
path := IncludeTrailingPathDelimiter(ParamStr(i));
|
||||
if FindFirst(path + 't*.pp', 0, sr) = 0 then begin
|
||||
repeat
|
||||
Writeln(path + sr.Name);
|
||||
sl.Add(path + sr.Name);
|
||||
until FindNext(sr) <> 0;
|
||||
|
||||
FindClose(sr);
|
||||
end;
|
||||
end;
|
||||
|
||||
sl.Sort;
|
||||
for i := 0 to sl.Count - 1 do
|
||||
Writeln(sl[i]);
|
||||
|
||||
sl.Free;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user