Bläddra i källkod

+ allow fileextension .p, in mode macpas

olle 21 år sedan
förälder
incheckning
4b0b17a5aa
3 ändrade filer med 27 tillägg och 7 borttagningar
  1. 14 1
      compiler/fppu.pas
  2. 8 4
      compiler/options.pas
  3. 5 2
      compiler/systems/i_macos.pas

+ 14 - 1
compiler/fppu.pas

@@ -269,6 +269,11 @@ uses
               { Check for .pas }
               Found:=UnitExists(target_info.pasext,hs);
             end;
+           if not Found and (m_mac in aktmodeswitches) then
+            begin
+              { Check for .p, if mode is macpas}
+              Found:=UnitExists('.p',hs);
+            end;
            stringdispose(mainsource);
            if Found then
             begin
@@ -346,6 +351,11 @@ uses
                Message1(unit_t_unitsearch,AddExtension(sourcefn^,target_info.pasext));
                fnd:=FindFile(AddExtension(sourcefn^,target_info.pasext),'',hs);
              end;
+            if not fnd and (m_mac in aktmodeswitches) then
+             begin
+               Message1(unit_t_unitsearch,AddExtension(sourcefn^,'.p'));
+               fnd:=FindFile(AddExtension(sourcefn^,'.p'),'',hs);
+             end;
             if fnd then
              begin
                sources_avail:=true;
@@ -1514,7 +1524,10 @@ uses
 end.
 {
   $Log$
-  Revision 1.55  2004-06-20 08:55:29  florian
+  Revision 1.56  2004-07-05 21:26:28  olle
+    + allow fileextension .p, in mode macpas
+
+  Revision 1.55  2004/06/20 08:55:29  florian
     * logs truncated
 
   Revision 1.54  2004/03/17 12:12:59  olle

+ 8 - 4
compiler/options.pas

@@ -1935,9 +1935,10 @@ begin
    begin
      if FileExists(inputdir+inputfile+target_info.sourceext) then
       inputextension:=target_info.sourceext
-     else
-      if FileExists(inputdir+inputfile+target_info.pasext) then
-       inputextension:=target_info.pasext;
+     else if FileExists(inputdir+inputfile+target_info.pasext) then
+       inputextension:=target_info.pasext
+     else if (m_mac in aktmodeswitches) and FileExists(inputdir+inputfile+'.p') then
+       inputextension:='.p';
    end;
 
   { Add paths specified with parameters to the searchpaths }
@@ -2076,7 +2077,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.137  2004-07-04 12:24:04  jonas
+  Revision 1.138  2004-07-05 21:26:28  olle
+    + allow fileextension .p, in mode macpas
+
+  Revision 1.137  2004/07/04 12:24:04  jonas
     * fixed "-g-l" (and other "-g-*" combinations)
 
   Revision 1.136  2004/06/20 08:55:30  florian

+ 5 - 2
compiler/systems/i_macos.pas

@@ -37,7 +37,7 @@ unit i_macos;
             unit_env     : '';
             extradefines : '';
             sourceext    : '.pp';
-            pasext       : '.p'; {is normally .p for mac pascals}
+            pasext       : '.pas';
             exeext       : '';
             defext       : '';
             scriptext    : '';
@@ -102,7 +102,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.15  2004-06-20 08:55:32  florian
+  Revision 1.16  2004-07-05 21:26:35  olle
+    + allow fileextension .p, in mode macpas
+
+  Revision 1.15  2004/06/20 08:55:32  florian
     * logs truncated
 
   Revision 1.14  2004/05/03 09:48:15  olle