Browse Source

* Char -> AnsiChar

Michael VAN CANNEYT 2 years ago
parent
commit
bcb2aa1323

+ 2 - 2
rtl/amicommon/athreads.pp

@@ -458,7 +458,7 @@ begin
       { this line can't be before threadvar allocation }
       { this line can't be before threadvar allocation }
       SysDebugLn('FPC AThreads: Renaming thread ID:'+hexStr(threadInfo)+' to '+threadInfo^.name);
       SysDebugLn('FPC AThreads: Renaming thread ID:'+hexStr(threadInfo)+' to '+threadInfo^.name);
 {$endif}
 {$endif}
-      thisThread^.pr_Task.tc_Node.ln_Name:=PChar(@threadInfo^.name[1]);
+      thisThread^.pr_Task.tc_Node.ln_Name:=PAnsiChar(@threadInfo^.name[1]);
     end;
     end;
 
 
   { Reply the message, so the calling thread could continue }
   { Reply the message, so the calling thread could continue }
@@ -995,7 +995,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function CreatePort(Name: PChar; Pri: LongInt): PMsgPort;
+function CreatePort(Name: PAnsiChar; Pri: LongInt): PMsgPort;
 var
 var
   SigBit: ShortInt;
   SigBit: ShortInt;
   Port: PMsgPort;
   Port: PMsgPort;

+ 22 - 22
rtl/amicommon/dos.pp

@@ -110,7 +110,7 @@ function PathConv(path: string): string; external name 'PATHCONV';
 function dosLock(const name: String;
 function dosLock(const name: String;
                  accessmode: Longint) : BPTR;
                  accessmode: Longint) : BPTR;
 var
 var
- buffer: array[0..255] of Char;
+ buffer: array[0..255] of AnsiChar;
 begin
 begin
   move(name[1],buffer,length(name));
   move(name[1],buffer,length(name));
   buffer[length(name)]:=#0;
   buffer[length(name)]:=#0;
@@ -126,21 +126,21 @@ begin
   {$endif}
   {$endif}
 end;
 end;
 
 
-function BSTR2STRING(s : Pointer): PChar; Inline;
+function BSTR2STRING(s : Pointer): PAnsiChar; Inline;
 begin
 begin
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
-  BSTR2STRING:=PChar(s);
+  BSTR2STRING:=PAnsiChar(s);
   {$else}
   {$else}
-  BSTR2STRING:=PChar(BADDR(PtrInt(s)))+1;
+  BSTR2STRING:=PAnsiChar(BADDR(PtrInt(s)))+1;
   {$endif}
   {$endif}
 end;
 end;
 
 
-function BSTR2STRING(s : PtrInt): PChar; Inline;
+function BSTR2STRING(s : PtrInt): PAnsiChar; Inline;
 begin
 begin
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
-  BSTR2STRING:=PChar(s);
+  BSTR2STRING:=PAnsiChar(s);
   {$else}
   {$else}
-  BSTR2STRING:=PChar(BADDR(s))+1;
+  BSTR2STRING:=PAnsiChar(BADDR(s))+1;
   {$endif}
   {$endif}
 end;
 end;
 
 
@@ -231,7 +231,7 @@ end;
 
 
 function dosSetProtection(const name: string; mask:longint): Boolean;
 function dosSetProtection(const name: string; mask:longint): Boolean;
 var
 var
-  buffer : array[0..255] of Char;
+  buffer : array[0..255] of AnsiChar;
 begin
 begin
   move(name[1],buffer,length(name));
   move(name[1],buffer,length(name));
   buffer[length(name)]:=#0;
   buffer[length(name)]:=#0;
@@ -240,7 +240,7 @@ end;
 
 
 function dosSetFileDate(const name: string; p : PDateStamp): Boolean;
 function dosSetFileDate(const name: string; p : PDateStamp): Boolean;
 var
 var
-  buffer : array[0..255] of Char;
+  buffer : array[0..255] of AnsiChar;
 begin
 begin
   move(name[1],buffer,length(name));
   move(name[1],buffer,length(name));
   buffer[length(name)]:=#0;
   buffer[length(name)]:=#0;
@@ -303,7 +303,7 @@ begin
     end
     end
 end;
 end;
 
 
-function Createport(name : PChar; pri : longint): pMsgPort;
+function Createport(name : PAnsiChar; pri : longint): pMsgPort;
 var
 var
    sigbit : ShortInt;
    sigbit : ShortInt;
    port    : pMsgPort;
    port    : pMsgPort;
@@ -497,7 +497,7 @@ end;
 
 
 procedure Exec(const Path: PathStr; const ComLine: ComStr);
 procedure Exec(const Path: PathStr; const ComLine: ComStr);
 var
 var
-  tmpPath: array[0..515] of char;
+  tmpPath: array[0..515] of AnsiChar;
   result : longint;
   result : longint;
   tmpLock: BPTR;
   tmpLock: BPTR;
 begin
 begin
@@ -628,7 +628,7 @@ end;
 function RefreshDeviceList: Integer;
 function RefreshDeviceList: Integer;
 var
 var
   List: PDosList;
   List: PDosList;
-  Temp: PChar;
+  Temp: PAnsiChar;
   Str: string;
   Str: string;
 begin
 begin
   NumDevices := 0;
   NumDevices := 0;
@@ -665,7 +665,7 @@ begin
   //
   //
   OldWinPtr:=SetProcessWinPtr(PROC_WIN_DISABLE);
   OldWinPtr:=SetProcessWinPtr(PROC_WIN_DISABLE);
   //
   //
-  DirLock := Lock(PChar(Drive), SHARED_LOCK);
+  DirLock := Lock(PAnsiChar(Drive), SHARED_LOCK);
   if DirLock <> 0 then
   if DirLock <> 0 then
   begin
   begin
     if Info(DirLock, @Inf) <> 0 then
     if Info(DirLock, @Inf) <> 0 then
@@ -695,7 +695,7 @@ begin
   //
   //
   OldWinPtr:=SetProcessWinPtr(PROC_WIN_DISABLE);
   OldWinPtr:=SetProcessWinPtr(PROC_WIN_DISABLE);
   //
   //
-  DirLock := Lock(PChar(Drive), SHARED_LOCK);
+  DirLock := Lock(PAnsiChar(Drive), SHARED_LOCK);
   if DirLock <> 0 then
   if DirLock <> 0 then
   begin
   begin
     if Info(DirLock, @Inf) <> 0 then
     if Info(DirLock, @Inf) <> 0 then
@@ -771,7 +771,7 @@ end;
 
 
 procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
 procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
 var
 var
- tmpStr: array[0..255] of Char;
+ tmpStr: array[0..255] of AnsiChar;
  Anchor: PAnchorPath;
  Anchor: PAnchorPath;
 begin
 begin
   tmpStr:=PathConv(path)+#0;
   tmpStr:=PathConv(path)+#0;
@@ -980,13 +980,13 @@ var
 {$ifndef FPC_ANSI_TEXTFILEREC}
 {$ifndef FPC_ANSI_TEXTFILEREC}
   r : rawbytestring;
   r : rawbytestring;
 {$endif not FPC_ANSI_TEXTFILEREC}
 {$endif not FPC_ANSI_TEXTFILEREC}
-  p : pchar;
+  p : PAnsiChar;
 begin
 begin
 {$ifdef FPC_ANSI_TEXTFILEREC}
 {$ifdef FPC_ANSI_TEXTFILEREC}
   p := @filerec(f).Name;
   p := @filerec(f).Name;
 {$else}
 {$else}
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
-  p := pchar(r);
+  p := PAnsiChar(r);
 {$endif}
 {$endif}
   DosError:=0;
   DosError:=0;
   flags:=FIBF_WRITE;
   flags:=FIBF_WRITE;
@@ -1015,7 +1015,7 @@ end;
 var
 var
   strofpaths : string;
   strofpaths : string;
 
 
-function SystemTags(const command: PChar; const tags: array of PtrUInt): LongInt;
+function SystemTags(const command: PAnsiChar; const tags: array of PtrUInt): LongInt;
 begin
 begin
   SystemTags:=SystemTagList(command,@tags);
   SystemTags:=SystemTagList(command,@tags);
 end;
 end;
@@ -1074,7 +1074,7 @@ Var
   ThisProcess: PProcess;
   ThisProcess: PProcess;
   LocalVars_List: PMinList;  // Local Var structure in struct process (pr_LocalVarsis is actually a minlist
   LocalVars_List: PMinList;  // Local Var structure in struct process (pr_LocalVarsis is actually a minlist
   LocalVar_Node: PLocalVar;
   LocalVar_Node: PLocalVar;
-  Buffer: array[0..BUFFER_SIZE] of Char; // Buffer to hold a value for GetVar()
+  Buffer: array[0..BUFFER_SIZE] of AnsiChar; // Buffer to hold a value for GetVar()
   TempLen: LongInt;      // hold returnlength of GetVar()
   TempLen: LongInt;      // hold returnlength of GetVar()
   // for env: searching
   // for env: searching
   Anchor: TAnchorPath;
   Anchor: TAnchorPath;
@@ -1107,7 +1107,7 @@ begin
       begin
       begin
         SetLength(EnvList, Length(EnvList) + 1);
         SetLength(EnvList, Length(EnvList) + 1);
         EnvList[High(EnvList)].Name := LocalVar_Node^.lv_Node.ln_Name;
         EnvList[High(EnvList)].Name := LocalVar_Node^.lv_Node.ln_Name;
-        EnvList[High(EnvList)].Value := string(PChar(@Buffer[0]));
+        EnvList[High(EnvList)].Value := string(PAnsiChar(@Buffer[0]));
         EnvList[High(EnvList)].Local := True;
         EnvList[High(EnvList)].Local := True;
       end;
       end;
     end;
     end;
@@ -1147,8 +1147,8 @@ end;
 
 
 function GetEnvFromEnv(envvar : String): String;
 function GetEnvFromEnv(envvar : String): String;
 var
 var
-   bufarr : array[0..255] of char;
-   strbuffer : array[0..255] of char;
+   bufarr : array[0..255] of AnsiChar;
+   strbuffer : array[0..255] of AnsiChar;
    temp : Longint;
    temp : Longint;
 begin
 begin
    GetEnvFromEnv := '';
    GetEnvFromEnv := '';

+ 4 - 4
rtl/amicommon/paramhandling.inc

@@ -31,7 +31,7 @@ function GetWBArg(Idx: Integer): string;
 var
 var
   startup: PWBStartup;
   startup: PWBStartup;
   wbarg: PWBArgList;
   wbarg: PWBArgList;
-  Path: array[0..254] of Char;
+  Path: array[0..254] of AnsiChar;
   strPath: string;
   strPath: string;
   Len: Integer;
   Len: Integer;
 begin
 begin
@@ -84,7 +84,7 @@ var
   Ende: Word;
   Ende: Word;
   LocalIndex: Word;
   LocalIndex: Word;
   i: Integer;
   i: Integer;
-  P : PChar;
+  P : PAnsiChar;
   Temp : AnsiString;
   Temp : AnsiString;
   InQuotes: boolean;
   InQuotes: boolean;
 begin
 begin
@@ -177,7 +177,7 @@ begin
       Counter := 1;
       Counter := 1;
       while (s1[Counter] <> #0) and (Counter <> 0) do
       while (s1[Counter] <> #0) and (Counter <> 0) do
         Inc(Counter);
         Inc(Counter);
-      s1[0] := char(Counter - 1);
+      s1[0] := AnsiChar(Counter - 1);
       GetProgDir := s1;
       GetProgDir := s1;
     end;
     end;
   end;
   end;
@@ -197,7 +197,7 @@ begin
     Counter := 1;
     Counter := 1;
     while (s1[Counter] <> #0) and (Counter <> 0) do
     while (s1[Counter] <> #0) and (Counter <> 0) do
       Inc(Counter);
       Inc(Counter);
-    s1[0] := char(Counter - 1);
+    s1[0] := AnsiChar(Counter - 1);
 
 
     { now remove any component path which should not be there }
     { now remove any component path which should not be there }
     for Counter := Length(s1) downto 1 do
     for Counter := Length(s1) downto 1 do

+ 4 - 4
rtl/amicommon/sysdir.inc

@@ -24,7 +24,7 @@ var
 begin
 begin
   checkCTRLC;
   checkCTRLC;
   tmpStr:=PathConv(s);
   tmpStr:=PathConv(s);
-  tmpLock:=dosCreateDir(pchar(tmpStr));
+  tmpLock:=dosCreateDir(PAnsiChar(tmpStr));
   if tmpLock=0 then begin
   if tmpLock=0 then begin
     dosError2InOut(IoErr);
     dosError2InOut(IoErr);
     exit;
     exit;
@@ -43,7 +43,7 @@ begin
       exit;
       exit;
     end;
     end;
   tmpStr:=PathConv(s);
   tmpStr:=PathConv(s);
-  if not dosDeleteFile(pchar(tmpStr)) then
+  if not dosDeleteFile(PAnsiChar(tmpStr)) then
     dosError2InOut(IoErr);
     dosError2InOut(IoErr);
 end;
 end;
 
 
@@ -60,7 +60,7 @@ begin
   { Changing the directory is a pretty complicated affair }
   { Changing the directory is a pretty complicated affair }
   {   1) Obtain a lock on the directory                   }
   {   1) Obtain a lock on the directory                   }
   {   2) CurrentDir the lock                              }
   {   2) CurrentDir the lock                              }
-  tmpLock:=Lock(pchar(tmpStr),SHARED_LOCK);
+  tmpLock:=Lock(PAnsiChar(tmpStr),SHARED_LOCK);
   if tmpLock=0 then begin
   if tmpLock=0 then begin
     dosError2InOut(IoErr);
     dosError2InOut(IoErr);
     exit;
     exit;
@@ -85,7 +85,7 @@ end;
 
 
 procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
 procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
 var
 var
-  tmpbuf: array[0..255] of char;
+  tmpbuf: array[0..255] of AnsiChar;
   lockDir: BPTR;
   lockDir: BPTR;
 begin
 begin
   checkCTRLC;
   checkCTRLC;

+ 7 - 7
rtl/amicommon/sysfile.inc

@@ -181,9 +181,9 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure do_erase(p : pchar; pchangeable: boolean);
+procedure do_erase(p : PAnsiChar; pchangeable: boolean);
 var
 var
-  tmpStr: array[0..255] of Char;
+  tmpStr: array[0..255] of AnsiChar;
 begin
 begin
   tmpStr:=PathConv(strpas(p))+#0;
   tmpStr:=PathConv(strpas(p))+#0;
   checkCTRLC;
   checkCTRLC;
@@ -191,11 +191,11 @@ begin
     dosError2InOut(IoErr);
     dosError2InOut(IoErr);
 end;
 end;
 
 
-procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
+procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean);
 { quite stack-effective code, huh? :) damn path conversions... (KB) }
 { quite stack-effective code, huh? :) damn path conversions... (KB) }
 var
 var
