* PChar -> PAnsiChar

This commit is contained in:
Michaël Van Canneyt 2023-01-13 19:13:35 +01:00
parent 26d7067c51
commit 863bf00357
12 changed files with 278 additions and 278 deletions

View File

@ -166,12 +166,12 @@ begin
end;
const
win_info: array[0..63] of char = '';
win_info: array[0..63] of AnsiChar = '';
var
appl_h: smallint;
win_h: smallint;
win_name: pchar;
win_name: PAnsiChar;
vdi_h: smallint;
mx, my: smallint;

View File

@ -20,8 +20,8 @@ uses
var
win_h: smallint;
win_name: pchar;
win_info: pchar;
win_name: PAnsiChar;
win_info: PAnsiChar;
vdi_h: smallint;
const

View File

@ -35,14 +35,14 @@ type
function appl_exit: smallint;
function appl_read(ap_rid: smallint; ap_rlength: smallint; ap_rpbuff: pointer): smallint;
function appl_write(ap_wid: smallint; ap_wlength: smallint; ap_wpbuff: pointer): smallint;
function appl_find(fname: PChar): smallint;
function appl_find(fname: PAnsiChar): smallint;
function appl_find(ap_fpname: String): smallint;
function appl_tplay(ap_tpmem: Pointer; ap_tpnum, ap_tpscale: smallint): smallint;
function appl_trecord(ap_trmem: Pointer; ap_trcount: smallint): smallint;
function appl_bvset(ap_bvdisk, ap_bvhard: Word): smallint;
function appl_yield: smallint;
procedure _appl_yield;
function appl_search(ap_smode: smallint; ap_sname: Pchar; out ap_stype, ap_sid: smallint): smallint;
function appl_search(ap_smode: smallint; ap_sname: PAnsiChar; out ap_stype, ap_sid: smallint): smallint;
function appl_search(ap_smode: smallint; out ap_sname: String; out ap_stype, ap_sid: smallint): smallint;
function appl_getinfo(ap_gtype: smallint; out ap_gout1, ap_gout2, ap_gout3, ap_gout4: smallint): smallint;
function appl_init: smallint;
@ -81,8 +81,8 @@ function menu_bar(me_btree: PAESOBJECT; me_bshow: smallint): smallint; overload;
function menu_icheck(me_ctree: PAESOBJECT; me_citem: smallint; me_ccheck: smallint): smallint; overload;
function menu_ienable(me_etree: PAESOBJECT; me_eitem: smallint; me_eenable: smallint): smallint; overload;
function menu_tnormal(me_ntree: PAESOBJECT; me_ntitle: smallint; me_nnormal: smallint): smallint; overload;
function menu_text(me_ttree: PAESOBJECT; me_titem: smallint; me_ttext: PChar): smallint; overload;
function menu_register(me_rapid: smallint; me_rpstring: PChar): smallint;
function menu_text(me_ttree: PAESOBJECT; me_titem: smallint; me_ttext: PAnsiChar): smallint; overload;
function menu_register(me_rapid: smallint; me_rpstring: PAnsiChar): smallint;
function menu_register(me_rapid: smallint; me_rpstring: String): smallint;
function menu_unregister(me_uapid: smallint): smallint;
function menu_popup(me_menu: PMENU; me_xpos, me_ypos: smallint; var me_mdata: TMENU): smallint;
@ -125,7 +125,7 @@ function form_dial(fo_diflag: smallint; fo_dilittlx: smallint;
fo_dilittlh: smallint; fo_dibigx: smallint;
fo_dibigy: smallint; fo_dibigw: smallint;
fo_dibigh: smallint): smallint;
function form_alert(fo_adefbttn: smallint; alertstr: PChar): smallint;
function form_alert(fo_adefbttn: smallint; alertstr: PAnsiChar): smallint;
function form_alert(fo_adefbttn: smallint; fo_astring: String): smallint;
function form_error(error: smallint): smallint;
function form_center(fo_ctree: PAESOBJECT; fo_cx: psmallint;
@ -164,14 +164,14 @@ function graf_mkstate(gr_mkmx: psmallint; gr_mkmy: psmallint;
gr_mkmstate: psmallint; gr_mkkstate: psmallint): smallint;
function graf_mkstate(out gr_mkmx, gr_mkmy, gr_mkmstate, gr_mkkstate: smallint): smallint;
function scrp_read(sc_rpscrap: pchar): smallint;
function scrp_read(sc_rpscrap: PAnsiChar): smallint;
function scrp_read(out sc_rpscrap: String): smallint;
function scrp_write(sc_wpscrap: pchar): smallint;
function scrp_write(sc_wpscrap: PAnsiChar): smallint;
function scrp_write(const sc_wpscrap: String): smallint;
function fsel_input(fs_iinpath: pchar; fs_iinsel: pchar; fs_iexbutton: psmallint): smallint;
function fsel_input(fs_iinpath: PAnsiChar; fs_iinsel: PAnsiChar; fs_iexbutton: psmallint): smallint;
function fsel_input(var fs_iinpath, fs_iinsel: String; out fs_iexbutton: smallint): smallint;
function fsel_exinput(fs_einpath: pchar; fs_einsel: pchar; fs_eexbutton: psmallint; elabel: pchar): smallint;
function fsel_exinput(fs_einpath: PAnsiChar; fs_einsel: PAnsiChar; fs_eexbutton: psmallint; elabel: PAnsiChar): smallint;
function fsel_exinput(var fs_einpath, fs_einsel: String; out fs_eexbutton: smallint;
const fs_elabel: String): smallint;
@ -201,7 +201,7 @@ function wind_calc(wi_ctype, wi_ckind, wi_cinx, wi_ciny, wi_cinw, wi_cinh : smal
out wi_coutx, wi_couty, wi_coutw, wi_couth: smallint): smallint;
procedure wind_new;
function rsrc_load(re_lpfname: PChar): smallint;
function rsrc_load(re_lpfname: PAnsiChar): smallint;
function rsrc_load(re_lpfname: String): smallint;
function rsrc_free: smallint;
function rsrc_gaddr(re_gtype: smallint; re_gindex: smallint; gaddr: ppointer): smallint;
@ -210,18 +210,18 @@ function rsrc_saddr(re_stype: smallint; re_sindex: smallint; saddr: pointer): sm
function rsrc_obfix(re_otree: PAESOBJECT; re_oobject: smallint): smallint; overload;
function rsrc_rcfix(rc_header: PRSHDR): smallint;
function shel_read(sh_rpcmd: pchar; sh_rptail: pchar): smallint;
function shel_read(sh_rpcmd: PAnsiChar; sh_rptail: PAnsiChar): smallint;
function shel_read(out sh_rpcmd, sh_rptail: String): smallint;
function shel_write(sh_wdoex: smallint; sh_wisgr: smallint;
sh_wiscr: smallint; sh_wpcmd: pchar;
sh_wptail: pchar): smallint;
sh_wiscr: smallint; sh_wpcmd: PAnsiChar;
sh_wptail: PAnsiChar): smallint;
function shel_write(sh_wdoex, sh_wisgr, sh_wiscr: smallint;
const sh_wpcmd, sh_wptail: String): smallint;
function shel_get(sh_gaddr: pchar; sh_glen: word): smallint;
function shel_put(sh_paddr: pchar; sh_plen: word): smallint;
function shel_find(sh_fpbuff: pchar): smallint;
function shel_get(sh_gaddr: PAnsiChar; sh_glen: word): smallint;
function shel_put(sh_paddr: PAnsiChar; sh_plen: word): smallint;
function shel_find(sh_fpbuff: PAnsiChar): smallint;
function shel_find(var sh_fpbuff: String): smallint;
function shel_envrn(sh_epvalue: ppchar; sh_eparm: pchar): smallint;
function shel_envrn(sh_epvalue: PPAnsiChar; sh_eparm: PAnsiChar): smallint;
function shel_envrn(out sh_epvalue: Pointer; const sh_eparm: String): smallint;
function shel_rdef(out sh_rlpcmd, sh_rlpdir: String): smallint;
function shel_wdef(const sh_wlpcmd, sh_wlpdir: String): smallint;
@ -274,7 +274,7 @@ Geneva functions
implementation
type
aesstr = array[0..255] of char;
aesstr = array[0..255] of AnsiChar;
const
ops_table: array[0..120,0..3] of SmallInt = (
@ -446,7 +446,7 @@ begin
appl_write:=crys_if(12);
end;
function appl_find(fname: PChar): smallint;
function appl_find(fname: PAnsiChar): smallint;
begin
_addrin[0]:=fname;
appl_find:=crys_if(13);
@ -495,7 +495,7 @@ asm
movea.l (a7)+,a2
end;
function appl_search(ap_smode: smallint; ap_sname: Pchar; out ap_stype, ap_sid: smallint): smallint;
function appl_search(ap_smode: smallint; ap_sname: PAnsiChar; out ap_stype, ap_sid: smallint): smallint;
begin
_intin[0]:=ap_smode;
_addrin[0]:=ap_sname;
@ -510,7 +510,7 @@ begin
_intin[0]:=ap_smode;
_addrin[0]:=@s[0];
appl_search:=crys_if(18);
ap_sname:=PChar(@s[0]);
ap_sname:=PAnsiChar(@s[0]);
ap_stype:=_intout[1];
ap_sid:=_intout[2];
end;
@ -782,7 +782,7 @@ begin
menu_tnormal:=crys_if(33);
end;
function menu_text(me_ttree: PAESOBJECT; me_titem: smallint; me_ttext: PChar): smallint;
function menu_text(me_ttree: PAESOBJECT; me_titem: smallint; me_ttext: PAnsiChar): smallint;
begin
_intin[0]:=me_titem;
_addrin[0]:=me_ttree;
@ -791,7 +791,7 @@ begin
menu_text:=crys_if(34);
end;
function menu_register(me_rapid: smallint; me_rpstring: PChar): smallint;
function menu_register(me_rapid: smallint; me_rpstring: PAnsiChar): smallint;
begin
_intin[0]:=me_rapid;
_addrin[0]:=me_rpstring;
@ -1087,7 +1087,7 @@ begin
form_dial:=crys_if(51);
end;
function form_alert(fo_adefbttn: smallint; alertstr: PChar): smallint;
function form_alert(fo_adefbttn: smallint; alertstr: PAnsiChar): smallint;
begin
_intin[0]:=fo_adefbttn;
_addrin[0]:=alertstr;
@ -1348,7 +1348,7 @@ begin
end;
function scrp_read(sc_rpscrap: pchar): smallint;
function scrp_read(sc_rpscrap: PAnsiChar): smallint;
begin
_addrin[0]:=sc_rpscrap;
scrp_read:=crys_if(80);
@ -1359,10 +1359,10 @@ var s: aesstr;
begin
_addrin[0]:=@s;
scrp_read:=crys_if(80);
sc_rpscrap:=Pchar(@s[0]);
sc_rpscrap:=PAnsiChar(@s[0]);
end;
function scrp_write(sc_wpscrap: pchar): smallint;
function scrp_write(sc_wpscrap: PAnsiChar): smallint;
begin
_addrin[0]:=sc_wpscrap;
scrp_write:=crys_if(81);
@ -1382,7 +1382,7 @@ begin
end;
function fsel_input(fs_iinpath: pchar; fs_iinsel: pchar; fs_iexbutton: psmallint): smallint;
function fsel_input(fs_iinpath: PAnsiChar; fs_iinsel: PAnsiChar; fs_iexbutton: psmallint): smallint;
begin
_addrin[0]:=fs_iinpath;
_addrin[1]:=fs_iinsel;
@ -1404,11 +1404,11 @@ begin
fsel_input:=crys_if(90);
fs_iexbutton:=_intout[1];
fs_iinpath:=Pchar(@s1[0]);
fs_iinsel:=Pchar(@s2[0]);
fs_iinpath:=PAnsiChar(@s1[0]);
fs_iinsel:=PAnsiChar(@s2[0]);
end;
function fsel_exinput(fs_einpath: pchar; fs_einsel: pchar; fs_eexbutton: psmallint; elabel: pchar): smallint;
function fsel_exinput(fs_einpath: PAnsiChar; fs_einsel: PAnsiChar; fs_eexbutton: psmallint; elabel: PAnsiChar): smallint;
begin
_addrin[0]:=fs_einpath;
_addrin[1]:=fs_einsel;
@ -1434,8 +1434,8 @@ begin
fsel_exinput:=crys_if(91);
fs_eexbutton:=_intout[1];
fs_einpath:=Pchar(@s1[0]);
fs_einsel:=Pchar(@s2[0]);
fs_einpath:=PAnsiChar(@s1[0]);
fs_einsel:=PAnsiChar(@s2[0]);
end;
@ -1679,7 +1679,7 @@ begin
end;
function rsrc_load(re_lpfname: PChar): smallint;
function rsrc_load(re_lpfname: PAnsiChar): smallint;
begin
_addrin[0]:=re_lpfname;
rsrc_load:=crys_if(110);
@ -1747,7 +1747,7 @@ begin
end;
function shel_read(sh_rpcmd: pchar; sh_rptail: pchar): smallint;
function shel_read(sh_rpcmd: PAnsiChar; sh_rptail: PAnsiChar): smallint;
begin
_addrin[0]:=sh_rpcmd;
_addrin[1]:=sh_rptail;
@ -1762,13 +1762,13 @@ begin
_addrin[1]:=@s2;
shel_read:=crys_if(120);
sh_rpcmd:=Pchar(@s1[0]);
sh_rptail:=Pchar(@s2[0]);
sh_rpcmd:=PAnsiChar(@s1[0]);
sh_rptail:=PAnsiChar(@s2[0]);
end;
function shel_write(sh_wdoex: smallint; sh_wisgr: smallint;
sh_wiscr: smallint; sh_wpcmd: pchar;
sh_wptail: pchar): smallint;
sh_wiscr: smallint; sh_wpcmd: PAnsiChar;
sh_wptail: PAnsiChar): smallint;
begin
_intin[0]:=sh_wdoex;
_intin[1]:=sh_wisgr;
@ -1793,7 +1793,7 @@ begin
shel_write:=crys_if(121);
end;
function shel_get(sh_gaddr: pchar; sh_glen: word): smallint;
function shel_get(sh_gaddr: PAnsiChar; sh_glen: word): smallint;
begin
_intin[0]:=smallint(sh_glen);
_addrin[0]:=sh_gaddr;
@ -1801,7 +1801,7 @@ begin
shel_get:=crys_if(122);
end;
function shel_put(sh_paddr: pchar; sh_plen: word): smallint;
function shel_put(sh_paddr: PAnsiChar; sh_plen: word): smallint;
begin
_intin[0]:=smallint(sh_plen);
_addrin[0]:=sh_paddr;
@ -1809,7 +1809,7 @@ begin
shel_put:=crys_if(123);
end;
function shel_find(sh_fpbuff: pchar): smallint;
function shel_find(sh_fpbuff: PAnsiChar): smallint;
begin
_addrin[0]:=sh_fpbuff;
@ -1823,10 +1823,10 @@ begin
_addrin[0]:=@s;
shel_find:=crys_if(124);
sh_fpbuff:=Pchar(@s[0]);
sh_fpbuff:=PAnsiChar(@s[0]);
end;
function shel_envrn(sh_epvalue: ppchar; sh_eparm: pchar): smallint;
function shel_envrn(sh_epvalue: PPAnsiChar; sh_eparm: PAnsiChar): smallint;
begin
_addrin[0]:=sh_epvalue;
_addrin[1]:=sh_eparm;
@ -1851,8 +1851,8 @@ begin
_addrin[1]:=@s2;
shel_rdef:=crys_if(126);
sh_rlpcmd:=Pchar(@s1[0]);
sh_rlpdir:=Pchar(@s2[0]);
sh_rlpcmd:=PAnsiChar(@s1[0]);
sh_rlpdir:=PAnsiChar(@s2[0]);
end;
function shel_wdef(const sh_wlpcmd, sh_wlpdir: String): smallint;

