* Char -> AnsiChar

This commit is contained in:
Michael VAN CANNEYT 2022-12-21 17:34:30 +01:00 committed by Michaël Van Canneyt
parent 08820e97e8
commit 7c538b1797
6 changed files with 21 additions and 21 deletions

View File

@ -15,7 +15,7 @@
const
sys_errn = 152;
sys_errlist:array[0..sys_errn-1] of pchar = (
sys_errlist:array[0..sys_errn-1] of PAnsiChar = (
'Success',
'Not super-user',
'No such file or directory',

View File

@ -29,7 +29,7 @@ CONST
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
ln2bitmask = 1 shl ln2bitsinword - 1;
UTSNAME_LENGTH = 256; { 256 + 1 in pchar format }
UTSNAME_LENGTH = 256; { 256 + 1 in PAnsiChar format }
UTSNAME_NODENAME_LENGTH = 256;
ST_FSTYPSZ = 16; {* array size for file system type name *}
@ -65,7 +65,7 @@ TYPE
st_ctimens : clong; { modification time nanosecond field }
st_blksize : blksize_t;
st_blocks : blkcnt_t;
st_fstype : array[0..ST_FSTYPSZ-1] of char;
st_fstype : array[0..ST_FSTYPSZ-1] of AnsiChar;
{$ifndef CPU64}
st_pad4 : array[1..8] of longint;
{$endif ndef CPU64}
@ -102,11 +102,11 @@ TYPE
{ system information services }
utsname = packed record { don't forget to verify the alignment }
sysname : array[0..UTSNAME_LENGTH] of char;
nodename : array[0..UTSNAME_LENGTH] of char;
release : array[0..UTSNAME_LENGTH] of char;
version : array[0..UTSNAME_LENGTH] of char;
machine : array[0..UTSNAME_LENGTH] of char;
sysname : array[0..UTSNAME_LENGTH] of AnsiChar;
nodename : array[0..UTSNAME_LENGTH] of AnsiChar;
release : array[0..UTSNAME_LENGTH] of AnsiChar;
version : array[0..UTSNAME_LENGTH] of AnsiChar;
machine : array[0..UTSNAME_LENGTH] of AnsiChar;
end;
UTimBuf = Record
@ -124,7 +124,7 @@ TYPE
d_ino : ino_t; {* "inode number" of entry *}
d_off : off_t; {* offset of disk directory entry *}
d_reclen : word; {* length of this record *}
d_name : array[0..255] of char; { name of file }
d_name : array[0..255] of AnsiChar; { name of file }
);
{ overlay with alias }
2 : (
@ -140,14 +140,14 @@ TYPE
d_fd : cint; {* file descriptor *}
d_loc : cint; {* offset in block *}
d_size : cint; {* amount of valid data *}
d_buf : pchar; { directory block }
d_buf : PAnsiChar; { directory block }
);
{ overlay for posix compatibility }
2 : (
dd_fd : cint; {* file descriptor *}
dd_loc : cint; {* offset in block *}
dd_size : cint; {* amount of valid data *}
dd_buf : pchar; { directory block }
dd_buf : PAnsiChar; { directory block }
);
end;

View File

@ -109,7 +109,7 @@ function pthread_sigmask(how: cint; nset: psigset; oset: psigset): cint; cdecl;
function sem_init(__sem:Psem_t; __pshared:cint;__value:cuint):cint;cdecl; external 'c' name 'sem_init';
function sem_destroy(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_destroy';
function sem_close(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_close';
function sem_unlink(__name:Pchar):cint;cdecl;external 'c' name 'sem_unlink';
function sem_unlink(__name:PAnsiChar):cint;cdecl;external 'c' name 'sem_unlink';
function sem_wait(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_wait';
function sem_trywait(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_trywait';
function sem_post(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_post';

View File

@ -98,7 +98,7 @@ Type
pTime = ^time_t;
ptime_t = ^time_t;
clockid_t = cint;
caddr_t = ^char;
caddr_t = ^AnsiChar;
uint32_t = cuint32;
int32_t = cint32;
@ -176,10 +176,10 @@ Type
ffree, { Free file nodes in system }
favail : fsblkcnt_t; { free nodes avail to non-superuser}
fsid : clong; { File system ID }
basetype: array [0..15] of char; { null-terminated fs type name }
basetype: array [0..15] of AnsiChar; { null-terminated fs type name }
flag : culong; { bit-mask of flags }
namelen : culong; { Maximum name length in system }
fstr : array[0..31] of char; { fs-specific string }
fstr : array[0..31] of AnsiChar; { fs-specific string }
{$ifndef cpu64}
spare : array[0..15] of clong; { reserved for future use }
{$endif}

View File

@ -25,8 +25,8 @@ interface
{$I sysunixh.inc}
var argc:longint;
argv:PPchar;
envp:PPchar;
argv:PPAnsiChar;
envp:PPAnsiChar;
{$define FPC_SYSTEM_HAS_STACKTOP}
var
@ -85,7 +85,7 @@ Begin
End;
function BackPos(c:char; const s: shortstring): integer;
function BackPos(c:AnsiChar; const s: shortstring): integer;
var
i: integer;
Begin
@ -195,7 +195,7 @@ var
len,j,
size,i : longint;
found : boolean;
buf : pchar;
buf : PAnsiChar;
procedure AddBuf;
begin

View File

@ -122,9 +122,9 @@
{
* control characters form Xenix termio.h
}
{ RESERVED true EOF char (V7 compatability) }
{ RESERVED true EOF AnsiChar (V7 compatability) }
VCEOF = NCC;
{ RESERVED true EOL char }
{ RESERVED true EOL AnsiChar }
VCEOL = NCC+1;
CNUL = 0;
CDEL = 0177;