浏览代码

* yet another attempt to make Mac OS accept dos.inc without hacks ;-)

Tomas Hajny 20 年之前
父节点
当前提交
d5d331bced
共有 1 个文件被更改,包括 8 次插入9 次删除
  1. 8 9
      rtl/inc/dos.inc

+ 8 - 9
rtl/inc/dos.inc

@@ -255,18 +255,14 @@ begin
 { Find the first DirectorySeparator or DriveSeparator from the end. }
 { Find the first DirectorySeparator or DriveSeparator from the end. }
   DirEnd := Length (Path);
   DirEnd := Length (Path);
 { Avoid problems with platforms having DriveSeparator = DirectorySeparator. }
 { Avoid problems with platforms having DriveSeparator = DirectorySeparator. }
-{$IFNDEF MACOS}
   if DirectorySeparator = DriveSeparator then
   if DirectorySeparator = DriveSeparator then
-   while (DirEnd > 0) and not (Path [DirEnd] in [DirectorySeparator]) do
+   while (DirEnd > 0) and (Path [DirEnd] <> DirectorySeparator) do
     Dec (DirEnd)
     Dec (DirEnd)
   else
   else
-   while (DirEnd > 0) and not (Path [DirEnd] in
-                                       [DirectorySeparator, DriveSeparator]) do
+   while (DirEnd > 0) and
+                 (Path [DirEnd] <> DirectorySeparator) and
+                                           (Path [DirEnd] <> DriveSeparator) do
     Dec (DirEnd);
     Dec (DirEnd);
-{$ELSE}
-  while (DirEnd > 0) and not (Path [DirEnd] in [DirectorySeparator]) do
-    Dec (DirEnd);
-{$ENDIF}
 
 
 { The first "extension" should be returned if LFN }
 { The first "extension" should be returned if LFN }
 { support not available, the last one otherwise.  }
 { support not available, the last one otherwise.  }
@@ -308,7 +304,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2005-01-01 20:31:02  olle
+  Revision 1.7  2005-01-23 09:50:59  hajny
+    * yet another attempt to make Mac OS accept dos.inc without hacks ;-)
+
+  Revision 1.6  2005/01/01 20:31:02  olle
     + hack again to make macos compile
     + hack again to make macos compile
 
 
   Revision 1.5  2004/12/29 19:10:47  hajny
   Revision 1.5  2004/12/29 19:10:47  hajny