2
0
Эх сурвалжийг харах

* Added ShortString overload for getdir().

git-svn-id: branches/unicodertl@12186 -
yury 17 жил өмнө
parent
commit
680575d068

+ 11 - 1
rtl/inc/system.inc

@@ -588,7 +588,7 @@ End;
 
 {$if defined(FPC_HAS_FEATURE_FILEIO) and defined(FPC_HAS_FEATURE_ANSISTRINGS) and defined(FPC_RTLSTRING_UTF16)}
 Procedure getdir(drivenr:byte;Var dir:AnsiString);
-{ this is needed to also allow ansistrings, the shortstring version is
+{ this is needed to also allow ansistrings, the RtlString version is
   OS dependent }
 var
   s : RtlString;
@@ -598,6 +598,16 @@ begin
 end;
 {$endif}
 
+Procedure getdir(drivenr:byte;Var dir:ShortString);
+{ this is needed to also allow shortstrings, the RtlString version is
+  OS dependent }
+var
+  s : RtlString;
+begin
+  getdir(drivenr,s);
+  dir:=s;
+end;
+
 {$ifopt R+}
 {$define RangeCheckWasOn}
 {$R-}

+ 1 - 0
rtl/inc/systemh.inc

@@ -883,6 +883,7 @@ Procedure chdir(const s:RtlString);
 Procedure mkdir(const s:RtlString);
 Procedure rmdir(const s:RtlString);
 Procedure getdir(drivenr:byte;var dir:RtlString);
+Procedure getdir(drivenr:byte;var dir:ShortString);
 {$if defined(FPC_HAS_FEATURE_ANSISTRINGS) and defined(FPC_RTLSTRING_UTF16)}
 Procedure getdir(drivenr:byte;var dir:AnsiString);
 {$endif}