mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 04:59:26 +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;
|
||||
Exit;
|
||||
end;
|
||||
if Length(NonOptions) > 1 then
|
||||
if Length(NonOptions) > 2 then
|
||||
begin
|
||||
ShowException(Exception.Create('Too many files specified'));
|
||||
Terminate;
|
||||
Exit;
|
||||
end;
|
||||
FInputFileName := NonOptions[0];
|
||||
if FOutputFileName = '' then
|
||||
if Length(NonOptions) >= 2 then
|
||||
FOutputFileName := NonOptions[1]
|
||||
else
|
||||
FOutputFileName := ChangeFileExt(FInputFileName, '.tzx');
|
||||
|
||||
{ add your program here }
|
||||
@ -127,7 +129,7 @@ end;
|
||||
procedure TIHX2TZX.WriteHelp;
|
||||
begin
|
||||
{ add your help code here }
|
||||
writeln('Usage: ', ExeName, ' -h');
|
||||
writeln('Usage: ', ExeName, ' [options] ihx_file [tzx_file]');
|
||||
end;
|
||||
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user