|
@@ -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
|