mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 21:09:07 +02:00
* Fix from Graeme Geldenhuys to avoid memleaks by early exit
git-svn-id: trunk@37054 -
This commit is contained in:
parent
4f6b0feda3
commit
f6918dac3e
@ -105,7 +105,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="polygon;../units/$(TargetCPU)-$(TargetOS)"/>
|
<OtherUnitFiles Value="polygon;../src"/>
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
@ -331,8 +331,7 @@ begin
|
|||||||
Writeln('');
|
Writeln('');
|
||||||
Writeln('Known demos for this binary: ');
|
Writeln('Known demos for this binary: ');
|
||||||
ListReports(True);
|
ListReports(True);
|
||||||
Free;
|
ExitCode:=Ord(Msg<>'')
|
||||||
Halt(Ord(Msg<>''));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TReportDemoApplication.ListReports(AWithIndentation: boolean);
|
procedure TReportDemoApplication.ListReports(AWithIndentation: boolean);
|
||||||
@ -421,7 +420,11 @@ begin
|
|||||||
OnGetApplicationName:=@GetReportAppName;
|
OnGetApplicationName:=@GetReportAppName;
|
||||||
S:=CheckOptions('lj::hf:r:d:',['list','json::','help','format:','runtime:','demo:']);
|
S:=CheckOptions('lj::hf:r:d:',['list','json::','help','format:','runtime:','demo:']);
|
||||||
if (S<>'') or HasOption('h','help') then
|
if (S<>'') or HasOption('h','help') then
|
||||||
|
begin
|
||||||
Usage(S);
|
Usage(S);
|
||||||
|
Terminate;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
if HasOption('l','list') then
|
if HasOption('l','list') then
|
||||||
begin
|
begin
|
||||||
ListReports;
|
ListReports;
|
||||||
|
Loading…
Reference in New Issue
Block a user