mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 19:10:18 +02:00
+ allow specifying the output file as a second parameter
git-svn-id: branches/z80@44597 -
This commit is contained in:
parent
4b19f323d5
commit
e1e96099c4
@ -83,14 +83,16 @@ begin
|
|||||||
Terminate;
|
Terminate;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if Length(NonOptions) > 1 then
|
if Length(NonOptions) > 2 then
|
||||||
begin
|
begin
|
||||||
ShowException(Exception.Create('Too many files specified'));
|
ShowException(Exception.Create('Too many files specified'));
|
||||||
Terminate;
|
Terminate;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
FInputFileName := NonOptions[0];
|
FInputFileName := NonOptions[0];
|
||||||
if FOutputFileName = '' then
|
if Length(NonOptions) >= 2 then
|
||||||
|
FOutputFileName := NonOptions[1]
|
||||||
|
else
|
||||||
FOutputFileName := ChangeFileExt(FInputFileName, '.tzx');
|
FOutputFileName := ChangeFileExt(FInputFileName, '.tzx');
|
||||||
|
|
||||||
{ add your program here }
|
{ add your program here }
|
||||||
@ -127,7 +129,7 @@ end;
|
|||||||
procedure TIHX2TZX.WriteHelp;
|
procedure TIHX2TZX.WriteHelp;
|
||||||
begin
|
begin
|
||||||
{ add your help code here }
|
{ add your help code here }
|
||||||
writeln('Usage: ', ExeName, ' -h');
|
writeln('Usage: ', ExeName, ' [options] ihx_file [tzx_file]');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user