summaryrefslogtreecommitdiff
path: root/docview/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2015-03-09 19:26:42 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2015-03-09 19:26:42 +0000
commitf1958ef9a3d9803931a2806111746fb70b2621a5 (patch)
tree1bbad3b32dbbe7facb9a5040bd2d71e7ae91eb27 /docview/src
parent2a97afaccba24bb0866b9f05888fdf628ef1ad55 (diff)
downloadfpGUI-f1958ef9a3d9803931a2806111746fb70b2621a5.tar.xz
docdump: fixes parameter handling and usage help output.
Diffstat (limited to 'docview/src')
-rw-r--r--docview/src/docdump/docdump.lpr15
1 files changed, 4 insertions, 11 deletions
diff --git a/docview/src/docdump/docdump.lpr b/docview/src/docdump/docdump.lpr
index a642b0c0..db2aac45 100644
--- a/docview/src/docdump/docdump.lpr
+++ b/docview/src/docdump/docdump.lpr
@@ -35,16 +35,8 @@ procedure TDocDump.DoRun;
var
ErrorMsg: String;
begin
- // quick check parameters
- ErrorMsg:=CheckOptions('h','help');
- if ErrorMsg<>'' then begin
- ShowException(Exception.Create(ErrorMsg));
- Terminate;
- Exit;
- end;
-
- // parse parameters
- if HasOption('h','help') then begin
+ if (ParamCount = 0) or HasOption('h','help') then
+ begin
WriteHelp;
Terminate;
Exit;
@@ -84,7 +76,8 @@ end;
procedure TDocDump.WriteHelp;
begin
{ add your help code here }
- writeln('Usage: ',ExeName,' -h');
+ writeln('Usage: ',ExeName,' <INF file>');
+ writeln(' -h display this help');
end;
var