mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 05:28:07 +02:00
* Char -> AnsiChar
This commit is contained in:
parent
1d331117b5
commit
6e9537aeeb
@ -16,7 +16,7 @@
|
||||
const
|
||||
// TODO : check against BeOS real values...
|
||||
sys_errn=125;
|
||||
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 }
|
||||
|
@ -75,11 +75,11 @@ CONST // OS specific parameters for general<fd,sig>set behaviour
|
||||
TYPE
|
||||
{ system information services }
|
||||
utsname = record
|
||||
sysname : Array[0..SYS_NMLN-1] OF Char; // Name of this OS
|
||||
nodename: Array[0..SYS_NMLN-1] OF Char; // Name of this network node.
|
||||
release : Array[0..SYS_NMLN-1] OF Char; // Release level.
|
||||
version : Array[0..SYS_NMLN-1] OF Char; // Version level.
|
||||
machine : Array[0..SYS_NMLN-1] OF Char; // Hardware type.
|
||||
sysname : Array[0..SYS_NMLN-1] OF AnsiChar; // Name of this OS
|
||||
nodename: Array[0..SYS_NMLN-1] OF AnsiChar; // Name of this network node.
|
||||
release : Array[0..SYS_NMLN-1] OF AnsiChar; // Release level.
|
||||
version : Array[0..SYS_NMLN-1] OF AnsiChar; // Version level.
|
||||
machine : Array[0..SYS_NMLN-1] OF AnsiChar; // Hardware type.
|
||||
end;
|
||||
TUtsName= utsname;
|
||||
pUtsName= ^utsname;
|
||||
@ -119,7 +119,7 @@ TYPE
|
||||
d_ino : ino_t;
|
||||
d_pino : ino_t;
|
||||
d_reclen : cushort;
|
||||
d_name : array[0..255] of char;
|
||||
d_name : array[0..255] of AnsiChar;
|
||||
end;
|
||||
TDirent = dirent;
|
||||
pDirent = ^dirent;
|
||||
@ -287,7 +287,7 @@ type
|
||||
term_routine: pointer;
|
||||
device: dev_t;
|
||||
node: ino_t;
|
||||
name: array[0..1024{MAXPATHLEN}-1] of char;
|
||||
name: array[0..1024{MAXPATHLEN}-1] of AnsiChar;
|
||||
text: pointer;
|
||||
data: pointer;
|
||||
text_size: longint;
|
||||
|
@ -72,7 +72,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 ;
|
||||
|
@ -42,9 +42,9 @@ type
|
||||
|
||||
mbstate_t = record
|
||||
converter : pointer;
|
||||
charset : array[0..63] of char;
|
||||
charset : array[0..63] of AnsiChar;
|
||||
count : cuint;
|
||||
data : array[0..1023+8] of char; { 1024 bytes for data, 8 for alignment space }
|
||||
data : array[0..1023+8] of AnsiChar; { 1024 bytes for data, 8 for alignment space }
|
||||
end;
|
||||
pmbstate_t = ^mbstate_t;
|
||||
|
||||
|
@ -36,8 +36,8 @@ var
|
||||
argv_save: pointer; external name 'argv_save';
|
||||
main_thread_id: ptruint; external name '__main_thread_id';
|
||||
|
||||
function find_thread(name: pchar): ptruint; cdecl; external libc name 'find_thread';
|
||||
procedure _init_c_library_(argc: longint; argv: ppchar; env: ppchar); cdecl; external libc name '_init_c_library_';
|
||||
function find_thread(name: PAnsiChar): ptruint; cdecl; external libc name 'find_thread';
|
||||
procedure _init_c_library_(argc: longint; argv: PPAnsiChar; env: PPAnsiChar); cdecl; external libc name '_init_c_library_';
|
||||
procedure _call_init_routines_; cdecl; external libc name '_call_init_routines_';
|
||||
procedure __exit(status: longint); cdecl; external libc name 'exit';
|
||||
|
||||
|
@ -27,7 +27,7 @@ implementation
|
||||
var
|
||||
initialstkptr : Pointer; external name '__stkptr';
|
||||
|
||||
procedure debugger(s : PChar); cdecl; external 'root' name 'debugger';
|
||||
procedure debugger(s : PAnsiChar); cdecl; external 'root' name 'debugger';
|
||||
function disable_debugger(state : integer): integer; cdecl; external 'root' name 'disable_debugger';
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ type
|
||||
{$PACKRECORDS C}
|
||||
TAlternateSignalStack = record
|
||||
case Integer of
|
||||
0 : (buffer : array[0..(SIGSTKSZ * 4)-1] of Char);
|
||||
0 : (buffer : array[0..(SIGSTKSZ * 4)-1] of AnsiChar);
|
||||
1 : (ld : clonglong);
|
||||
2 : (l : integer);
|
||||
3 : (p : pointer);
|
||||
|
@ -51,11 +51,11 @@ Type
|
||||
TWinSize=winsize;
|
||||
|
||||
// typedef unsigned long tcflag_t;
|
||||
// typedef unsigned char speed_t;
|
||||
// typedef unsigned char cc_t;
|
||||
// typedef unsigned AnsiChar speed_t;
|
||||
// typedef unsigned AnsiChar cc_t;
|
||||
tcflag_t = Cardinal;
|
||||
speed_t = byte;
|
||||
cc_t = char;
|
||||
cc_t = AnsiChar;
|
||||
|
||||
type
|
||||
Termios = packed record
|
||||
@ -63,7 +63,7 @@ type
|
||||
c_oflag,
|
||||
c_cflag,
|
||||
c_lflag : tcflag_t;
|
||||
c_line : char;
|
||||
c_line : AnsiChar;
|
||||
c_ixxxxx : speed_t;
|
||||
c_oxxxxx : speed_t;
|
||||
c_cc : array[0..NCCS-1] of speed_t;
|
||||
@ -93,7 +93,7 @@ CONST
|
||||
IUCLC = $200; { maps all upper case to lower }
|
||||
IXON = $400; { enable output flow control }
|
||||
IXANY = $800; { enable input flow control }
|
||||
IXOFF = $1000; { any char will restart after stop }
|
||||
IXOFF = $1000; { any AnsiChar will restart after stop }
|
||||
|
||||
{
|
||||
* Output flags - software output processing
|
||||
@ -411,7 +411,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 =(
|
||||
Chr(VINTR), Chr(VQUIT), Chr(VERASE), Chr(VKILL), Chr(VEOF), Chr(VEOL),
|
||||
Chr(VEOL2), Chr(VSWTCH), Chr(VSTART), Chr(VSTOP), Chr(VSUSP));
|
||||
|
||||
|
@ -65,7 +65,7 @@ begin
|
||||
AssignPipe:=ret;
|
||||
end;
|
||||
|
||||
(*function intGetDomainName(Name:PChar; NameLen:Cint):cint;
|
||||
(*function intGetDomainName(Name:PAnsiChar; NameLen:Cint):cint;
|
||||
{$ifndef FPC_USE_LIBC}
|
||||
external name 'FPC_SYSC_GETDOMAINNAME';
|
||||
{$else FPC_USE_LIBC}
|
||||
|
Loading…
Reference in New Issue
Block a user