Parcourir la source

* Most dos tests fixed.

git-svn-id: branches/unicode@24788 -
marco il y a 12 ans
Parent
commit
1b7962cc34
5 fichiers modifiés avec 12 ajouts et 15 suppressions
  1. 8 7
      rtl/inc/dos.inc
  2. 1 2
      rtl/inc/dosh.inc
  3. 0 3
      rtl/inc/systemh.inc
  4. 2 2
      rtl/unix/dos.pp
  5. 1 1
      rtl/unix/sysutils.pp

+ 8 - 7
rtl/inc/dos.inc

@@ -279,6 +279,14 @@ end;
                A platform independent implementation of FExpand
 ****************************************************************************}
 
+procedure getdir(drivenr:byte;var dir: string);
+var s : ansistring;
+begin
+   s:=dir;
+   system.getdir(drivenr,s);
+   dir:=s;
+end;
+
 {$IFNDEF HAS_FEXPAND}
 
 (* FExpand maintained in standalone include file for easier maintenance. *)
@@ -286,13 +294,6 @@ end;
 
 {$ENDIF HAS_FEXPAND}
 
-procedure getdir(drivenr:byte;var dir: pathstr);
-var s : ansistring;
-begin
-   s:=dir;
-   system.getdir(drivenr,s);
-   dir:=s;
-end;
 
 Procedure MkDir(Const s: String);
 Begin

+ 1 - 2
rtl/inc/dosh.inc

@@ -149,5 +149,4 @@ Function  GetMsCount: int64;
 Procedure chdir(const s:string);
 Procedure mkdir(const s:string);
 Procedure rmdir(const s:string); overload;
-procedure GetDir(Drivenr:Byte;var Dir: PathStr);
-
+procedure GetDir(Drivenr:Byte;var Dir: string);

+ 0 - 3
rtl/inc/systemh.inc

@@ -1378,6 +1378,3 @@ const
 {$i system.fpd}
 {$endif}
 
-
-
-

+ 2 - 2
rtl/unix/dos.pp

@@ -783,7 +783,7 @@ Var
   r: RawByteString;
 Begin
   DosError:=0;
-  r:=textrec(f).name[0];
+  r:=textrec(f).name;
   if FPStat(r,info)<0 then
    begin
      Attr:=0;
@@ -796,7 +796,7 @@ Begin
    Attr:=$10
   else
    Attr:=$0;
-  if fpAccess(@textrec(f).name[0],W_OK)<0 then
+  if fpAccess(r,W_OK)<0 then
    Attr:=Attr or $1;
   if filerec(f).name[0]='.' then
    Attr:=Attr or $2;

+ 1 - 1
rtl/unix/sysutils.pp

@@ -954,7 +954,7 @@ end;
 Function DeleteFile (Const FileName : RawByteString) : Boolean;
 
 begin
-  Result:=fpUnLink (pointer(FileName))>=0;
+  Result:=fpUnLink (pchar(FileName))>=0;
 end;
 
 Function RenameFile (Const OldName, NewName : RawByteString) : Boolean;