View File

@ -114,9 +114,9 @@ const
type
PTEDINFO = ^TTEDINFO;
TTEDINFO = record
te_ptext : Pchar;
te_ptmplt : Pchar;
te_pvalid : Pchar;
te_ptext : PAnsiChar;
te_ptmplt : PAnsiChar;
te_pvalid : PAnsiChar;
te_font : smallint;
te_resvd1 : smallint;
te_just : smallint;
@ -131,7 +131,7 @@ type
TICONBLK = record
ib_pmask : Pointer;
ib_pdata : Pointer;
ib_ptext : Pchar;
ib_ptext : PAnsiChar;
ib_char : smallint;
ib_xchar : smallint;
ib_ychar : smallint;
@ -192,7 +192,7 @@ type
G_USERDEF: ( user_blk: PUSERBLK );
G_BUTTON,
G_STRING,
G_TITLE: ( free_string: Pchar );
G_TITLE: ( free_string: PAnsiChar );
G_ICON: ( icon_blk: PICONBLK );
G_CICON: ( cicon_blk: PCICONBLK );
@ -788,10 +788,10 @@ type
{* shel_write alternative structure for sh_wpcmd parameter *}
PSHELW = ^TSHELW;
TSHELW = record
newcmd: Pchar;
newcmd: PAnsiChar;
psetlimit: longint;
prenice: longint;
defdir: pchar;
defdir: PAnsiChar;
env: pointer;
case boolean of
false: (uid, gid: smallint;);

View File

