From 904c59fbfffb65cddd60d892d0e49489773490da Mon Sep 17 00:00:00 2001 From: Thorsten Otto Date: Sat, 5 Feb 2022 13:13:48 +0100 Subject: [PATCH] tosunits: variable basepage needs to be visible by applications --- packages/tosunits/src/tos.pas | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/tosunits/src/tos.pas b/packages/tosunits/src/tos.pas index cf4d9695cc..db03aa6c62 100644 --- a/packages/tosunits/src/tos.pas +++ b/packages/tosunits/src/tos.pas @@ -18,13 +18,14 @@ } {$MODE FPC} +{$MODESWITCH OUT+} {$LONGSTRINGS OFF} { this unit always uses shortstrings } {$PACKRECORDS 2} unit tos; interface -uses gemdos, xbios, bios; +uses gemdos, xbios, bios, metados; const FO_READ = 0; @@ -85,7 +86,13 @@ type d_fname : String[12]; end; - LongIntFunc = Function: LongInt; + LongIntFunc = xbios.TLongIntFunc; + + METAINFO = metados.TMETAINFO; + +{ TOS program need this exported } +var + basepage: PPD; external name '__base'; (* ++++++++++++++++++++++++++++++++++++++++ *) (* BIOS *) @@ -343,7 +350,7 @@ function Dclosedir(dir: LongInt): LongInt; syscall 1 299; function Fxattr(flag: smallint; const name: String; var 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; var buf: String; const name: 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; @@ -536,7 +543,7 @@ begin fsymlink := gemdos_fsymlink(s1, s2); end; -function Freadlink(size: smallint; var buf: String; const name: String): LongInt; +function Freadlink(size: smallint; out buf: String; const name: String): LongInt; var s1: array[0..255] of char; s2: array[0..255] of char; begin