* Char -> AnsiChar

This commit is contained in:
Michael VAN CANNEYT 2022-12-21 17:08:56 +01:00 committed by Michaël Van Canneyt
parent 306e156b2b
commit 08820e97e8
7 changed files with 32 additions and 32 deletions

View File

@ -32,7 +32,7 @@ asm
movem.l (sp)+,d2-d3/a2-a3
end;
function mt_inf(sys_vars: ppchar; ver_ascii: plongint): Tjobid; assembler; nostackframe; public name '_mt_inf';
function mt_inf(sys_vars: PPAnsiChar; ver_ascii: plongint): Tjobid; assembler; nostackframe; public name '_mt_inf';
asm
move.l d2,-(sp)
move.l sys_vars,-(sp)
@ -115,10 +115,10 @@ asm
movem.l (sp)+,d2-d3
end;
function io_open(name: pchar; mode: longint): Tchanid; public name '_io_open';
function io_open(name: PAnsiChar; mode: longint): Tchanid; public name '_io_open';
var
len: longint;
name_qlstr: array[0..63] of char;
name_qlstr: array[0..63] of AnsiChar;
begin
len:=length(name);
if len > length(name_qlstr)-2 then
@ -149,10 +149,10 @@ asm
movem.l (sp)+,d2-d3
end;
function io_delet(name: pchar): Tchanid; public name '_io_delet';
function io_delet(name: PAnsiChar): Tchanid; public name '_io_delet';
var
len: longint;
name_qlstr: array[0..63] of char;
name_qlstr: array[0..63] of AnsiChar;
begin
len:=length(name);
if len > length(name_qlstr)-2 then
@ -228,7 +228,7 @@ begin
io_fstrg := io_fetch(chan, timeout, buf, len, _IO_FSTRG);
end;
function io_sbyte(chan: Tchanid; timeout: Ttimeout; c: char): longint; assembler; public name '_io_sbyte';
function io_sbyte(chan: Tchanid; timeout: Ttimeout; c: AnsiChar): longint; assembler; public name '_io_sbyte';
asm
move.l d3,-(sp)
move.w timeout,d3
@ -339,10 +339,10 @@ asm
move.l (sp)+,d3
end;
function fs_rename(chan: Tchanid; new_name: pchar): longint; public name '_fs_rename';
function fs_rename(chan: Tchanid; new_name: PAnsiChar): longint; public name '_fs_rename';
var
len: longint;
new_name_qlstr: array[0..63] of char;
new_name_qlstr: array[0..63] of AnsiChar;
begin
len:=length(new_name);
if len > length(new_name_qlstr)-2 then

View File

@ -15,7 +15,7 @@
procedure mt_frjob(jobID: Tjobid; exitCode: longint); external name '_mt_frjob';
function mt_inf(sys_vars: ppchar; ver_ascii: plongint): Tjobid; external name '_mt_inf';
function mt_inf(sys_vars: PPAnsiChar; ver_ascii: plongint): Tjobid; external name '_mt_inf';
procedure mt_dmode(s_mode: pword; d_type: pword); external name '_mt_dmode';
@ -23,21 +23,21 @@ function mt_alchp(size: dword; sizegot: pdword; jobid: Tjobid): pointer; externa
procedure mt_rechp(area: pointer); external name '_mt_rechp';
function io_open_qlstr(name_qlstr: pointer; mode: longint): Tchanid; external name '_io_open_qlstr';
function io_open(name: pchar; mode: longint): Tchanid; external name '_io_open';
function io_open(name: PAnsiChar; mode: longint): Tchanid; external name '_io_open';
function io_close(chan: Tchanid): longint; external name '_io_close';
function io_delet(name: pchar): longint; external name '_io_delet';
function io_delet(name: PAnsiChar): longint; external name '_io_delet';
function io_fbyte(chan: Tchanid; timeout: Ttimeout): longint; external name '_io_fbyte';
function io_fline(chan: Tchanid; timeout: Ttimeout; buf: pointer; len: word): longint; external name '_io_fline';
function io_fstrg(chan: Tchanid; timeout: Ttimeout; buf: pointer; len: word): longint; external name '_io_fstrg';
function io_sbyte(chan: Tchanid; timeout: Ttimeout; c: char): longint; external name '_io_sbyte';
function io_sbyte(chan: Tchanid; timeout: Ttimeout; c: AnsiChar): longint; external name '_io_sbyte';
function io_sstrg(chan: Tchanid; timeout: Ttimeout; buf: pointer; len: word): longint; external name '_io_sstrg';
function fs_posab(chan: Tchanid; var new_pos: longint): longint; external name '_fs_posab';
function fs_posre(chan: Tchanid; var new_pos: longint): longint; external name '_fs_posre';
function fs_headr(chan: Tchanid; buf: pointer; buf_size: word): longint; external name '_fs_headr';
function fs_rename_qlstr(chan: Tchanid; new_name_as_qlstr: pointer): longint; external name '_fs_rename_qlstr';
function fs_rename(chan: Tchanid; new_name: pchar): longint; external name '_fs_rename';
function fs_rename(chan: Tchanid; new_name: PAnsiChar): longint; external name '_fs_rename';
function fs_truncate(chan: Tchanid): longint; external name '_fs_truncate';
function fs_mkdir(chan: Tchanid): longint; external name '_iof_mkdr'; { SMS }

