Browse Source

* Char -> AnsiChar

Michael VAN CANNEYT 2 years ago
parent
commit
08820e97e8

+ 8 - 8
rtl/sinclairql/qdos.inc

@@ -32,7 +32,7 @@ asm
   movem.l (sp)+,d2-d3/a2-a3
   movem.l (sp)+,d2-d3/a2-a3
 end;
 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
 asm
   move.l  d2,-(sp)
   move.l  d2,-(sp)
   move.l  sys_vars,-(sp)
   move.l  sys_vars,-(sp)
@@ -115,10 +115,10 @@ asm
   movem.l (sp)+,d2-d3
   movem.l (sp)+,d2-d3
 end;
 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
 var
   len: longint;
   len: longint;
-  name_qlstr: array[0..63] of char;
+  name_qlstr: array[0..63] of AnsiChar;
 begin
 begin
   len:=length(name);
   len:=length(name);
   if len > length(name_qlstr)-2 then
   if len > length(name_qlstr)-2 then
@@ -149,10 +149,10 @@ asm
   movem.l (sp)+,d2-d3
   movem.l (sp)+,d2-d3
 end;
 end;
 
 
-function io_delet(name: pchar): Tchanid; public name '_io_delet';
+function io_delet(name: PAnsiChar): Tchanid; public name '_io_delet';
 var
 var
   len: longint;
   len: longint;
-  name_qlstr: array[0..63] of char;
+  name_qlstr: array[0..63] of AnsiChar;
 begin
 begin
   len:=length(name);
   len:=length(name);
   if len > length(name_qlstr)-2 then
   if len > length(name_qlstr)-2 then
@@ -228,7 +228,7 @@ begin
   io_fstrg := io_fetch(chan, timeout, buf, len, _IO_FSTRG);
   io_fstrg := io_fetch(chan, timeout, buf, len, _IO_FSTRG);
 end;
 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
 asm
   move.l d3,-(sp)
   move.l d3,-(sp)
   move.w timeout,d3
   move.w timeout,d3
@@ -339,10 +339,10 @@ asm
   move.l (sp)+,d3
   move.l (sp)+,d3
 end;
 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
 var
   len: longint;
   len: longint;
-  new_name_qlstr: array[0..63] of char;
+  new_name_qlstr: array[0..63] of AnsiChar;
 begin
 begin
   len:=length(new_name);
   len:=length(new_name);
   if len > length(new_name_qlstr)-2 then
   if len > length(new_name_qlstr)-2 then

+ 5 - 5
rtl/sinclairql/qdosfuncs.inc

@@ -15,7 +15,7 @@
 
 
 
 
 procedure mt_frjob(jobID: Tjobid; exitCode: longint); external name '_mt_frjob';
 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';
 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';
 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_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_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_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_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_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 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_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_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_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_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_truncate(chan: Tchanid): longint; external name '_fs_truncate';
 function fs_mkdir(chan: Tchanid): longint; external name '_iof_mkdr'; { SMS }
 function fs_mkdir(chan: Tchanid): longint; external name '_iof_mkdr'; { SMS }
 
 

+ 1 - 1
rtl/sinclairql/smsfuncs.inc

@@ -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 iob_fbyt(chan: Tchanid; timeout: Ttimeout): longint; external name '_io_fbyte';
 function iof_mkdr(chan: Tchanid): longint; external name '_iof_mkdr';
 function iof_mkdr(chan: Tchanid): longint; external name '_iof_mkdr';

+ 2 - 2
rtl/sinclairql/sysdir.inc

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

+ 3 - 3
rtl/sinclairql/sysfile.inc

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

+ 9 - 9
rtl/sinclairql/system.pp

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

+ 4 - 4
rtl/sinclairql/sysutils.pp

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