Browse Source

* fix -n that was broken in the previous commit

peter 23 năm trước cách đây
mục cha
commit
5805755619
1 tập tin đã thay đổi với 12 bổ sung8 xóa
  1. 12 8
      compiler/options.pas

+ 12 - 8
compiler/options.pas

@@ -661,10 +661,7 @@ begin
               'l' : DoWriteLogo:=not UnSetBool(more,0);
               'l' : DoWriteLogo:=not UnSetBool(more,0);
               'm' : parapreprocess:=not UnSetBool(more,0);
               'm' : parapreprocess:=not UnSetBool(more,0);
               'n' : if More='' then
               'n' : if More='' then
-                     begin
-                       read_configfile:=false;
-                       disable_configfile:=true;
-                     end
+                     disable_configfile:=true
                     else
                     else
                      IllegalPara(opt);
                      IllegalPara(opt);
               'o' : if More<>'' then
               'o' : if More<>'' then
@@ -1486,7 +1483,8 @@ begin
    option.firstpass:=false;
    option.firstpass:=false;
 
 
   { read configuration file }
   { read configuration file }
-  if ppccfg<>'' then
+  if (not disable_configfile) and
+     (ppccfg<>'') then
     begin
     begin
       read_configfile:=check_configfile(ppccfg,ppccfg);
       read_configfile:=check_configfile(ppccfg,ppccfg);
       { Maybe alternative configfile ? }
       { Maybe alternative configfile ? }
@@ -1582,11 +1580,14 @@ begin
   if inputdir<>'' then
   if inputdir<>'' then
    Unitsearchpath.AddPath(inputdir,true);
    Unitsearchpath.AddPath(inputdir,true);
   if not disable_configfile then
   if not disable_configfile then
+   begin
 {$ifdef Delphi}
 {$ifdef Delphi}
-  UnitSearchPath.AddPath(dmisc.getenv(target_info.unit_env),false);
+     UnitSearchPath.AddPath(dmisc.getenv(target_info.unit_env),false);
 {$else}
 {$else}
-  UnitSearchPath.AddPath(dos.getenv(target_info.unit_env),false);
+     UnitSearchPath.AddPath(dos.getenv(target_info.unit_env),false);
 {$endif Delphi}
 {$endif Delphi}
+   end;
+
 {$ifdef Unix}
 {$ifdef Unix}
   fpcdir:=FixPath(getenv('FPCDIR'),false);
   fpcdir:=FixPath(getenv('FPCDIR'),false);
   if fpcdir='' then
   if fpcdir='' then
@@ -1674,7 +1675,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.86  2002-10-23 16:57:16  peter
+  Revision 1.87  2002-10-23 17:07:40  peter
+    * fix -n that was broken in the previous commit
+
+  Revision 1.86  2002/10/23 16:57:16  peter
     * first search for fpc.cfg instead of deprecated ppc386.cfg
     * first search for fpc.cfg instead of deprecated ppc386.cfg
     * parse commandline options first before searching configfile so -vt
     * parse commandline options first before searching configfile so -vt
       can be used to display the searched files
       can be used to display the searched files