[fpc-devel]compiler/options.pas diff

Peter Vreman peter at freepascal.org
Sun Sep 2 15:21:43 CEST 2001


At 00:43 30-8-01, you wrote:
>Hello!
>We have a nice program 'fpc' in compiler/util.
>But we can not get a FPC help if we call 'fpc' utility
>without any parameter. There is a patch:
>
>=====================================================
>-+- options.pas.old     Wed Aug 29 23:41:42 2001
>+++ options.pas Wed Aug 29 23:36:02 2001
>@@ -1454,8 +1454,10 @@
>      end;
>
>  { Write help pages }
>-  if (cmd='') and (paramcount=0) then
>-   Option.WriteHelpPages;
>+  if (cmd='') and
>+     ((paramcount=0) or ((paramcount=1) and (ParamStr(1)='')))
>+  then
>+    Option.WriteHelpPages;
>
>  { Stop if errors in options }
>    if ErrorCount>0 then
>=====================================================

This is a hack, not a real solution. ParamStr(1) being empty and 
paramcount=1 means that you call things like 'ppc386 ""'. Maybe not all 
platforms support that even correctly. So it needs to be fixed in fpc.pas 
and not in options.pas


Peter





More information about the fpc-devel mailing list