-  tmpStr1: array[0..255] of Char;
-  tmpStr2: array[0..255] of Char;
+  tmpStr1: array[0..255] of AnsiChar;
+  tmpStr2: array[0..255] of AnsiChar;
 begin
 begin
   tmpStr1:=PathConv(strpas(p1))+#0;
   tmpStr1:=PathConv(strpas(p1))+#0;
   tmpStr2:=PathConv(strpas(p2))+#0;
   tmpStr2:=PathConv(strpas(p2))+#0;
@@ -351,7 +351,7 @@ begin
 {$ENDIF}
 {$ENDIF}
 end;
 end;
 
 
-procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
+procedure do_open(var f;p:PAnsiChar;flags:longint; pchangeable: boolean);
 {
 {
   filerec and textrec have both handle and mode as the first items so
   filerec and textrec have both handle and mode as the first items so
   they could use the same routine for opening/creating.
   they could use the same routine for opening/creating.
@@ -362,7 +362,7 @@ procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
 var
 var
   handle   : THandle;
   handle   : THandle;
   openflags: LongInt;
   openflags: LongInt;
-  tmpStr   : array[0..255] of Char;
+  tmpStr   : array[0..255] of AnsiChar;
 begin
 begin
   tmpStr:=PathConv(strpas(p))+#0;
   tmpStr:=PathConv(strpas(p))+#0;
 
 

+ 22 - 22
rtl/amicommon/sysutils.pp

@@ -105,21 +105,21 @@ begin
   {$endif}
   {$endif}
 end;
 end;
 
 
-function BSTR2STRING(s : Pointer): PChar; Inline;
+function BSTR2STRING(s : Pointer): PAnsiChar; Inline;
 begin
 begin
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
-  BSTR2STRING:=PChar(s);
+  BSTR2STRING:=PAnsiChar(s);
   {$else}
   {$else}
-  BSTR2STRING:=PChar(BADDR(PtrInt(s)))+1;
+  BSTR2STRING:=PAnsiChar(BADDR(PtrInt(s)))+1;
   {$endif}
   {$endif}
 end;
 end;
 
 
-function BSTR2STRING(s : BPTR): PChar; Inline;
+function BSTR2STRING(s : BPTR): PAnsiChar; Inline;
 begin
 begin
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
   {$if defined(AROS)}  // deactivated for now //and (not defined(AROS_BINCOMPAT))}
-  BSTR2STRING:=PChar(s);
+  BSTR2STRING:=PAnsiChar(s);
   {$else}
   {$else}
-  BSTR2STRING:=PChar(BADDR(s))+1;
+  BSTR2STRING:=PAnsiChar(BADDR(s))+1;
   {$endif}
   {$endif}
 end;
 end;
 
 
@@ -180,7 +180,7 @@ var
 begin
 begin
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   {$WARNING FIX ME! To do: FileOpen Access Modes}
   {$WARNING FIX ME! To do: FileOpen Access Modes}
-  dosResult:=Open(PChar(SystemFileName),MODE_OLDFILE);
+  dosResult:=Open(PAnsiChar(SystemFileName),MODE_OLDFILE);
   if dosResult=0 then
   if dosResult=0 then
     dosResult:=-1
     dosResult:=-1
   else
   else
@@ -216,7 +216,7 @@ end;
 function FileSetDate(Handle: THandle; Age: Int64) : LongInt;
 function FileSetDate(Handle: THandle; Age: Int64) : LongInt;
 var
 var
   tmpDateStamp: TDateStamp;
   tmpDateStamp: TDateStamp;
-  tmpName: array[0..255] of char;
+  tmpName: array[0..255] of AnsiChar;
 begin
 begin
   result:=0;
   result:=0;
   if (Handle <> 0) then begin
   if (Handle <> 0) then begin
@@ -239,7 +239,7 @@ begin
   result:=0;
   result:=0;
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   tmpDateStamp:=DateTimeToAmigaDateStamp(FileDateToDateTime(Age));
   tmpDateStamp:=DateTimeToAmigaDateStamp(FileDateToDateTime(Age));
-  if not SetFileDate(PChar(SystemFileName),@tmpDateStamp) then begin
+  if not SetFileDate(PAnsiChar(SystemFileName),@tmpDateStamp) then begin
     IoErr(); // dump the error code for now (TODO)
     IoErr(); // dump the error code for now (TODO)
     result:=-1;
     result:=-1;
   end;
   end;
@@ -257,7 +257,7 @@ begin
     opening it in MODE_NEWFILE, because that returns an exclusive lock
     opening it in MODE_NEWFILE, because that returns an exclusive lock
     so some operations might fail with it (KB) }
     so some operations might fail with it (KB) }
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
-  dosResult:=Open(PChar(SystemFileName),MODE_READWRITE);
+  dosResult:=Open(PAnsiChar(SystemFileName),MODE_READWRITE);
   if dosResult = 0 then exit;
   if dosResult = 0 then exit;
 
 
   if SetFileSize(dosResult, 0, OFFSET_BEGINNING) = 0 then
   if SetFileSize(dosResult, 0, OFFSET_BEGINNING) = 0 then
