diff options
author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-05-01 14:11:50 +0000 |
---|---|---|
committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-05-01 14:11:50 +0000 |
commit | 8aee5bd184a231f0dcf0e10690a95b3da8a4f45b (patch) | |
tree | 45b9e9081cfb0aa291e509e4d3dd259f4b438c75 | |
parent | 4f58e9c8304d33e88be3fde2589397759242087f (diff) | |
download | fpc-8aee5bd184a231f0dcf0e10690a95b3da8a4f45b.tar.gz |
* Merging revisions 45210 from trunk:
------------------------------------------------------------------------
r45210 | michael | 2020-05-01 16:11:14 +0200 (Fri, 01 May 2020) | 1 line
* Fix -h or --help
------------------------------------------------------------------------
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_2@45211 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | utils/fpdoc/unitdiff.pp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/utils/fpdoc/unitdiff.pp b/utils/fpdoc/unitdiff.pp index a7259cb472..0497c39d37 100644 --- a/utils/fpdoc/unitdiff.pp +++ b/utils/fpdoc/unitdiff.pp @@ -105,10 +105,10 @@ Procedure Usage; begin Writeln('Usage : ',ExtractFileName(Paramstr(0)),' [options] file1 file2'); Writeln('Where [options] is one or more of :'); + Writeln(' -h or --help Emit help.'); Writeln(' --disable-arguments Do not check function arguments.'); Writeln(' --disable-private Do not check class private fields.'); Writeln(' --disable-protected Do not check class protected fields.'); - Writeln(' --help Emit help.'); Writeln(' --input=cmdline Input file to create skeleton for.'); Writeln(' Use options are as for compiler.'); Writeln(' --lang=language Use selected language.'); @@ -193,14 +193,18 @@ begin // Translate internal documentation strings TranslateDocStrings(DocLang); end; - if (cmdLineAction<>ActionHelp) and (InputFile1='') and (InputFile2='') then - begin - Writeln(StdErr,SErrNoInputFile); - cmdLineAction := actionHelp; - end else if (InputFile2='') and (CmdLineAction<>ActionList) then + if (cmdLineAction<>ActionHelp) then begin - Writeln(StdErr,SWarnAssumingList); - CmdLineAction:=ActionList; + if (InputFile1='') and (InputFile2='') then + begin + Writeln(StdErr,SErrNoInputFile); + cmdLineAction := actionHelp; + end + else if (InputFile2='') and (CmdLineAction<>ActionList) then + begin + Writeln(StdErr,SWarnAssumingList); + CmdLineAction:=ActionList; + end; end; end; |