View File

@ -13,6 +13,6 @@
**********************************************************************}
function sms_info(sys_vars: ppchar; ver_ascii: plongint): Tjobid; external name '_mt_inf';
function sms_info(sys_vars: PPAnsiChar; ver_ascii: plongint): Tjobid; external name '_mt_inf';
function iob_fbyt(chan: Tchanid; timeout: Ttimeout): longint; external name '_io_fbyte';
function iof_mkdr(chan: Tchanid): longint; external name '_iof_mkdr';

View File

@ -26,7 +26,7 @@ begin
directory. The file should be opened as a new file as
errors occur if the file exists when creating a new
directory when it's already there. }
chanId := io_open(PChar(s), Q_OPEN_OVER);
chanId := io_open(PAnsiChar(s), Q_OPEN_OVER);
if chanId < 0 then
begin
Error2InOutRes(chanId);
@ -53,7 +53,7 @@ begin
or directory name that is not present. It should return
ERR_NF. (At least on RAM_/FLP_ or WIN_)
}
Error2InOutRes(io_delet(pchar(s)));
Error2InOutRes(io_delet(PAnsiChar(s)));
end;

View File

@ -26,13 +26,13 @@ begin
end;
{ delete a file, given its name }
procedure do_erase(p : pchar; pchangeable: boolean);
procedure do_erase(p : PAnsiChar; pchangeable: boolean);
begin
Error2InOutRes(io_delet(p));
end;
procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean);
var
chanId: longint;
res: longint;
@ -172,7 +172,7 @@ begin
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
they could use the same routine for opening/creating.

View File

@ -36,8 +36,8 @@ const
DriveSeparator = ':';
ExtensionSeparator = '.';
PathSeparator = ';';
AllowDirectorySeparators : set of char = ['\','/'];
AllowDriveSeparators : set of char = [':'];
AllowDirectorySeparators : set of AnsiChar = ['\','/'];
AllowDriveSeparators : set of AnsiChar = [':'];
FileNameCaseSensitive = false;
FileNameCasePreserving = false;
maxExitCode = 255;
@ -57,9 +57,9 @@ var
QL_ChannelIDNum : word;
QL_ChannelIDs: pdword;
QL_CommandLineLen : word;
QL_CommandLine : pchar;
QL_CommandLine : PAnsiChar;
argv: PPChar;
argv: PPAnsiChar;
argc: Longint;
{$if defined(FPUSOFT)}
@ -84,7 +84,7 @@ function SetQLJobName(const s: string): longint;
function GetQLJobName: string;
function GetQLJobNamePtr: pointer;
procedure SetQLDefaultConExitMessage(const msg: PChar);
procedure SetQLDefaultConExitMessage(const msg: PAnsiChar);
implementation
@ -129,7 +129,7 @@ end;
*****************************************************************************}
var
args: PChar;
args: PAnsiChar;
{ number of args }
function ParamCount: LongInt;
@ -149,7 +149,7 @@ end;
procedure SysInitParamsAndEnv;
var
i,j : longint;
c : char;
c : AnsiChar;
argv_size : longint;
const
word_separators=[' ',#0];
@ -277,9 +277,9 @@ begin
end;
const
QLDefaultConExitMessage: PChar = 'Press any key to exit';
QLDefaultConExitMessage: PAnsiChar = 'Press any key to exit';
procedure SetQLDefaultConExitMessage(const msg: PChar);
procedure SetQLDefaultConExitMessage(const msg: PAnsiChar);
begin
QLDefaultConExitMessage:=msg;
end;

View File

@ -75,7 +75,7 @@ begin
fmOpenWrite: QLMode := Q_OPEN_OVER;
fmOpenReadWrite: QLMode := Q_OPEN;
end;
FileOpen := io_open(pchar(Filename), QLMode);
FileOpen := io_open(PAnsiChar(Filename), QLMode);
if FileOpen < 0 then
FileOpen:=-1;
end;
@ -109,7 +109,7 @@ end;
function FileCreate(const FileName: RawByteString) : THandle;
begin
DeleteFile(FileName);
FileCreate := io_open(pchar(FileName), Q_OPEN_NEW);
FileCreate := io_open(PAnsiChar(FileName), Q_OPEN_NEW);
if FileCreate < 0 then
FileCreate:=-1;
end;
@ -215,7 +215,7 @@ end;
function DeleteFile(const FileName: RawByteString) : Boolean;
begin
DeleteFile:=false;
if io_delet(pchar(Filename)) < 0 then
if io_delet(PAnsiChar(Filename)) < 0 then
exit;
DeleteFile := True;
end;
@ -231,7 +231,7 @@ begin
if Handle = -1 then
exit;
QLerr := fs_rename(Handle, pchar(NewName));
QLerr := fs_rename(Handle, PAnsiChar(NewName));
FileClose(Handle);
if QLerr >= 0 then
RenameFile := true;