@ -320,7 +320,7 @@ procedure WindSetNewDesk(tree: PAESTree; firstObj: smallint);
implementation
type
aesstr = array[0..255] of char;
aesstr = array[0..255] of AnsiChar;
function string_to_vdi(const src: String; dst: psmallint): smallint;
@ -534,7 +534,7 @@ end;
procedure SetFreeString(tree: PAESTree; obj: smallint; const str: String);
var len: SizeInt;
p: pchar;
p: PAnsiChar;
begin
len:=length(str);
p:=tree^[obj].ob_spec.free_string;
@ -549,7 +549,7 @@ end;
procedure SetPtext(tree: PAESTree; obj: smallint; const str: String);
var len: SizeInt;
p: pchar;
p: PAnsiChar;
begin
len:=length(str);
p:=tree^[obj].ob_spec.ted_info^.te_ptext;
@ -566,7 +566,7 @@ end;
procedure SetPtmplt(tree: PAESTree; obj: smallint; const str: String);
var len: SizeInt;
p: pchar;
p: PAnsiChar;
begin
len:=length(str);
p:=tree^[obj].ob_spec.ted_info^.te_ptmplt;
@ -583,7 +583,7 @@ end;
procedure SetPvalid(tree: PAESTree; obj: smallint; const str: String);
var len: SizeInt;
p: pchar;
p: PAnsiChar;
begin
len:=length(str);
p:=tree^[obj].ob_spec.ted_info^.te_pvalid;
@ -598,7 +598,7 @@ end;
procedure SetIcontext(tree: PAESTree; obj: smallint; const str: String);
var len: SizeInt;
p: pchar;
p: PAnsiChar;
begin
len:=length(str);
p:=tree^[obj].ob_spec.icon_blk^.ib_ptext;
@ -613,7 +613,7 @@ end;
procedure WindSetTitle(handle: smallint; const str: String; var buf: String);
var len: SizeInt;
pstr: Pchar;
pstr: PAnsiChar;
begin
pstr := @buf[0];
len:=length(str);
@ -624,7 +624,7 @@ end;
procedure WindSetInfo(handle: smallint; const str: String; var buf: String);
var len: SizeInt;
pstr: Pchar;
pstr: PAnsiChar;
begin
pstr := @buf[0];
len:=length(str);

View File

@ -140,7 +140,7 @@ type
d_time: word; {* Time *}
d_date: word; {* Date *}
d_length: dword; {* File length *}
d_fname: array[0..13] of char; {* Filename *}
d_fname: array[0..13] of AnsiChar; {* Filename *}
end;
type
@ -176,9 +176,9 @@ type
p_parent: PPD; {* Pointer to the basepage of the *}
{* calling processes *}
p_resrvd0: longint; {* Reserved *}
p_env: pchar; {* Address of the environment string *}
p_resrvd1: array[0..79] of char; {* Reserved *}
p_cmdlin: array[0..127] of char; {* Command line *}
p_env: PAnsiChar; {* Address of the environment string *}
p_resrvd1: array[0..79] of AnsiChar; {* Reserved *}
p_cmdlin: array[0..127] of AnsiChar; {* Command line *}
end;
TBASEPAGE = TPD; {* alias types... *}
PBASEPAGE = ^TBASEPAGE;
@ -201,7 +201,7 @@ function gemdos_cprnout(c: smallint): longint; syscall 1 5;
function gemdos_crawio(c: smallint): longint; syscall 1 6;
function gemdos_crawin: longint; syscall 1 7;
function gemdos_cnecin: longint; syscall 1 8;
procedure gemdos_cconws(p: pchar); syscall 1 9;
procedure gemdos_cconws(p: PAnsiChar); syscall 1 9;
function gemdos_cconrs(buf: PLINE): longint; syscall 1 10;
function gemdos_cconis: longint; syscall 1 11;
@ -231,31 +231,31 @@ function gemdos_sconfig(mode: smallint; flags: longint): longint; syscall 1 51;
function gemdos_dfree(var buf: TDISKINFO; driveno: smallint): smallint; syscall 1 54;
function gemdos_dcreate(const path: pchar): longint; syscall 1 57;
function gemdos_ddelete(const path: pchar): longint; syscall 1 58;
function gemdos_dsetpath(const path: pchar): smallint; syscall 1 59;
function gemdos_fcreate(const fname: pchar; attr: smallint): smallint; syscall 1 60;
function gemdos_fopen(const fname: pchar; mode: smallint): longint; syscall 1 61;
function gemdos_dcreate(const path: PAnsiChar): longint; syscall 1 57;
function gemdos_ddelete(const path: PAnsiChar): longint; syscall 1 58;
function gemdos_dsetpath(const path: PAnsiChar): smallint; syscall 1 59;
function gemdos_fcreate(const fname: PAnsiChar; attr: smallint): smallint; syscall 1 60;
function gemdos_fopen(const fname: PAnsiChar; mode: smallint): longint; syscall 1 61;
function gemdos_fclose(handle: smallint): smallint; syscall 1 62;
function gemdos_fread(handle: smallint; count: longint; buf: pointer): longint; syscall 1 63;
function gemdos_fwrite(handle: smallint; count: longint; buf: pointer): longint; syscall 1 64;
function gemdos_fdelete(const fname: pchar): smallint; syscall 1 65;
function gemdos_fdelete(const fname: PAnsiChar): smallint; syscall 1 65;
function gemdos_fseek(offset: longint; handle: smallint; seekmode: smallint): longint; syscall 1 66;
function gemdos_fattrib(const filename: pchar; wflag: smallint; attrib: smallint): smallint; syscall 1 67;
function gemdos_fattrib(const filename: PAnsiChar; wflag: smallint; attrib: smallint): smallint; syscall 1 67;
function gemdos_mxalloc(amount: longint; mode: smallint): pointer; syscall 1 68;
function gemdos_fdup(handle: smallint): smallint; syscall 1 69;
function gemdos_fforce(stdh: smallint; nonstdh: smallint): smallint; syscall 1 70;
function gemdos_dgetpath(path: pchar; driveno: smallint): smallint; syscall 1 71;
function gemdos_dgetpath(path: PAnsiChar; driveno: smallint): smallint; syscall 1 71;
function gemdos_malloc(number: dword): pointer; syscall 1 72;
function gemdos_mfree(block: pointer): dword; syscall 1 73;
function gemdos_mshrink(zero: word; block: pointer; newsiz: longint): longint; syscall 1 74;
function gemdos_pexec(mode: word; name: pchar; cmdline: pchar; env: pchar): longint; syscall 1 75;
function gemdos_pexec(mode: word; name: PAnsiChar; cmdline: PAnsiChar; env: PAnsiChar): longint; syscall 1 75;
procedure gemdos_pterm(returncode: smallint); syscall 1 76;
function gemdos_fsfirst(const filename: pchar; attr: smallint): longint; syscall 1 78;
function gemdos_fsfirst(const filename: PAnsiChar; attr: smallint): longint; syscall 1 78;
function gemdos_fsnext: smallint; syscall 1 79;
function gemdos_frename(zero: word; const oldname: pchar; const newname: pchar): longint; syscall 1 86;
function gemdos_frename(zero: word; const oldname: PAnsiChar; const newname: PAnsiChar): longint; syscall 1 86;
procedure gemdos_fdatime(timeptr: PDOSTIME; handle: smallint; wflag: smallint); syscall 1 87;
function gemdos_Flock(handle, mode: smallint; start, length: LongInt): LongInt; syscall 1 92;
@ -337,21 +337,21 @@ function gemdos_Talarm(secs: LongInt): LongInt; syscall 1 288;
procedure gemdos_Pause; syscall 1 289;
function gemdos_Sysconf(n: smallint): LongInt; syscall 1 290;
function gemdos_Psigpending: LongInt; syscall 1 291;
function gemdos_Dpathconf(const name: PChar; n: smallint): LongInt; syscall 1 292;
function gemdos_Dpathconf(const name: PAnsiChar; n: smallint): LongInt; syscall 1 292;
function gemdos_Pmsg(mode: smallint; mbox: LongInt; var msg: TMSGTYPE): LongInt; syscall 1 293;
function gemdos_Fmidipipe(pid, inp, outp: smallint): LongInt; syscall 1 294;
function gemdos_Prenice(pid, delta: smallint): smallint; syscall 1 295;
function gemdos_Dopendir(const name: PChar; flag: smallint): LongInt; syscall 1 296;
function gemdos_Dreaddir(buflen: smallint; dir: LongInt; buf: Pchar): LongInt; syscall 1 297;
function gemdos_Dopendir(const name: PAnsiChar; flag: smallint): LongInt; syscall 1 296;
function gemdos_Dreaddir(buflen: smallint; dir: LongInt; buf: PAnsiChar): LongInt; syscall 1 297;
function gemdos_Drewinddir(dir: LongInt): LongInt; syscall 1 298;
function gemdos_Dclosedir(dir: LongInt): LongInt; syscall 1 299;
function gemdos_Fxattr(flag: smallint; const name: Pchar; var buf: TXATTR): LongInt; syscall 1 300;
function gemdos_Flink(const oldname: PChar; const newname: Pchar): LongInt; syscall 1 301;
function gemdos_Fsymlink(const oldname: PChar; const newname: Pchar): LongInt; syscall 1 302;
function gemdos_Freadlink(size: smallint; buf: Pchar; const name: Pchar): LongInt; syscall 1 303;
function gemdos_Dcntl(cmd: smallint; const name: pchar; arg: LongInt): LongInt; syscall 1 304;
function gemdos_Fchown(const name: Pchar; uid, gid: smallint): LongInt; syscall 1 305;
function gemdos_Fchmod(const name: Pchar; mode: smallint): LongInt; syscall 1 306;
function gemdos_Fxattr(flag: smallint; const name: PAnsiChar; var buf: TXATTR): LongInt; syscall 1 300;
function gemdos_Flink(const oldname: PAnsiChar; const newname: PAnsiChar): LongInt; syscall 1 301;
function gemdos_Fsymlink(const oldname: PAnsiChar; const newname: PAnsiChar): LongInt; syscall 1 302;
function gemdos_Freadlink(size: smallint; buf: PAnsiChar; const name: PAnsiChar): LongInt; syscall 1 303;
function gemdos_Dcntl(cmd: smallint; const name: PAnsiChar; arg: LongInt): LongInt; syscall 1 304;
function gemdos_Fchown(const name: PAnsiChar; uid, gid: smallint): LongInt; syscall 1 305;
function gemdos_Fchmod(const name: PAnsiChar; mode: smallint): LongInt; syscall 1 306;
function gemdos_Pumask(mode: Word): LongInt; syscall 1 307;
function gemdos_Psemaphore(mode: smallint; id, timeout: LongInt): LongInt; syscall 1 308;
function gemdos_Dlock(mode, drive: smallint): LongInt; syscall 1 309;
@ -360,8 +360,8 @@ function gemdos_Psigaction(sig: smallint; act, oact: PSIGACTION): LongInt; sysca
function gemdos_Pgeteuid: smallint; syscall 1 312;
function gemdos_Pgetegid: smallint; syscall 1 313;
function gemdos_Pwaitpid(pid, flag: smallint; var rusage: ARRAY of LongInt): LongInt; syscall 1 314;
function gemdos_Dgetcwd(path: Pchar; drv, size: smallint): LongInt; syscall 1 315;
procedure gemdos_Salert(str: Pchar); syscall 1 316;
function gemdos_Dgetcwd(path: PAnsiChar; drv, size: smallint): LongInt; syscall 1 315;
procedure gemdos_Salert(str: PAnsiChar); syscall 1 316;
function gemdos_Tmalarm(time: longint): LongInt; syscall 1 317;
{ function gemdos_Psigintr(vec, sig: smallint): LongInt; syscall 1 318; }
function gemdos_Suptime(var uptime: longint; var loadaverage: longint): LongInt; syscall 1 319;