@@ -359,7 +359,7 @@ var
   SystemFileName: RawByteString;
   SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
-  DeleteFile:=dosDeleteFile(PChar(SystemFileName));
+  DeleteFile:=dosDeleteFile(PAnsiChar(SystemFileName));
 end;
 end;
 
 
 
 
@@ -369,7 +369,7 @@ var
 begin
 begin
   OldSystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(OldName));
   OldSystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(OldName));
   NewSystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(NewName));
   NewSystemFileName:=PathConv(ToSingleByteFileSystemEncodedFileName(NewName));
-  RenameFile:=dosRename(PChar(OldSystemFileName), PChar(NewSystemFileName)) <> 0;
+  RenameFile:=dosRename(PAnsiChar(OldSystemFileName), PAnsiChar(NewSystemFileName)) <> 0;
 end;
 end;
 
 
 
 
@@ -386,7 +386,7 @@ var
 begin
 begin
   validFile:=false;
   validFile:=false;
   SystemFileName := PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName := PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
-  tmpLock := Lock(PChar(SystemFileName), SHARED_LOCK);
+  tmpLock := Lock(PAnsiChar(SystemFileName), SHARED_LOCK);
 
 
   if (tmpLock <> 0) then begin
   if (tmpLock <> 0) then begin
     new(tmpFIB);
     new(tmpFIB);
