mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 00:09:26 +02:00
+ added delete option
This commit is contained in:
parent
23c3b52d7f
commit
ab19c5ae95
@ -20,8 +20,9 @@ program makehtm;
|
|||||||
uses sysutils;
|
uses sysutils;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Verbose : Boolean;
|
Verbose : Boolean;
|
||||||
FileCount : Boolean;
|
FileCount : Boolean;
|
||||||
|
DeleteHtml : Boolean;
|
||||||
|
|
||||||
Procedure ConvertFile (FileName : String);
|
Procedure ConvertFile (FileName : String);
|
||||||
|
|
||||||
@ -55,6 +56,12 @@ begin
|
|||||||
finally
|
finally
|
||||||
Close(InFile);
|
Close(InFile);
|
||||||
end;
|
end;
|
||||||
|
If DeleteHtml then
|
||||||
|
begin
|
||||||
|
If Verbose then
|
||||||
|
Writeln('Deleting input file : ',FileName);
|
||||||
|
DeleteFile(FileName);
|
||||||
|
end;
|
||||||
except
|
except
|
||||||
On E : Exception do
|
On E : Exception do
|
||||||
Writeln('Error converting ',FileName,' to ',OFileName,' : ',E.Message);
|
Writeln('Error converting ',FileName,' to ',OFileName,' : ',E.Message);
|
||||||
@ -121,9 +128,13 @@ Var
|
|||||||
I : integer;
|
I : integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Verbose:=False;
|
||||||
|
DeleteHtml:=False;
|
||||||
For I:=1 to ParamCount do
|
For I:=1 to ParamCount do
|
||||||
If paramstr(i)='-v' then
|
If paramstr(i)='-v' then
|
||||||
Verbose:=True;
|
Verbose:=True
|
||||||
|
else if paramstr(i)='-r' then
|
||||||
|
DeleteHtml:=True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user