View File

@ -31,14 +31,14 @@ type
PMETAINFO = ^TMETAINFO;
TMETAINFO = record
drivemap: LongInt;
version: Pchar;
version: PAnsiChar;
reserved: LongInt;
info: PMETAINFO2; {* Available from MetaDOS version 2.30 *}
end;
PMETA_DRVINFO = ^TMETA_DRVINFO;
TMETA_DRVINFO = record
name: PChar;
name: PAnsiChar;
reserved: array[0..2] of LongInt;
end;

View File

@ -25,33 +25,33 @@ unit NF_OPS;
interface
const
NF_ID_NAME : pchar = 'NF_NAME';
NF_ID_VERSION : pchar = 'NF_VERSION';
NF_ID_STDERR : pchar = 'NF_STDERR';
NF_ID_SHUTDOWN : pchar = 'NF_SHUTDOWN';
NF_ID_EXIT : pchar = 'NF_EXIT';
NF_ID_DEBUG : pchar = 'DEBUGPRINTF';
NF_ID_ETHERNET : pchar = 'ETHERNET';
NF_ID_HOSTFS : pchar = 'HOSTFS';
NF_ID_AUDIO : pchar = 'AUDIO';
NF_ID_BOOTSTRAP : pchar = 'BOOTSTRAP';
NF_ID_CDROM : pchar = 'CDROM';
NF_ID_CLIPBRD : pchar = 'CLIPBRD';
NF_ID_JPEG : pchar = 'JPEG';
NF_ID_OSMESA : pchar = 'OSMESA';
NF_ID_PCI : pchar = 'PCI';
NF_ID_FVDI : pchar = 'fVDI';
NF_ID_USBHOST : pchar = 'USBHOST';
NF_ID_XHDI : pchar = 'XHDI';
NF_ID_SCSI : pchar = 'NF_SCSIDRV';
NF_ID_HOSTEXEC : pchar = 'HOSTEXEC';
NF_ID_CONFIG : pchar = 'NF_CONFIG';
NF_ID_NAME : PAnsiChar = 'NF_NAME';
NF_ID_VERSION : PAnsiChar = 'NF_VERSION';
NF_ID_STDERR : PAnsiChar = 'NF_STDERR';
NF_ID_SHUTDOWN : PAnsiChar = 'NF_SHUTDOWN';
NF_ID_EXIT : PAnsiChar = 'NF_EXIT';
NF_ID_DEBUG : PAnsiChar = 'DEBUGPRINTF';
NF_ID_ETHERNET : PAnsiChar = 'ETHERNET';
NF_ID_HOSTFS : PAnsiChar = 'HOSTFS';
NF_ID_AUDIO : PAnsiChar = 'AUDIO';
NF_ID_BOOTSTRAP : PAnsiChar = 'BOOTSTRAP';
NF_ID_CDROM : PAnsiChar = 'CDROM';
NF_ID_CLIPBRD : PAnsiChar = 'CLIPBRD';
NF_ID_JPEG : PAnsiChar = 'JPEG';
NF_ID_OSMESA : PAnsiChar = 'OSMESA';
NF_ID_PCI : PAnsiChar = 'PCI';
NF_ID_FVDI : PAnsiChar = 'fVDI';
NF_ID_USBHOST : PAnsiChar = 'USBHOST';
NF_ID_XHDI : PAnsiChar = 'XHDI';
NF_ID_SCSI : PAnsiChar = 'NF_SCSIDRV';
NF_ID_HOSTEXEC : PAnsiChar = 'HOSTEXEC';
NF_ID_CONFIG : PAnsiChar = 'NF_CONFIG';
(*
* return the NF id to use for feature_name,
* or zero when not available.
*)
function nf_get_id(feature_name: pchar): longint;
function nf_get_id(feature_name: PAnsiChar): longint;
(*
* return the version of the NatFeat implementation,
@ -63,13 +63,13 @@ function nf_version: longint;
* return the name of the NatFeat implementor,
* or NULL when not available.
*)
procedure nf_get_name(buf: Pchar; bufsize: longint);
procedure nf_get_name(buf: PAnsiChar; bufsize: longint);
(*
* return the full name of the NatFeat implementor,
* or NULL when not available.
*)
procedure nf_get_fullname(buf: Pchar; bufsize: longint);
procedure nf_get_fullname(buf: PAnsiChar; bufsize: longint);
(*
* Write a string to the host's terminal.
@ -105,17 +105,17 @@ var
nf_stderr: longint;
type
Tnf_id = function(id: Pchar): longint; cdecl;
Tnf_id = function(id: PAnsiChar): longint; cdecl;
Tnf_call = function(id: longint): longint; cdecl; varargs;
var cnf_call: Tnf_call;
var ps: array[0..255] of char;
var ps: array[0..255] of AnsiChar;
const nf_id_opcodes: array[0..1] of word = (NATFEAT_ID, $4e75);
nf_call_opcodes: array[0..1] of word = (NATFEAT_CALL, $4e75);
function nf_id(id: Pchar): longint;
function nf_id(id: PAnsiChar): longint;
var cnf_id: Tnf_id;
begin
cnf_id := Tnf_id(@nf_id_opcodes);
@ -123,7 +123,7 @@ begin
end;
const nf_version_str: array[0..11] of char = 'NF_VERSION';
const nf_version_str: array[0..11] of AnsiChar = 'NF_VERSION';
function nf_detect: longint; assembler; nostackframe;
asm
@ -175,7 +175,7 @@ begin
end;
function nf_get_id(feature_name: pchar): longint;
function nf_get_id(feature_name: PAnsiChar): longint;
begin
nf_get_id := 0;
if nf_init then
@ -191,7 +191,7 @@ begin
nf_version := cnf_call(id);
end;
procedure nf_get_name(buf: Pchar; bufsize: longint);
procedure nf_get_name(buf: PAnsiChar; bufsize: longint);
var id: longint;
begin
id := nf_get_id(NF_ID_NAME);
@ -201,7 +201,7 @@ begin
buf^ := #0;
end;
procedure nf_get_fullname(buf: Pchar; bufsize: longint);
procedure nf_get_fullname(buf: PAnsiChar; bufsize: longint);
var id: longint;
begin
id := nf_get_id(NF_ID_NAME);

View File

@ -75,7 +75,7 @@ type
DSPBLOCK = TDSPBLOCK;
DSPBLOCKPtr = ^DSPBLOCK;
{* same as TDTA in gemdos; except that d_fname is String *}
{* same as TDTA in gemdos; except that d_fname is shortstring *}
DTAPtr = ^DTA;
DTA = record
d_reserved : Array[1..21] of Byte;
@ -83,7 +83,7 @@ type
d_time : word;
d_date : word;
d_length : LongInt;
d_fname : String[12];
d_fname : string[12];
end;
LongIntFunc = xbios.TLongIntFunc;
@ -191,10 +191,10 @@ function Dsp_Lock: smallint; syscall 14 104;
procedure Dsp_Unlock; syscall 14 105;
procedure Dsp_Available(out xavailable, yavailable: LongInt); syscall 14 106;
function Dsp_Reserve(xreserve, yreserve: LongInt): smallint; syscall 14 107;
function Dsp_LoadProg(const filename: String; ability: smallint; buffer: Pointer): smallint;
function Dsp_LoadProg(const filename: shortstring; ability: smallint; buffer: Pointer): smallint;
procedure Dsp_ExecProg(codeptr: Pointer; codesize: LongInt; ability: smallint); syscall 14 109;
procedure Dsp_ExecBoot(codeptr: Pointer; codesize: LongInt; ability: smallint); syscall 14 110;
function Dsp_LodToBinary(const filename: String; codeptr: Pointer): LongInt;
function Dsp_LodToBinary(const filename: shortstring; codeptr: Pointer): LongInt;
procedure Dsp_TriggerHC(vector: smallint); syscall 14 112;
function Dsp_RequestUniqueAbility: smallint; syscall 14 113;
function Dsp_GetProgAbility: smallint; syscall 14 114;
@ -252,7 +252,7 @@ function cprnout(c: smallint): longint; syscall 1 5;
function crawio(c: smallint): longint; syscall 1 6;
function crawin: longint; syscall 1 7;
function cnecin: longint; syscall 1 8;
procedure cconws(const str: String);
procedure cconws(const str: shortstring);
function cconrs(buf: PLINE): longint; syscall 1 10;
function cconis: longint; syscall 1 11;
@ -282,32 +282,32 @@ function sconfig(mode: smallint; flags: longint): longint; syscall 1 51;
function dfree(out buf: TDISKINFO; driveno: smallint): smallint; syscall 1 54;
function dcreate(const path: String): longint;
function ddelete(const path: String): longint;
function dsetpath(const path: String): smallint;
function fcreate(const fname: String; attr: smallint): smallint;
function fopen(const fname: String; mode: smallint): longint;
function dcreate(const path: shortstring): longint;
function ddelete(const path: shortstring): longint;
function dsetpath(const path: shortstring): smallint;
function fcreate(const fname: shortstring; attr: smallint): smallint;
function fopen(const fname: shortstring; mode: smallint): longint;
function fclose(handle: smallint): smallint; syscall 1 62;
function fread(handle: smallint; count: longint; buf: pointer): longint; syscall 1 63;
function fwrite(handle: smallint; count: longint; buf: pointer): longint; syscall 1 64;
function fdelete(const fname: String): smallint;
function fdelete(const fname: shortstring): smallint;
function fseek(offset: longint; handle: smallint; seekmode: smallint): longint; syscall 1 66;
function fattrib(const filename: String; wflag: smallint; attrib: smallint): smallint;
function fattrib(const filename: shortstring; wflag: smallint; attrib: smallint): smallint;
function mxalloc(amount: longint; mode: smallint): pointer; syscall 1 68;
function fdup(handle: smallint): smallint; syscall 1 69;
function fforce(stdh: smallint; nonstdh: smallint): smallint; syscall 1 70;
function dgetpath(out path: String; driveno: smallint): smallint;
function dgetpath(out path: shortstring; driveno: smallint): smallint;
function malloc(number: dword): pointer; syscall 1 72;
function free(block: pointer): dword; syscall 1 73;
function mfree(block: pointer): dword; syscall 1 73;
function mshrink(zero: word; block: pointer; newsiz: longint): longint; syscall 1 74;
function pexec(mode: word; const name: String; cmdline: String; env: pchar): longint;
function pexec(mode: word; const name: shortstring; cmdline: shortstring; env: PAnsiChar): longint;
procedure pterm(returncode: smallint); syscall 1 76;
function fsfirst(const filename: String; attr: smallint): longint;
function fsfirst(const filename: shortstring; attr: smallint): longint;
function fsnext: smallint;
function frename(const oldname, newname: String): longint;
function frename(const oldname, newname: shortstring): longint;
procedure fdatime(timeptr: PDOSTIME; handle: smallint; wflag: smallint); syscall 1 87;
function Flock(handle, mode: smallint; start, length: LongInt): LongInt; syscall 1 92;
@ -349,21 +349,21 @@ function Talarm(secs: LongInt): LongInt; syscall 1 288;
procedure Pause; syscall 1 289;
function Sysconf(n: smallint): LongInt; syscall 1 290;
function Psigpending: LongInt; syscall 1 291;
function Dpathconf(const name: String; n: smallint): LongInt;
function Dpathconf(const name: shortstring; n: smallint): LongInt;
function Pmsg(mode: smallint; mbox: LongInt; var msg: TMSGTYPE): LongInt; syscall 1 293;
function Fmidipipe(pid, inp, outp: smallint): LongInt; syscall 1 294;
function Prenice(pid, delta: smallint): smallint; syscall 1 295;
function Dopendir(const name: String; flag: smallint): LongInt;
function Dreaddir(buflen: smallint; dir: LongInt; out buf: String): LongInt;
function Dopendir(const name: shortstring; flag: smallint): LongInt;
function Dreaddir(buflen: smallint; dir: LongInt; out buf: shortstring): LongInt;
function Drewinddir(dir: LongInt): LongInt; syscall 1 298;
function Dclosedir(dir: LongInt): LongInt; syscall 1 299;
function Fxattr(flag: smallint; const name: String; out buf: TXATTR): LongInt;
function Flink(const oldname: String; const newname: String): LongInt;
function Fsymlink(const oldname: String; const newname: String): LongInt;
function Freadlink(size: smallint; out buf: String; const name: String): LongInt;
function Dcntl(cmd: smallint; const name: String; arg: LongInt): LongInt;
function Fchown(const name: String; uid, gid: smallint): LongInt;
function Fchmod(const name: String; mode: smallint): LongInt;
function Fxattr(flag: smallint; const name: shortstring; out buf: TXATTR): LongInt;
function Flink(const oldname: shortstring; const newname: shortstring): LongInt;
function Fsymlink(const oldname: shortstring; const newname: shortstring): LongInt;
function Freadlink(size: smallint; out buf: shortstring; const name: shortstring): LongInt;
function Dcntl(cmd: smallint; const name: shortstring; arg: LongInt): LongInt;
function Fchown(const name: shortstring; uid, gid: smallint): LongInt;
function Fchmod(const name: shortstring; mode: smallint): LongInt;
function Pumask(mode: Word): LongInt; syscall 1 307;
function Psemaphore(mode: smallint; id, timeout: LongInt): LongInt; syscall 1 308;
function Dlock(mode, drive: smallint): LongInt; syscall 1 309;
@ -372,8 +372,8 @@ function Psigaction(sig: smallint; act, oact: PSIGACTION): LongInt; syscall 1 31
function Pgeteuid: smallint; syscall 1 312;
function Pgetegid: smallint; syscall 1 313;
function Pwaitpid(pid, flag: smallint; out rusage: ARRAY of LongInt): LongInt; syscall 1 314;
function Dgetcwd(path: Pchar; drv, size: smallint): LongInt; syscall 1 315;
procedure Salert(str: Pchar); syscall 1 316;
function Dgetcwd(path: PAnsiChar; drv, size: smallint): LongInt; syscall 1 315;
procedure Salert(str: PAnsiChar); syscall 1 316;
function Tmalarm(time: longint): LongInt; syscall 1 317;
{ function Psigintr(vec, sig: smallint): LongInt; syscall 1 318; }
function Suptime(out uptime: longint; out loadaverage: longint): LongInt; syscall 1 319;
@ -385,203 +385,203 @@ function Suptime(out uptime: longint; out loadaverage: longint): LongInt; syscal
implementation
function Dsp_LoadProg(const filename: String; ability: smallint; buffer: Pointer): smallint;
var s: array[0..255] of char;
function Dsp_LoadProg(const filename: shortstring; ability: smallint; buffer: Pointer): smallint;
var s: array[0..255] of AnsiChar;
begin
s := filename;
Dsp_LoadProg := xbios_Dsp_LoadProg(s, ability, buffer);
end;
function Dsp_LodToBinary(const filename: String; codeptr: Pointer): LongInt;
var s: array[0..255] of char;
function Dsp_LodToBinary(const filename: shortstring; codeptr: Pointer): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := filename;
Dsp_LodToBinary := xbios_Dsp_LodToBinary(s, codeptr);
end;
procedure cconws(const str: String);
var s: array[0..255] of char;
procedure cconws(const str: shortstring);
var s: array[0..255] of AnsiChar;
begin
s := str;
gemdos_cconws(s);
end;
function pexec(mode: word; const name: String; cmdline: String; env: pchar): longint;
var s: array[0..255] of char;
function pexec(mode: word; const name: shortstring; cmdline: shortstring; env: PAnsiChar): longint;
var s: array[0..255] of AnsiChar;
begin
s := name;
pexec := gemdos_pexec(mode, s, @cmdline[0], env);
end;
function fsfirst(const filename: String; attr: smallint): longint;
var s: array[0..255] of char;
function fsfirst(const filename: shortstring; attr: smallint): longint;
var s: array[0..255] of AnsiChar;
dta: DTAPtr;
temp: String[12];
temp: string[12];
begin
s := filename;
fsfirst := gemdos_fsfirst(s, attr);
if (fsfirst = 0) then
begin
dta := Fgetdta;
temp := PChar(@dta^.d_fname[0]);
temp := PAnsiChar(@dta^.d_fname[0]);
dta^.d_fname := temp;
end;
end;
function fsnext: smallint;
var dta: DTAPtr;
temp: String[12];
temp: string[12];
begin
fsnext := gemdos_fsnext;
if (fsnext = 0) then
begin
dta := Fgetdta;
temp := PChar(@dta^.d_fname[0]);
temp := PAnsiChar(@dta^.d_fname[0]);
dta^.d_fname := temp;
end;
end;
function frename(const oldname, newname: String): longint;
var s1: array[0..255] of char;
s2: array[0..255] of char;
function frename(const oldname, newname: shortstring): longint;
var s1: array[0..255] of AnsiChar;
s2: array[0..255] of AnsiChar;
begin
s1 := oldname;
s2 := newname;
frename := gemdos_frename(0, s1, s2);
end;
function fopen(const fname: String; mode: smallint): longint;
var s: array[0..255] of char;
function fopen(const fname: shortstring; mode: smallint): longint;
var s: array[0..255] of AnsiChar;
begin
s := fname;
fopen := gemdos_fopen(s, mode);
end;
function fdelete(const fname: String): smallint;
var s: array[0..255] of char;
function fdelete(const fname: shortstring): smallint;
var s: array[0..255] of AnsiChar;
begin
s := fname;
fdelete := gemdos_fdelete(s);
end;
function fcreate(const fname: String; attr: smallint): smallint;
var s: array[0..255] of char;
function fcreate(const fname: shortstring; attr: smallint): smallint;
var s: array[0..255] of AnsiChar;
begin
s := fname;
fcreate := gemdos_fcreate(s, attr);
end;
function fattrib(const filename: String; wflag: smallint; attrib: smallint): smallint;
var s: array[0..255] of char;
function fattrib(const filename: shortstring; wflag: smallint; attrib: smallint): smallint;
var s: array[0..255] of AnsiChar;
begin
s := filename;
fattrib := gemdos_fattrib(s, wflag, attrib);
end;
function dsetpath(const path: String): smallint;
var s: array[0..255] of char;
function dsetpath(const path: shortstring): smallint;
var s: array[0..255] of AnsiChar;
begin
s := path;
dsetpath := gemdos_dsetpath(s);
end;
function dgetpath(out path: String; driveno: smallint): smallint;
var s: array[0..255] of char;
function dgetpath(out path: shortstring; driveno: smallint): smallint;
var s: array[0..255] of AnsiChar;
begin
Dgetpath := gemdos_dgetpath(s, driveno);
if (Dgetpath = 0) then
path := PChar(@s[0]);
path := PAnsiChar(@s[0]);
end;
function ddelete(const path: String): longint;
var s: array[0..255] of char;
function ddelete(const path: shortstring): longint;
var s: array[0..255] of AnsiChar;
begin
s := path;
Ddelete := gemdos_ddelete(s);
end;
function dcreate(const path: String): longint;
var s: array[0..255] of char;
function dcreate(const path: shortstring): longint;
var s: array[0..255] of AnsiChar;
begin
s := path;
Dcreate := gemdos_dcreate(s);
end;
function Dpathconf(const name: String; n: smallint): LongInt;
var s: array[0..255] of char;
function Dpathconf(const name: shortstring; n: smallint): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Dpathconf := gemdos_dpathconf(s, n);
end;
function Dopendir(const name: String; flag: smallint): LongInt;
var s: array[0..255] of char;
function Dopendir(const name: shortstring; flag: smallint): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Dopendir := gemdos_dopendir(s, flag);
end;
function Dreaddir(buflen: smallint; dir: LongInt; out buf: String): LongInt;
var s: array[0..255] of char;
function Dreaddir(buflen: smallint; dir: LongInt; out buf: shortstring): LongInt;
var s: array[0..255] of AnsiChar;
begin
Dreaddir := gemdos_dreaddir(buflen, dir, s);
if (dreaddir = 0) then
buf := PChar(@s[0]);
buf := PAnsiChar(@s[0]);
end;
function Fxattr(flag: smallint; const name: String; out buf: TXATTR): LongInt;
var s: array[0..255] of char;
function Fxattr(flag: smallint; const name: shortstring; out buf: TXATTR): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Fxattr := gemdos_fxattr(flag, s, buf);
end;
function Flink(const oldname: String; const newname: String): LongInt;
var s1: array[0..255] of char;
s2: array[0..255] of char;
function Flink(const oldname: shortstring; const newname: shortstring): LongInt;
var s1: array[0..255] of AnsiChar;
s2: array[0..255] of AnsiChar;
begin
s1 := oldname;
s2 := newname;
flink := gemdos_flink(s1, s2);
end;
function Fsymlink(const oldname: String; const newname: String): LongInt;
var s1: array[0..255] of char;
s2: array[0..255] of char;
function Fsymlink(const oldname: shortstring; const newname: shortstring): LongInt;
var s1: array[0..255] of AnsiChar;
s2: array[0..255] of AnsiChar;
begin
s1:=oldname;
s2:=newname;
fsymlink := gemdos_fsymlink(s1, s2);
end;
function Freadlink(size: smallint; out buf: String; const name: String): LongInt;
var s1: array[0..255] of char;
s2: array[0..255] of char;
function Freadlink(size: smallint; out buf: shortstring; const name: shortstring): LongInt;
var s1: array[0..255] of AnsiChar;
s2: array[0..255] of AnsiChar;
begin
s1 := name;
if (size > 256) then
size := 256;
freadlink := gemdos_freadlink(256, s2, s1);
if (freadlink = 0) then
buf := PChar(@s2[0]);
buf := PAnsiChar(@s2[0]);
end;
function Dcntl(cmd: smallint; const name: String; arg: LongInt): LongInt;
var s: array[0..255] of char;
function Dcntl(cmd: smallint; const name: shortstring; arg: LongInt): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Dcntl := gemdos_dcntl(cmd, s, arg);
end;
function Fchown(const name: String; uid, gid: smallint): LongInt;
var s: array[0..255] of char;
function Fchown(const name: shortstring; uid, gid: smallint): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Fchown := gemdos_fchown(s, uid, gid);
end;
function Fchmod(const name: String; mode: smallint): LongInt;
var s: array[0..255] of char;
function Fchmod(const name: shortstring; mode: smallint): LongInt;
var s: array[0..255] of AnsiChar;
begin
s := name;
Fchmod := gemdos_fchmod(s, mode);

View File

@ -38,8 +38,8 @@ procedure vdi(pb: PVDIPB);
function vq_gdos: smallint;
function vq_vgdos: LongInt;
procedure vdi_str_to_pchar(src: psmallint; des: pchar; len: smallint);
function pchar_str_to_vdi(src: pchar; des: psmallint): longint;
procedure vdi_str_to_pchar(src: psmallint; des: PAnsiChar; len: smallint);
function pchar_str_to_vdi(src: PAnsiChar; des: psmallint): longint;
procedure v_opnwk(work_in: psmallint; handle: psmallint; work_out: psmallint);
procedure v_clswk(handle: smallint);
@ -57,7 +57,7 @@ procedure v_curhome(handle: smallint);
procedure v_eeos(handle: smallint);
procedure v_eeol(handle: smallint);
procedure v_curaddress(handle, row, column: smallint);
procedure v_curtext(handle: smallint; const outString: String);
procedure v_curtext(handle: smallint; const outstring: shortstring);
procedure v_rvon(handle: smallint);
procedure v_rvoff(handle: smallint);
procedure vq_curaddress(handle: smallint; out row, column: smallint);
@ -68,11 +68,11 @@ procedure v_rmcur(handle: smallint);
procedure v_form_adv(handle: smallint);
procedure v_output_window(handle: smallint; xyarray: ARRAY_4);
procedure v_clear_disp_list(handle: smallint);
procedure v_bit_image(handle: smallint; const filename: string;
procedure v_bit_image(handle: smallint; const filename: shortstring;
aspect, x_scale, y_scale, h_align, v_align: smallint;
const xyarray: ARRAY_4);
procedure vq_scan(handle: smallint; out g_slice, g_page, a_slice, a_page, div_fac: smallint);
procedure v_alpha_text(handle: smallint; const outString: String);
procedure v_alpha_text(handle: smallint; const outstring: shortstring);
function v_orient(handle, orientation: smallint): smallint;
function v_copies(handle, count: smallint): smallint;
procedure v_tray(handle, tray: smallint);
@ -88,7 +88,7 @@ procedure vt_origin(handle, xorigin, yorigin: smallint);
procedure vq_tdimensions(handle: smallint; out xdimension, ydimension: smallint);
procedure vt_alignment(handle, dx, dy: smallint);
procedure vsp_film(handle, index, lightness: smallint);
function vqp_filmname(handle, index: smallint; out name: String): smallint;
function vqp_filmname(handle, index: smallint; out name: shortstring): smallint;
procedure vsc_expose(handle, state: smallint);
procedure v_meta_extents(handle, min_x, min_y, max_x, max_y: smallint);
procedure v_write_meta(handle, num_intin: smallint; a_intin: Pointer;
@ -96,7 +96,7 @@ procedure v_write_meta(handle, num_intin: smallint; a_intin: Pointer;
procedure vm_pagesize(handle, pgwidth, pgheight: smallint);
procedure vm_coords(handle, llx, lly, urx, ury: smallint);
function v_bez_qual(handle, prcnt: smallint; out actual: smallint): smallint;
procedure vm_filename(handle: smallint; const filename: String);
procedure vm_filename(handle: smallint; const filename: shortstring);
procedure v_offset(handle, offset: smallint);
procedure v_fontinit(handle: smallint; var fh: TFONT_HDR);
procedure v_escape2000(handle, times: smallint);
@ -112,8 +112,8 @@ procedure v_bez_fill(handle, count: smallint;
out totpts, totmoves: smallint);
procedure v_pmarker(handle, count: smallint; const pxyarray: Array of smallint);
procedure v_gtext(handle: smallint; x: smallint; y: smallint; outputstring: pchar);
procedure v_gtext(handle, x, y: smallint; const outputstring: string);
procedure v_gtext(handle: smallint; x: smallint; y: smallint; outputstring: PAnsiChar);
procedure v_gtext(handle, x, y: smallint; const outputstring: shortstring);
procedure v_fillarea(handle, count: smallint; const pxyarray: Array of smallint);
procedure v_bar(handle: smallint; pxyarray: psmallint);
@ -127,7 +127,7 @@ procedure v_ellpie(handle, x, y, xradius, yradius, begang, endang: smallint);
procedure v_rbox(handle: smallint; const xyarray: ARRAY_4);
procedure v_rfbox(handle: smallint; const xyarray: ARRAY_4);
procedure v_justified(handle, x, y: smallint;
const outputstring: string;
const outputstring: shortstring;
width, wordspace, charspace: smallint);
function v_bez_on(handle: smallint): smallint;
procedure v_bez_off(handle: smallint);
@ -154,8 +154,8 @@ procedure vrq_valuator(handle, valuator_in: smallint; out valuator_out, terminat
procedure vsm_valuator(handle, val_in: smallint; out val_out, term, status: smallint);
procedure vrq_choice(handle, ch_in: smallint; out ch_out: smallint);
function vsm_choice(handle: smallint; out choice: smallint): smallint;
procedure vrq_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resString: string);
function vsm_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resString: string): smallint;
procedure vrq_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resstring: shortstring);
function vsm_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resstring: shortstring): smallint;
function vst_color(handle: smallint; color_index: smallint): smallint;
function vsf_color(handle: smallint; color_index: smallint): smallint;
@ -191,7 +191,7 @@ procedure vsf_udpat(handle: smallint; pfill_pat: Pointer; planes: smallint);
procedure vsl_udsty(handle, pattern: smallint);
procedure vr_recfl(handle: smallint; const pxyarray: ARRAY_4);
procedure vqin_mode(handle, dev_type: smallint; out input_mode: smallint);
procedure vqt_extent(handle: smallint; calcString: pchar; extent: psmallint); overload;
procedure vqt_extent(handle: smallint; calcshortstring: PAnsiChar; extent: psmallint); overload;
function vqt_width(handle, character: smallint; out cell_width, left_delta, right_delta: smallint): smallint;
procedure vex_timv(handle: smallint; tim_addr: Pointer; out otim_addr: Pointer; out tim_conv: smallint);
@ -214,20 +214,20 @@ procedure vs_clip(handle: smallint; clip_flag: smallint; pxyarray: psmallint);
procedure vs_clip(handle, clip_flag: smallint; const pxyarray: ARRAY_4);
procedure vs_clip_off(handle: smallint);
function vqt_name(handle, element_num: smallint; out name: String33): smallint;
function vqt_name(handle, element_num: smallint; out name: string33): smallint;
procedure vqt_fontinfo(handle: smallint;
out minADE, maxADE: smallint;
out distances: ARRAY_5;
out maxwidth: smallint;
out effects: ARRAY_3);
procedure vqt_justified(handle, x, y: smallint; const outString: String;
procedure vqt_justified(handle, x, y: smallint; const outstring: shortstring;
length, word_space, char_space: smallint;
offsets: Pointer);
procedure vst_width(handle, width: smallint; out char_width, char_height, cell_width, cell_height: smallint);
procedure vqt_fontheader(handle: smallint; buffer: Pointer;
out pathname: String);
out pathname: shortstring);
procedure vqt_trackkern(handle: smallint; out x, y: fix31);
procedure vqt_pairkern(handle, ch1, ch2: smallint; out x, y: fix31);
procedure vst_charmap(handle, mode: smallint);
@ -239,9 +239,9 @@ procedure v_getbitmap_info(handle, ch: smallint;
out width, height: smallint;
out bitmap: pointer);
procedure v_ftext(handle, x, y: smallint; const str: String);
procedure v_ftext(handle, x, y: smallint; const str: shortstring);
procedure v_ftext_offset(handle, x, y: smallint;
const outputstring: string;
const outputstring: shortstring;
const offset: Array of smallint);
procedure v_killoutline(handle: smallint; component: Pointer);
procedure v_getoutline(handle, ch: smallint;
@ -259,15 +259,15 @@ procedure vqt_advance(handle, ch: smallint; out advx, advy, remx, remy: smallint
procedure vqt_advance32(handle, ch: smallint; out advx, advy: fix31);
function vq_devinfo(handle, devnum: smallint;
out devexists: smallint;
out filename: String;
out devicename: String): smallint;
out filename: shortstring;
out devicename: shortstring): smallint;
procedure vqt_devinfo(handle, devnum: smallint;
out dev_busy: smallint;
out filename: String;
out devicename: String);
out filename: shortstring;
out devicename: shortstring);
function v_savecache(handle: smallint; const filename: String): smallint;
function v_loadcache(handle: smallint; const filename: String; mode: smallint): smallint;
function v_savecache(handle: smallint; const filename: shortstring): smallint;
function v_loadcache(handle: smallint; const filename: shortstring; mode: smallint): smallint;
function v_flushcache(handle: smallint): smallint;
function vst_setsize(handle, point: smallint;
out chwd, chht, cellwd, cellht: smallint): smallint;
@ -405,7 +405,7 @@ const
ptsout: @_ptsout;
); public name 'vdipb';
function string_to_vdi(const src: String; dst: psmallint): smallint;
function string_to_vdi(const src: shortstring; dst: psmallint): smallint;
var
i, len: longint;
begin
@ -416,7 +416,7 @@ begin
string_to_vdi:=len;
end;
procedure vdi_to_string(src: psmallint; out dst: String; len: longint);
procedure vdi_to_string(src: psmallint; out dst: shortstring; len: longint);
var
i: longint;
begin
@ -463,19 +463,19 @@ asm
movea.l (a7)+,a2
end;
procedure vdi_str_to_pchar(src: psmallint; des: pchar; len: smallint);
procedure vdi_str_to_pchar(src: psmallint; des: PAnsiChar; len: smallint);
begin
while len > 0 do
begin
des[0]:=char(src[0]); {* Only low byte *}
des[0]:=AnsiChar(src[0]); {* Only low byte *}
inc(src);
inc(des);
dec(len);
end;
des[0]:=#0; {* End of string *}
des[0]:=#0; {* End of shortstring *}
end;
function pchar_str_to_vdi(src: pchar; des: psmallint): longint;
function pchar_str_to_vdi(src: PAnsiChar; des: psmallint): longint;
var
len: longint;
begin
@ -670,10 +670,10 @@ begin
vdi;
end;
procedure v_curtext(handle: smallint; const outString: String);
procedure v_curtext(handle: smallint; const outstring: shortstring);
var len: longint;
begin
len:=string_to_vdi(outString, @_intin[0]);
len:=string_to_vdi(outstring, @_intin[0]);
_contrl[0]:=5;
_contrl[1]:=0;
_contrl[3]:=len;
@ -804,7 +804,7 @@ begin
vdi;
end;
procedure v_bit_image(handle: smallint; const filename: string;
procedure v_bit_image(handle: smallint; const filename: shortstring;
aspect, x_scale, y_scale, h_align, v_align: smallint;
const xyarray: ARRAY_4);
var len: longint;
@ -845,10 +845,10 @@ begin
div_fac:=_intout[4];
end;
procedure v_alpha_text(handle: smallint; const outString: String);
procedure v_alpha_text(handle: smallint; const outstring: shortstring);
var len: longint;
begin
len:=string_to_vdi(outString, @_intin[0]);
len:=string_to_vdi(outstring, @_intin[0]);
_contrl[0]:=5;
_contrl[1]:=0;
_contrl[3]:=len;
@ -1052,7 +1052,7 @@ begin
vdi;
end;
function vqp_filmname(handle, index: smallint; out name: String): smallint;
function vqp_filmname(handle, index: smallint; out name: shortstring): smallint;
begin
_intin[0]:=index;
_contrl[0]:=5;
@ -1159,7 +1159,7 @@ begin
v_bez_qual:=_intout[0];
end;
procedure vm_filename(handle: smallint; const filename: String);
procedure vm_filename(handle: smallint; const filename: shortstring);
var len: longint;
begin
len:=string_to_vdi(filename, @_intin[0]);
@ -1294,7 +1294,7 @@ begin
vdi(@pb);
end;
procedure v_gtext(handle: smallint; x: smallint; y: smallint; outputstring: pchar);
procedure v_gtext(handle: smallint; x: smallint; y: smallint; outputstring: PAnsiChar);
var len: smallint;
begin
_ptsin[0]:=x;
@ -1311,7 +1311,7 @@ begin
vdi;
end;
procedure v_gtext(handle, x, y: smallint; const outputstring: string);
procedure v_gtext(handle, x, y: smallint; const outputstring: shortstring);
var len: smallint;
begin
_ptsin[0]:=x;
@ -1554,7 +1554,7 @@ begin
end;
procedure v_justified(handle, x, y: smallint;
const outputstring: string;
const outputstring: shortstring;
width, wordspace, charspace: smallint);
var len: smallint;
begin
@ -1955,7 +1955,7 @@ begin
vsm_choice:=_contrl[4];
end;
procedure vrq_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resString: string);
procedure vrq_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resstring: shortstring);
begin
_intin[0]:=max_length;
_intin[1]:=echo_mode;
@ -1971,10 +1971,10 @@ begin
vdi;
vdi_to_string(@_intout, resString, _contrl[4]);
vdi_to_string(@_intout, resstring, _contrl[4]);
end;
function vsm_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resString: string): smallint;
function vsm_string(handle, max_length, echo_mode: smallint; const echo_xy: ARRAY_2; out resstring: shortstring): smallint;
begin
_intin[0]:=max_length;
_intin[1]:=echo_mode;
@ -1990,7 +1990,7 @@ begin
vdi;
vdi_to_string(@_intout, resString, _contrl[4]);
vdi_to_string(@_intout, resstring, _contrl[4]);
vsm_string:=_contrl[4];
end;
@ -2450,10 +2450,10 @@ begin
input_mode:=_intout[0];
end;
procedure vqt_extent(handle: smallint; calcString: pchar; extent: psmallint);
procedure vqt_extent(handle: smallint; calcshortstring: PAnsiChar; extent: psmallint);
var len: smallint;
begin
len:=pchar_str_to_vdi(calcstring, @_intin[0]);
len:=pchar_str_to_vdi(calcshortstring, @_intin[0]);
_contrl[0]:=116;
_contrl[1]:=0;
_contrl[3]:=len;
@ -2703,7 +2703,7 @@ begin
vdi;
end;
function vqt_name(handle, element_num: smallint; out name: String33): smallint;
function vqt_name(handle, element_num: smallint; out name: string33): smallint;
begin
_intin[0]:=element_num;
@ -2747,7 +2747,7 @@ begin
effects[2]:=_ptsout[6];
end;
procedure vqt_justified(handle, x, y: smallint; const outString: String;
procedure vqt_justified(handle, x, y: smallint; const outstring: shortstring;
length, word_space, char_space: smallint;
offsets: Pointer);
var len: smallint;
@ -2807,7 +2807,7 @@ begin
end;
procedure vqt_fontheader(handle: smallint; buffer: Pointer;
out pathname: String);
out pathname: shortstring);
begin
Ppointer(@_intin[0])^:=buffer;
_contrl[0]:=232;
@ -2936,7 +2936,7 @@ begin
end;
procedure v_ftext(handle, x, y: smallint; const str: String);
procedure v_ftext(handle, x, y: smallint; const str: shortstring);
var len: longint;
begin
len:=string_to_vdi(str, @_intin[0]);
@ -2952,7 +2952,7 @@ begin
end;
procedure v_ftext_offset(handle, x, y: smallint;
const outputstring: string;
const outputstring: shortstring;
const offset: Array of smallint);
var i, len: longint;
src, dst: psmallint;
@ -3112,10 +3112,10 @@ end;
function vq_devinfo(handle, devnum: smallint;
out devexists: smallint;
out filename: String;
out devicename: String): smallint;
out filename: shortstring;
out devicename: shortstring): smallint;
var i, len: smallint;
ch: char;
ch: AnsiChar;
begin
_intin[0]:=devnum;
_contrl[0]:=248;
@ -3137,9 +3137,9 @@ begin
(* here, the driver exists *)
devexists:=1;
(* set the filename. The value in vdi_intout may be "DRIVER.SYS"
* or "DRIVER SYS". vdi_intout is not a nul-terminated string.
* or "DRIVER SYS". vdi_intout is not a nul-terminated shortstring.
* In both cases, this binding returns a valid filename: "DRIVER.SYS"
* with a null-character to ended the string.
* with a null-character to ended the shortstring.
*)
len := 0;
for i:=0 to _contrl[4]-1 do
@ -3160,7 +3160,7 @@ begin
end;
setlength(filename, len);
(* device name in ptsout is a C-String, (a nul-terminated string with 8bits per characters)
(* device name in ptsout is a C-shortstring, (a nul-terminated shortstring with 8bits per characters)
* each short value (vdi_ptsout[x]) contains 2 characters.
* When ptsout contains a device name, NVDI/SpeedoGDOS seems to always write the value "13"
* in vdi_control[1] (hey! this should be a read only value from the VDI point of view!!!),
@ -3181,14 +3181,14 @@ end;
procedure vqt_devinfo(handle, devnum: smallint;
out dev_busy: smallint;
out filename: String;
out devicename: String);
out filename: shortstring;
out devicename: shortstring);
var dummy: smallint;
begin
dev_busy:=vq_devinfo(handle, devnum, dummy, filename, devicename);
end;
function v_savecache(handle: smallint; const filename: String): smallint;
function v_savecache(handle: smallint; const filename: shortstring): smallint;
var len: longint;
begin
len:=string_to_vdi(filename, @_intin[0]);
@ -3203,7 +3203,7 @@ begin
v_savecache:=_intout[0];
end;
function v_loadcache(handle: smallint; const filename: String; mode: smallint): smallint;
function v_loadcache(handle: smallint; const filename: shortstring; mode: smallint): smallint;
var len: longint;
begin
len:=string_to_vdi(filename, @_intin[1]);

View File

@ -202,7 +202,7 @@ type
type
PCOLOR_TAB = ^TCOLOR_TAB;
TCOLOR_TAB = record {* Colour table *}
magic: array[0..3] of char; {* 'ctab' *}
magic: array[0..3] of AnsiChar; {* 'ctab' *}
length: longint;
format: longint; {* Format (0) *}
reserved: longint; {* Reserved, set to 0 *}
@ -302,7 +302,7 @@ type
TFONT_HDR = record
font_id : smallint;
point : smallint;
name : Array[0..31] of Char;
name : Array[0..31] of AnsiChar;
first_ade : Word;
last_ade : Word;
top : Word;

View File

@ -700,10 +700,10 @@ function xbios_Dsp_Lock: smallint; syscall 14 104;
procedure xbios_Dsp_Unlock; syscall 14 105;
procedure xbios_Dsp_Available(var xavailable, yavailable: LongInt); syscall 14 106;
function xbios_Dsp_Reserve(xreserve, yreserve: LongInt): smallint; syscall 14 107;
function xbios_Dsp_LoadProg(filename: PChar; ability: smallint; buffer: Pointer): smallint; syscall 14 108;
function xbios_Dsp_LoadProg(filename: PAnsiChar; ability: smallint; buffer: Pointer): smallint; syscall 14 108;
procedure xbios_Dsp_ExecProg(codeptr: Pointer; codesize: LongInt; ability: smallint); syscall 14 109;
procedure xbios_Dsp_ExecBoot(codeptr: Pointer; codesize: LongInt; ability: smallint); syscall 14 110;
function xbios_Dsp_LodToBinary(filename: PChar; codeptr: Pointer): LongInt; syscall 14 111;
function xbios_Dsp_LodToBinary(filename: PAnsiChar; codeptr: Pointer): LongInt; syscall 14 111;
procedure xbios_Dsp_TriggerHC(vector: smallint); syscall 14 112;
function xbios_Dsp_RequestUniqueAbility: smallint; syscall 14 113;
function xbios_Dsp_GetProgAbility: smallint; syscall 14 114;