@@ -418,7 +418,7 @@ var
 begin
 begin
   result:=false;
   result:=false;
   SystemFileName := PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
   SystemFileName := PathConv(ToSingleByteFileSystemEncodedFileName(FileName));
-  tmpLock := Lock(PChar(SystemFileName), SHARED_LOCK);
+  tmpLock := Lock(PAnsiChar(SystemFileName), SHARED_LOCK);
 
 
   if (tmpLock <> 0) then begin
   if (tmpLock <> 0) then begin
     new(tmpFIB);
     new(tmpFIB);
@@ -449,7 +449,7 @@ begin
   FillChar(Anchor^,sizeof(TAnchorPath),#0);
   FillChar(Anchor^,sizeof(TAnchorPath),#0);
   Rslt.FindHandle := Anchor;
   Rslt.FindHandle := Anchor;
 
 
-  if MatchFirst(pchar(tmpStr),Anchor)<>0 then
+  if MatchFirst(PAnsiChar(tmpStr),Anchor)<>0 then
     begin
     begin
       InternalFindClose(Rslt.FindHandle);
       InternalFindClose(Rslt.FindHandle);
       exit;
       exit;
@@ -623,7 +623,7 @@ end;
 function RefreshDeviceList: Integer;
 function RefreshDeviceList: Integer;
 var
 var
   List: PDosList;
   List: PDosList;
-  Temp: PChar;
+  Temp: PAnsiChar;
   Str: string;
   Str: string;
 begin
 begin
   NumDevices := 0;
   NumDevices := 0;
@@ -663,7 +663,7 @@ begin
   OldWinPtr := MyProc^.pr_WindowPtr;
   OldWinPtr := MyProc^.pr_WindowPtr;
   MyProc^.pr_WindowPtr := Pointer(-1);
   MyProc^.pr_WindowPtr := Pointer(-1);
   //
   //
-  DirLock := Lock(PChar(Drive), SHARED_LOCK);
+  DirLock := Lock(PAnsiChar(Drive), SHARED_LOCK);
   if DirLock <> 0 then
   if DirLock <> 0 then
   begin
   begin
     if Info(DirLock, @Inf) <> 0 then
     if Info(DirLock, @Inf) <> 0 then
@@ -697,7 +697,7 @@ begin
   OldWinPtr := MyProc^.pr_WindowPtr;
   OldWinPtr := MyProc^.pr_WindowPtr;
   MyProc^.pr_WindowPtr := Pointer(-1);
   MyProc^.pr_WindowPtr := Pointer(-1);
   //
   //
-  DirLock := Lock(PChar(Drive), SHARED_LOCK);
+  DirLock := Lock(PAnsiChar(Drive), SHARED_LOCK);
   if DirLock <> 0 then
   if DirLock <> 0 then
   begin
   begin
     if Info(DirLock, @Inf) <> 0 then
     if Info(DirLock, @Inf) <> 0 then
@@ -726,7 +726,7 @@ begin
   if (Directory='') or (InOutRes<>0) then exit;
   if (Directory='') or (InOutRes<>0) then exit;
 
 
   SystemDirName:=PathConv(ToSingleByteFileSystemEncodedFileName(Directory));
   SystemDirName:=PathConv(ToSingleByteFileSystemEncodedFileName(Directory));
-  tmpLock:=Lock(PChar(SystemDirName),SHARED_LOCK);
+  tmpLock:=Lock(PAnsiChar(SystemDirName),SHARED_LOCK);
   if tmpLock=0 then exit;
   if tmpLock=0 then exit;
 
 
   FIB:=nil; new(FIB);
   FIB:=nil; new(FIB);
@@ -802,7 +802,7 @@ end;
 var
 var
   StrOfPaths: String;
   StrOfPaths: String;
 
 
-function SystemTags(const command: PChar; const tags: array of PtrUInt): LongInt;
+function SystemTags(const command: PAnsiChar; const tags: array of PtrUInt): LongInt;
 begin
 begin
   SystemTags:=SystemTagList(command,@tags);
   SystemTags:=SystemTagList(command,@tags);
 end;
 end;
@@ -883,12 +883,12 @@ begin
   { _SystemTagList call (program will abort!!)                 }
   { _SystemTagList call (program will abort!!)                 }
 
 
   { Try to open with shared lock }
   { Try to open with shared lock }
-  tmpLock:=Lock(PChar(convPath),SHARED_LOCK);
+  tmpLock:=Lock(PAnsiChar(convPath),SHARED_LOCK);
   if tmpLock<>0 then
   if tmpLock<>0 then
     begin
     begin
       { File exists - therefore unlock it }
       { File exists - therefore unlock it }
       Unlock(tmpLock);
       Unlock(tmpLock);
-      result:=SystemTagList(PChar(tmpPath),nil);
+      result:=SystemTagList(PAnsiChar(tmpPath),nil);
       { on return of -1 the shell could not be executed }
       { on return of -1 the shell could not be executed }
       { probably because there was not enough memory    }
       { probably because there was not enough memory    }
       if result = -1 then
       if result = -1 then