Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-08

compiler/options.pas diff

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sergey Korshunoff

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

=====================================================

Regards,
Sergey Korshunoff

Reply by email

Peter Vreman
to Sergey Korshunoff
you wrote 22 lines
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

Reply by email