Browse Source

* Char -> AnsiChar

Michael VAN CANNEYT 2 years ago
parent
commit
221be05cac

+ 1 - 1
rtl/openbsd/errnostr.inc

@@ -15,7 +15,7 @@
 
 const
   sys_errn=92;
-  sys_errlist:array[0..sys_errn-1] of pchar = (
+  sys_errlist:array[0..sys_errn-1] of PAnsiChar = (
         'Success',                             { 0 }
         'Operation not permitted',             { EPERM }
         'No such file or directory',           { ENOENT }

+ 5 - 5
rtl/openbsd/i386/si_c.inc

@@ -18,9 +18,9 @@
 
 procedure __init; cdecl; external name '__init';
 procedure c_exit(exit_code: cint); cdecl; noreturn; external name 'exit';
-function _csu_finish(_argv: PPChar; _envp: PPChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
+function _csu_finish(_argv: PPAnsiChar; _envp: PPAnsiChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -37,9 +37,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
     call    _FPC_proc___start
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;
     environp: PPPChar;
@@ -75,7 +75,7 @@ procedure _FPC_proc_haltproc; cdecl; noreturn; public name '_haltproc';
     c_exit(operatingsystem_result);
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat

+ 5 - 5
rtl/openbsd/i386/si_g.inc

@@ -25,9 +25,9 @@ function atexit(proc: TCdeclProcedure): cint; cdecl; external name 'atexit';
 procedure _monstartup(lowpc, highpc: u_long); cdecl; external name '_monstartup';
 procedure __init; cdecl; external name '__init';
 procedure c_exit(exit_code: cint); cdecl; noreturn; external name 'exit';
-function _csu_finish(_argv: PPChar; _envp: PPChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
+function _csu_finish(_argv: PPAnsiChar; _envp: PPAnsiChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -44,9 +44,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
     call    _FPC_proc___start
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;
     environp: PPPChar;
@@ -84,7 +84,7 @@ procedure _FPC_proc_haltproc; cdecl; noreturn; public name '_haltproc';
     c_exit(operatingsystem_result);
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat

+ 4 - 4
rtl/openbsd/i386/si_prc.inc

@@ -16,7 +16,7 @@
 
 {$asmmode att}
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -34,9 +34,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
   end;
 
 procedure _FPC_proc_haltproc; cdecl; noreturn; forward;
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;
   begin
@@ -84,7 +84,7 @@ procedure _FPC_proc_haltproc; cdecl; noreturn; public name '_haltproc';
     end;
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat

+ 2 - 2
rtl/openbsd/pthread.inc

@@ -70,7 +70,7 @@ struct sem {
        sysse   : cint;
        entry   : psem_t;
        backpointer : ppsem_t; Those are not in pthread_private }
-       spare   : array[0..SEM_SAFE] of char;
+       spare   : array[0..SEM_SAFE] of AnsiChar;
 
     end;
 
@@ -108,7 +108,7 @@ function pthread_sigmask(how: cint; nset: psigset; oset: psigset): cint; cdecl;
 function sem_init(__sem:Psem_t; __pshared:cint;__value:dword):cint;cdecl; external;
 function sem_destroy(__sem:Psem_t):cint;cdecl;external ;
 function sem_close(__sem:Psem_t):cint;cdecl;external ;
-function sem_unlink(__name:Pchar):cint;cdecl;external ;
+function sem_unlink(__name:PAnsiChar):cint;cdecl;external ;
 function sem_wait(__sem:Psem_t):cint;cdecl;external ;
 function sem_trywait(__sem:Psem_t):cint;cdecl;external ;
 function sem_post(__sem:Psem_t):cint;cdecl;external ;

+ 8 - 8
rtl/openbsd/ptypes.inc

@@ -175,7 +175,7 @@ type
 	4: (procfs_args:  ^procfs_args_rec);
 	5: (msdosfs_args: ^msdosfs_args_rec);
 	6: (ntfs_args:    ^ntfs_args_rec);
-	7: (__align: array[0..159] of char); { 64-bit alignment and room to grow }
+	7: (__align: array[0..159] of AnsiChar); { 64-bit alignment and room to grow }
     end;
 
 // kernel statfs from mount.h
@@ -204,17 +204,17 @@ type
     owner             : tuid;     { user that mounted the fileystem }
     ctime             : cuint64;  { last mount [-u] time }
 
-    fstypename : array[0..MFSNAMELEN-1] of char;      { fs type name }
-    mntonname  : array[0..MNAMELEN-1] of char;        { directory on which mounted }
-    mntfromname: array[0..MNAMELEN-1] of char;        { mounted file system }
-    mntfromspec: array[0..MNAMELEN-1] of char;        { special for mount request }
+    fstypename : array[0..MFSNAMELEN-1] of AnsiChar;      { fs type name }
+    mntonname  : array[0..MNAMELEN-1] of AnsiChar;        { directory on which mounted }
+    mntfromname: array[0..MNAMELEN-1] of AnsiChar;        { mounted file system }
+    mntfromspec: array[0..MNAMELEN-1] of AnsiChar;        { special for mount request }
     mount_info: mountinfo;                            { per-filesystem mount options }
   end;
   PStatFS=^TStatFS;
 
   mbstate_t = record
       case byte of
-        0: (__mbstate8: array[0..127] of char);
+        0: (__mbstate8: array[0..127] of AnsiChar);
         1: (_mbstateL: cint64); { for alignment }
     end;
   pmbstate_t = ^mbstate_t;
@@ -285,7 +285,7 @@ type
         d_type        : cuint8;                         // file type, see below
         d_namlen      : cuint8;                         // length of string in d_name
 	d_padding     : array[1..4] of cuint8;
-        d_name        : array[0..(255 + 1)-1] of char;  // name must be no longer than this
+        d_name        : array[0..(255 + 1)-1] of AnsiChar;  // name must be no longer than this
    end;
    TDirent_55 = dirent_55;
    pDirent_55 = ^dirent_55;
@@ -294,7 +294,7 @@ type
         dd_fd     : cint;         // file descriptor associated with directory
         dd_loc    : clong;        // offset in current buffer
         dd_size   : clong;        // amount of data returned by getdirentries
-        dd_buf    : pchar;        // data buffer
+        dd_buf    : PAnsiChar;        // data buffer
         dd_len    : cint;         // size of data buffer
 	dd_curpos : off_t;
 	dd_lock   : pointer;

+ 1 - 1
rtl/openbsd/setsysnr.inc

@@ -23,7 +23,7 @@ Var
   len  : size_t;
   oerrno : cint;
   err : word;
-  point, c : char;
+  point, c : AnsiChar;
   i, version_major, version_minor, version : cint;
 Begin
   mib[0] := 1{ CTL_KERN};

+ 5 - 5
rtl/openbsd/si_intf.inc

@@ -28,9 +28,9 @@ type
   TCdeclProcedure = procedure; cdecl;
 
 var
-  operatingsystem_parameter_envp: ppchar; public name 'operatingsystem_parameter_envp';
+  operatingsystem_parameter_envp: PPAnsiChar; public name 'operatingsystem_parameter_envp';
   operatingsystem_parameter_argc: longint; public name 'operatingsystem_parameter_argc';
-  operatingsystem_parameter_argv: ppchar; public name 'operatingsystem_parameter_argv';
-  environ: ppchar; public name 'environ';
-  __progname: pchar = ''; public name '__progname';
-  __progname_storage: array [0..255] of char; public name '__progname_storage';
+  operatingsystem_parameter_argv: PPAnsiChar; public name 'operatingsystem_parameter_argv';
+  environ: PPAnsiChar; public name 'environ';
+  __progname: PAnsiChar = ''; public name '__progname';
+  __progname_storage: array [0..255] of AnsiChar; public name '__progname_storage';

+ 2 - 2
rtl/openbsd/signal.inc

@@ -162,10 +162,10 @@ type sigset_t = array [0..0] of cuint32 {array[0..3] of cardinal};
        en_opcode    : word;         { opcode last executed (11 bits ) }
        en_foo       : cardinal;     { floating operand offset }
        en_fos       : cardinal;     { floating operand segment selector }
-       fpr_acc      : array[0..79] of char;
+       fpr_acc      : array[0..79] of AnsiChar;
        fpr_ex_sw    : cardinal;     { status word of last exception }
        fpr_ex_tw    : cardinal;     { tag word of last exception }
-       fpr_pad      : array[0..63] of char;
+       fpr_pad      : array[0..63] of AnsiChar;
        end;
     TFpuXMMState = packed record
 	fx_fcw : cuint16;

+ 3 - 3
rtl/openbsd/systypes.inc

@@ -27,9 +27,9 @@ type
     ftype          : longint;
     fflags         : longint; {copy of mount flags}
     spare          : array [0..1] of longint; { For later use }
-    fstypename     : array[0..15] of char;
-    mountpoint     : array[0..89] of char;
-    mnfromname     : array[0..89] of char;
+    fstypename     : array[0..15] of AnsiChar;
+    mountpoint     : array[0..89] of AnsiChar;
+    mnfromname     : array[0..89] of AnsiChar;
   end;
   PStatFS=^TStatFS;
 

+ 3 - 3
rtl/openbsd/termios.inc

@@ -90,7 +90,7 @@ CONST
         ICRNL           =     $100;     { map CR to NL (ala CRMOD) }
         IXON            =     $200;     { enable output flow control }
         IXOFF           =     $400;     { enable input flow control }
-        IXANY           =     $800;     { any char will restart after stop }
+        IXANY           =     $800;     { any AnsiChar will restart after stop }
         IUCLC           =    $1000;     { translate upper to lower case }
         IMAXBEL         =    $2000;     { ring bell on input queue full }
 
@@ -141,7 +141,7 @@ CONST
         ECHO            =       $8;     { enable echoing }
         ECHONL          =      $10;     { echo NL even if ECHO is off }
         ECHOPRT         =      $20;     { visual erase mode for hardcopy }
-        ECHOCTL         =      $40;     { echo control chars as ^(Char) }
+        ECHOCTL         =      $40;     { echo control chars as ^(AnsiChar) }
         ISIG            =      $80;     { enable signals INTR, QUIT, [D]SUSP }
         ICANON          =     $100;     { canonicalize input lines }
         ALTWERASE       =     $200;     { use alternate WERASE algorithm }
@@ -369,7 +369,7 @@ struct winsize {
 {
  *        TTYDEFCHARS to include an array of default control characters.
 }
-    ttydefchars : array[0..NCCS-1] OF char =(
+    ttydefchars : array[0..NCCS-1] OF AnsiChar =(
         CEOF,   CEOL,   CEOL,   CERASE, CWERASE, CKILL, CREPRINT,
         POSIX_VDISABLE, CINTR,  CQUIT,  CSUSP,  CDSUSP, CSTART, CSTOP,  CLNEXT,
         CDISCARD, CMIN, CTIME,  CSTATUS, POSIX_VDISABLE);

+ 1 - 1
rtl/openbsd/unixsysc.inc

@@ -74,7 +74,7 @@ begin
   fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
 end;
 
-Function  fpStatFS  (Path:pchar; Info:pstatfs):cint;
+Function  fpStatFS  (Path:PAnsiChar; Info:pstatfs):cint;
 
 begin
   fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))

+ 1 - 1
rtl/openbsd/unxsysc.inc

@@ -66,7 +66,7 @@ begin
   fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
 end;
 
-Function  fpStatFS  (Path:pchar; Info:pstatfs):cint;
+Function  fpStatFS  (Path:PAnsiChar; Info:pstatfs):cint;
 
 begin
   fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))

+ 5 - 5
rtl/openbsd/x86_64/si_c.inc

@@ -18,9 +18,9 @@
 
 procedure __init; cdecl; external name '__init';
 procedure c_exit(exit_code: cint); cdecl; noreturn; external name 'exit';
-function _csu_finish(_argv: PPChar; _envp: PPChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
+function _csu_finish(_argv: PPAnsiChar; _envp: PPAnsiChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -34,9 +34,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
     jmp     _FPC_proc___start
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;
     environp: PPPChar;
@@ -72,7 +72,7 @@ procedure _FPC_proc_haltproc; cdecl; noreturn; public name '_haltproc';
     c_exit(operatingsystem_result);
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat

+ 5 - 5
rtl/openbsd/x86_64/si_g.inc

@@ -25,9 +25,9 @@ function atexit(proc: TCdeclProcedure): cint; cdecl; external name 'atexit';
 procedure _monstartup(lowpc, highpc: u_long); cdecl; external name '_monstartup';
 procedure __init; cdecl; external name '__init';
 procedure c_exit(exit_code: cint); cdecl; noreturn; external name 'exit';
-function _csu_finish(_argv: PPChar; _envp: PPChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
+function _csu_finish(_argv: PPAnsiChar; _envp: PPAnsiChar; _cleanup: TCdeclProcedure): PPPChar; cdecl; external name '_csu_finish';
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl; forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -41,9 +41,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
     jmp     _FPC_proc___start
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;
     environp: PPPChar;
@@ -81,7 +81,7 @@ procedure _FPC_proc_haltproc; cdecl; noreturn; public name '_haltproc';
     c_exit(operatingsystem_result);
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat

+ 4 - 4
rtl/openbsd/x86_64/si_prc.inc

@@ -16,7 +16,7 @@
 
 {$asmmode gas}
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure); forward;
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); forward;
 
 procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public name '__start';
   asm
@@ -31,9 +31,9 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
   end;
 
 procedure _FPC_proc_haltproc; cdecl; forward;
-function _strrchr(str: PChar; character: LongInt): PChar; forward;
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
-procedure _FPC_proc___start(argc: LongInt; argv: PPChar; envp: Pointer; cleanup: TCdeclProcedure);
+procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure);
   var
     I: SizeUInt;
   begin
@@ -71,7 +71,7 @@ procedure _FPC_proc_haltproc; cdecl; assembler; nostackframe; public name '_halt
     jmp     _FPC_proc_haltproc
   end;
 
-function _strrchr(str: PChar; character: LongInt): PChar; public name '_strrchr';
+function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; public name '_strrchr';
   begin
     _strrchr:=nil;
     repeat