|
@@ -76,7 +76,7 @@ uses
|
|
|
|
|
|
type
|
|
type
|
|
PFarByte = ^Byte;far;
|
|
PFarByte = ^Byte;far;
|
|
- PFarChar = ^Char;far;
|
|
|
|
|
|
+ PFarChar = ^AnsiChar;far;
|
|
PFarWord = ^Word;far;
|
|
PFarWord = ^Word;far;
|
|
|
|
|
|
{$DEFINE HAS_GETMSCOUNT}
|
|
{$DEFINE HAS_GETMSCOUNT}
|
|
@@ -217,7 +217,7 @@ end;
|
|
procedure exec_ansistring(path : string;comline : ansistring);
|
|
procedure exec_ansistring(path : string;comline : ansistring);
|
|
var
|
|
var
|
|
c: ansistring;
|
|
c: ansistring;
|
|
- pc: PChar;
|
|
|
|
|
|
+ pc: PAnsiChar;
|
|
p: string;
|
|
p: string;
|
|
winexec_result: Word;
|
|
winexec_result: Word;
|
|
m: MSG;
|
|
m: MSG;
|
|
@@ -230,7 +230,7 @@ begin
|
|
c:='"'+p+'" '+comline
|
|
c:='"'+p+'" '+comline
|
|
else
|
|
else
|
|
c:=p+' '+comline;
|
|
c:=p+' '+comline;
|
|
- pc:=PChar(c);
|
|
|
|
|
|
+ pc:=PAnsiChar(c);
|
|
winexec_result:=WinExec(FarAddr(pc^),SW_SHOW);
|
|
winexec_result:=WinExec(FarAddr(pc^),SW_SHOW);
|
|
if winexec_result<32 then
|
|
if winexec_result<32 then
|
|
begin
|
|
begin
|
|
@@ -559,7 +559,7 @@ var
|
|
lfnfile : text;
|
|
lfnfile : text;
|
|
{$endif DEBUG_LFN}
|
|
{$endif DEBUG_LFN}
|
|
|
|
|
|
-procedure LFNFindFirst(path:pchar;attr:longint;var s:searchrec);
|
|
|
|
|
|
+procedure LFNFindFirst(path:PAnsiChar;attr:longint;var s:searchrec);
|
|
var
|
|
var
|
|
w : LFNSearchRec;
|
|
w : LFNSearchRec;
|
|
begin
|
|
begin
|
|
@@ -660,7 +660,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-procedure DosFindfirst(path : pchar;attr : word;var f : searchrec);
|
|
|
|
|
|
+procedure DosFindfirst(path : PAnsiChar;attr : word;var f : searchrec);
|
|
begin
|
|
begin
|
|
{ allow slash as backslash }
|
|
{ allow slash as backslash }
|
|
DoDirSeparators(path);
|
|
DoDirSeparators(path);
|
|
@@ -701,7 +701,7 @@ end;
|
|
|
|
|
|
procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
|
|
procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
|
|
var
|
|
var
|
|
- path0 : array[0..255] of char;
|
|
|
|
|
|
+ path0 : array[0..255] of AnsiChar;
|
|
begin
|
|
begin
|
|
doserror:=0;
|
|
doserror:=0;
|
|
strpcopy(path0,path);
|
|
strpcopy(path0,path);
|
|
@@ -801,7 +801,7 @@ end;
|
|
{ change to short filename if successful DOS call PM }
|
|
{ change to short filename if successful DOS call PM }
|
|
function GetShortName(var p : String) : boolean;
|
|
function GetShortName(var p : String) : boolean;
|
|
var
|
|
var
|
|
- c : array[0..255] of char;
|
|
|
|
|
|
+ c : array[0..255] of AnsiChar;
|
|
begin
|
|
begin
|
|
move(p[1],c[0],length(p));
|
|
move(p[1],c[0],length(p));
|
|
c[length(p)]:=#0;
|
|
c[length(p)]:=#0;
|
|
@@ -817,7 +817,7 @@ begin
|
|
if DosError=0 then
|
|
if DosError=0 then
|
|
begin
|
|
begin
|
|
move(c[0],p[1],strlen(c));
|
|
move(c[0],p[1],strlen(c));
|
|
- p[0]:=char(strlen(c));
|
|
|
|
|
|
+ p[0]:=AnsiChar(strlen(c));
|
|
GetShortName:=true;
|
|
GetShortName:=true;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
@@ -828,7 +828,7 @@ end;
|
|
{ change to long filename if successful DOS call PM }
|
|
{ change to long filename if successful DOS call PM }
|
|
function GetLongName(var p : String) : boolean;
|
|
function GetLongName(var p : String) : boolean;
|
|
var
|
|
var
|
|
- c : array[0..260] of char;
|
|
|
|
|
|
+ c : array[0..260] of AnsiChar;
|
|
begin
|
|
begin
|
|
move(p[1],c[0],length(p));
|
|
move(p[1],c[0],length(p));
|
|
c[length(p)]:=#0;
|
|
c[length(p)]:=#0;
|
|
@@ -845,7 +845,7 @@ begin
|
|
begin
|
|
begin
|
|
c[255]:=#0;
|
|
c[255]:=#0;
|
|
move(c[0],p[1],strlen(c));
|
|
move(c[0],p[1],strlen(c));
|
|
- p[0]:=char(strlen(c));
|
|
|
|
|
|
+ p[0]:=AnsiChar(strlen(c));
|
|
GetLongName:=true;
|
|
GetLongName:=true;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
@@ -882,7 +882,7 @@ end;
|
|
|
|
|
|
procedure getfattr(var f;var attr : word);
|
|
procedure getfattr(var f;var attr : word);
|
|
var
|
|
var
|
|
- path: pchar;
|
|
|
|
|
|
+ path: PAnsiChar;
|
|
{$ifndef FPC_ANSI_TEXTFILEREC}
|
|
{$ifndef FPC_ANSI_TEXTFILEREC}
|
|
r: rawbytestring;
|
|
r: rawbytestring;
|
|
{$endif not FPC_ANSI_TEXTFILEREC}
|
|
{$endif not FPC_ANSI_TEXTFILEREC}
|
|
@@ -891,7 +891,7 @@ begin
|
|
path:=@filerec(f).Name;
|
|
path:=@filerec(f).Name;
|
|
{$else}
|
|
{$else}
|
|
r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
|
|
r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
|
|
- path:=pchar(r);
|
|
|
|
|
|
+ path:=PAnsiChar(r);
|
|
{$endif}
|
|
{$endif}
|
|
dosregs.dx:=Ofs(path^);
|
|
dosregs.dx:=Ofs(path^);
|
|
dosregs.ds:=Seg(path^);
|
|
dosregs.ds:=Seg(path^);
|
|
@@ -911,7 +911,7 @@ end;
|
|
|
|
|
|
procedure setfattr(var f;attr : word);
|
|
procedure setfattr(var f;attr : word);
|
|
var
|
|
var
|
|
- path: pchar;
|
|
|
|
|
|
+ path: PAnsiChar;
|
|
{$ifndef FPC_ANSI_TEXTFILEREC}
|
|
{$ifndef FPC_ANSI_TEXTFILEREC}
|
|
r: rawbytestring;
|
|
r: rawbytestring;
|
|
{$endif not FPC_ANSI_TEXTFILEREC}
|
|
{$endif not FPC_ANSI_TEXTFILEREC}
|
|
@@ -926,7 +926,7 @@ begin
|
|
path:=@filerec(f).Name;
|
|
path:=@filerec(f).Name;
|
|
{$else}
|
|
{$else}
|
|
r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
|
|
r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
|
|
- path:=pchar(r);
|
|
|
|
|
|
+ path:=PAnsiChar(r);
|
|
{$endif}
|
|
{$endif}
|
|
dosregs.dx:=Ofs(path);
|
|
dosregs.dx:=Ofs(path);
|
|
dosregs.ds:=Seg(path);
|
|
dosregs.ds:=Seg(path);
|
|
@@ -951,7 +951,7 @@ end;
|
|
function GetEnvStr(EnvNo: Integer; var OutEnvStr: string): integer;
|
|
function GetEnvStr(EnvNo: Integer; var OutEnvStr: string): integer;
|
|
var
|
|
var
|
|
dos_env_ptr: LPSTR;
|
|
dos_env_ptr: LPSTR;
|
|
- Ch: Char;
|
|
|
|
|
|
+ Ch: AnsiChar;
|
|
begin
|
|
begin
|
|
dos_env_ptr := GetDOSEnvironment;
|
|
dos_env_ptr := GetDOSEnvironment;
|
|
GetEnvStr := 1;
|
|
GetEnvStr := 1;
|