소스 검색

* moved GetFileHandle() from fina.inc to filutil.inc because fina.inc
will be included twice using different string types (and those two
routines don't have a string argument, so this would result in duplicate
definitions), and their declaration is in filutilh.inc rather than
finah.inc anyway
* ensure that the fina.inc "MaxDirs" constant gets declared only once
* ensure that the finah.inc "TFilenameCaseMatch" type gets declared only
once

git-svn-id: branches/cpstrrtl@24994 -

Jonas Maebe 12 년 전
부모
커밋
95a877c7e5
3개의 변경된 파일16개의 추가작업 그리고 11개의 파일을 삭제
  1. 12 0
      rtl/objpas/sysutils/filutil.inc
  2. 2 11
      rtl/objpas/sysutils/fina.inc
  3. 2 0
      rtl/objpas/sysutils/finah.inc

+ 12 - 0
rtl/objpas/sysutils/filutil.inc

@@ -66,3 +66,15 @@ begin
 end;
 {$endif}
 
+
+Function GetFileHandle(var f : File):THandle;
+begin
+  Result:=filerec(f).handle;
+end;
+
+
+Function GetFileHandle(var f : Text):THandle;
+begin
+  Result:=textrec(f).handle;
+end;
+

+ 2 - 11
rtl/objpas/sysutils/fina.inc

@@ -260,8 +260,10 @@ begin
 end;
 
 
+{$if not declared(MaxDirs)}
 Const
   MaxDirs = 129;
+{$endif}
 
 function ExtractRelativepath (Const BaseName,DestName : String): String;
 
@@ -421,14 +423,3 @@ begin
     Result := '';
 end;
 
-Function GetFileHandle(var f : File):THandle;
-
-begin
-  result:=filerec(f).handle;
-end;
-
-Function GetFileHandle(var f : Text):THandle;
-begin
-  result:=textrec(f).handle;
-end;
-

+ 2 - 0
rtl/objpas/sysutils/finah.inc

@@ -14,8 +14,10 @@
     System Utilities For Free Pascal
 }
 
+{$if not declared(TFilenameCaseMatch)}
 type
   TFilenameCaseMatch = (mkNone, mkExactMatch, mkSingleMatch, mkAmbiguous);
+{$endif}
 
 function ChangeFileExt(const FileName, Extension: string): string;
 function ExtractFilePath(const FileName: string): string;