diff options
author | marcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-01-22 14:51:38 +0000 |
---|---|---|
committer | marcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-01-22 14:51:38 +0000 |
commit | 4f4f4c7820845e2430c0afefba97250973aa3886 (patch) | |
tree | 1337f5d59bc02f143ba80ab59d4c7f005e77b4a3 | |
parent | d1de7c9f43334dc3e1d091dbf5d158147b110c65 (diff) | |
download | fpc-4f4f4c7820845e2430c0afefba97250973aa3886.tar.gz |
Moved some basic units to RTL
Added video, mouse and keyboard from MorphOS, complete rewrite Keyboard, better key handling
changed all calls to CDECL
bring FP-IDE to life
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/aros@23493 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | ide/fp.pas | 2 | ||||
-rw-r--r-- | ide/fpdebug.pas | 2 | ||||
-rw-r--r-- | ide/fpide.pas | 16 | ||||
-rw-r--r-- | ide/fpmdebug.inc | 3 | ||||
-rw-r--r-- | ide/fpredir.pas | 20 | ||||
-rw-r--r-- | ide/fpusrscr.pas | 6 | ||||
-rw-r--r-- | ide/fputils.pas | 6 | ||||
-rw-r--r-- | ide/fpviews.pas | 11 | ||||
-rw-r--r-- | ide/globdir.inc | 3 | ||||
-rw-r--r-- | ide/wconsole.pas | 4 | ||||
-rw-r--r-- | ide/whelp.pas | 6 | ||||
-rw-r--r-- | ide/wresourc.pas | 3 | ||||
-rw-r--r-- | ide/wutils.pas | 19 | ||||
-rw-r--r-- | packages/arosunits/Makefile.fpc | 4 | ||||
-rw-r--r-- | packages/arosunits/src/amigados.pas | 4560 | ||||
-rw-r--r-- | packages/arosunits/src/asl.pas | 16 | ||||
-rw-r--r-- | packages/arosunits/src/diskfont.pas | 14 | ||||
-rw-r--r-- | packages/arosunits/src/gadtools.pas | 16 | ||||
-rw-r--r-- | packages/arosunits/src/layers.pas | 568 | ||||
-rw-r--r-- | packages/arosunits/src/mui.pas | 50 | ||||
-rwxr-xr-x | rtl/aros/Makefile | 966 | ||||
-rw-r--r-- | rtl/aros/Makefile.fpc | 5 | ||||
-rw-r--r-- | rtl/aros/agraphics.pas (renamed from packages/arosunits/src/agraphics.pas) | 352 | ||||
-rw-r--r-- | rtl/aros/amigados.pas | 4123 | ||||
-rw-r--r-- | rtl/aros/dos.pp | 67 | ||||
-rw-r--r-- | rtl/aros/exec.pas (renamed from packages/arosunits/src/exec.pas) | 258 | ||||
-rw-r--r-- | rtl/aros/i386/doslibf.inc | 72 | ||||
-rw-r--r-- | rtl/aros/i386/execd.inc | 1 | ||||
-rw-r--r-- | rtl/aros/i386/execf.inc | 51 | ||||
-rw-r--r-- | rtl/aros/i386/prt0.as | 73 | ||||
-rw-r--r-- | rtl/aros/i386/utilf.inc | 4 | ||||
-rw-r--r-- | rtl/aros/inputevent.pas (renamed from packages/arosunits/src/inputevent.pas) | 0 | ||||
-rw-r--r-- | rtl/aros/intuition.pas (renamed from packages/arosunits/src/intuition.pas) | 284 | ||||
-rw-r--r-- | rtl/aros/keyboard.pp | 469 | ||||
-rw-r--r-- | rtl/aros/keymap.pas (renamed from packages/arosunits/src/keymap.pas) | 8 | ||||
-rw-r--r-- | rtl/aros/layers.pas | 486 | ||||
-rw-r--r-- | rtl/aros/longarray.pas (renamed from packages/arosunits/src/longarray.pas) | 0 | ||||
-rw-r--r-- | rtl/aros/mouse.pp | 61 | ||||
-rw-r--r-- | rtl/aros/pastoc.pas (renamed from packages/arosunits/src/pastoc.pas) | 0 | ||||
-rw-r--r-- | rtl/aros/sysdir.inc | 105 | ||||
-rw-r--r-- | rtl/aros/sysfile.inc | 481 | ||||
-rw-r--r-- | rtl/aros/sysos.inc | 1 | ||||
-rw-r--r-- | rtl/aros/system.pp | 16 | ||||
-rw-r--r-- | rtl/aros/sysutils.pp | 82 | ||||
-rw-r--r-- | rtl/aros/tagsarray.pas (renamed from packages/arosunits/src/tagsarray.pas) | 0 | ||||
-rw-r--r-- | rtl/aros/timer.pas (renamed from packages/arosunits/src/timer.pas) | 10 | ||||
-rw-r--r-- | rtl/aros/utility.pas (renamed from packages/arosunits/src/utility.pas) | 76 | ||||
-rw-r--r-- | rtl/aros/video.pp | 656 | ||||
-rw-r--r-- | rtl/aros/videodata.inc | 281 |
49 files changed, 7292 insertions, 7025 deletions
diff --git a/ide/fp.pas b/ide/fp.pas index 37a24b54bc..9dafe80d60 100644 --- a/ide/fp.pas +++ b/ide/fp.pas @@ -318,7 +318,7 @@ procedure InitCompilerSwitches; page is not available before video is initialized. (And only in certain circumstances after that, so, use a plain ascii character as bullet on Unix.)} -{$if defined(unix) or defined(amiga) or defined(morphos)} +{$if defined(aros) or defined(unix) or defined(amiga) or defined(morphos)} const bullet='*'; {$else} const bullet='þ'; diff --git a/ide/fpdebug.pas b/ide/fpdebug.pas index a02026d3ef..fbf63a1388 100644 --- a/ide/fpdebug.pas +++ b/ide/fpdebug.pas @@ -580,7 +580,7 @@ function OSFileName(st : string) : string; var i : longint; {$endif Unix} begin -{$ifdef Unix} +{$if defined(Unix) or defined(aros)} OSFileName:=st; {$else} {$ifdef Windows} diff --git a/ide/fpide.pas b/ide/fpide.pas index f96e651593..22b1d4fdda 100644 --- a/ide/fpide.pas +++ b/ide/fpide.pas @@ -380,6 +380,8 @@ resourcestring menu_local_gotosource = '~G~oto source'; menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft; menu_key_edit_paste_microsoft = 'Ctrl+V'; menu_key_edit_clear = 'Ctrl+Del'; + menu_key_edit_all_microsoft = 'Ctrl+A'; + menu_key_edit_all_borland = ''; menu_key_run_run = 'Ctrl+F9'; menu_key_run_stepover = 'F8'; @@ -878,7 +880,7 @@ begin NewItem(menu_edit_copy,menu_key_edit_copy, copy_key, cmCopy, hcCut, NewItem(menu_edit_paste,menu_key_edit_paste, paste_key, cmPaste, hcPaste, NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear, - NewItem(menu_edit_selectall,'', kbNoKey, cmSelectAll, hcSelectAll, + NewItem(menu_edit_selectall,menu_key_edit_all, all_key, cmSelectAll, hcSelectAll, NewItem(menu_edit_unselect,'', kbNoKey, cmUnselect, hcUnselect, NewLine( NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard, @@ -1041,20 +1043,24 @@ begin menu_key_edit_cut:=menu_key_edit_cut_microsoft; menu_key_edit_copy:=menu_key_edit_copy_microsoft; menu_key_edit_paste:=menu_key_edit_paste_microsoft; + menu_key_edit_all:=menu_key_edit_all_microsoft; menu_key_hlplocal_copy:=menu_key_hlplocal_copy_microsoft; cut_key:=kbCtrlX; copy_key:=kbCtrlC; paste_key:=kbCtrlV; + all_key:=kbCtrlA; end; ekm_borland: begin menu_key_edit_cut:=menu_key_edit_cut_borland; menu_key_edit_copy:=menu_key_edit_copy_borland; menu_key_edit_paste:=menu_key_edit_paste_borland; + menu_key_edit_all:=menu_key_edit_all_microsoft; menu_key_hlplocal_copy:=menu_key_hlplocal_copy_borland; cut_key:=kbShiftDel; copy_key:=kbCtrlIns; paste_key:=kbShiftIns; + all_key:=kbNoKey; end; end; loadmenubar; @@ -1558,6 +1564,12 @@ begin ErrFile:='stderr'; ExecuteRedir(ProgramPath,Params,InFile,OutFile,ErrFile); end; +{$ifdef aros} + end else + begin + DosExecute(ProgramPath, Params); + end; +{$else} {$ifndef Unix} end else if (InFile='') and (OutFile='') and (ErrFile='') then @@ -1570,7 +1582,7 @@ begin InFile,OutFile,ErrFile); end; {$endif Unix} - +{$endif} {$ifdef Unix} if (DebuggeeTTY='') and (OutFile='') and (ExecType<>exDosShell) then begin diff --git a/ide/fpmdebug.inc b/ide/fpmdebug.inc index 8cad30cb25..31ad91de7e 100644 --- a/ide/fpmdebug.inc +++ b/ide/fpmdebug.inc @@ -82,6 +82,9 @@ var Event : TEvent; ev : TMouseEvent; Clear : Boolean; begin + {$ifdef aros} + Exit; + {$endif} if UserScreen=nil then begin ErrorBox(msg_userscreennotavailable,nil); diff --git a/ide/fpredir.pas b/ide/fpredir.pas index a257272d0f..f3e47c1cd9 100644 --- a/ide/fpredir.pas +++ b/ide/fpredir.pas @@ -95,10 +95,13 @@ Uses baseunix, unix, {$endif unix} +{$ifdef aros} + SysUtils, +{$endif} dos; Const -{$ifdef UNIX} +{$if defined(UNIX) or defined(aros)} DirSep='/'; listsep = [';',':']; exeext = ''; @@ -270,8 +273,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } + {$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then + {$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then + {$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -627,8 +634,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } + {$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then + {$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then + {$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -786,6 +797,12 @@ end; {............................................................................} +{$ifdef aros} + procedure DosExecute(ProgName, ComLine : String); + begin + Dos.Exec(Progname, ComLine); + end; +{$else} procedure DosExecute(ProgName, ComLine : String); {$ifdef Windows} var @@ -834,6 +851,7 @@ end; end; {$endif CPU86} End; +{$endif aros} {***************************************************************************** Initialize diff --git a/ide/fpusrscr.pas b/ide/fpusrscr.pas index 92e03b9f36..740e253675 100644 --- a/ide/fpusrscr.pas +++ b/ide/fpusrscr.pas @@ -85,6 +85,10 @@ type {$IFDEF MORPHOS} {$DEFINE AMIGASCREEN} {$ENDIF} +{$IFDEF AROS} + {$DEFINE AMIGASCREEN} +{$ENDIF} + {$IFDEF AMIGASCREEN} PAmigaScreen = ^TAmigaScreen; @@ -1572,7 +1576,7 @@ begin UserScreen:=New(PNWLScreen, Init); {$else} {$ifdef AMIGASCREEN} - UserScreen:=nil; //New(PAmigaScreen, Init); + UserScreen:=New(PAmigaScreen, Init); {$else} UserScreen:=New(PScreen, Init); {$endif AMIGASCREEN} diff --git a/ide/fputils.pas b/ide/fputils.pas index 1000e86570..007e46455a 100644 --- a/ide/fputils.pas +++ b/ide/fputils.pas @@ -21,7 +21,7 @@ uses Objects; const dirsep = System.DirectorySeparator; -{$ifdef Unix} +{$if defined(Unix) or defined(aros)} listsep = [';',':']; exeext = ''; pasext = '.pas'; @@ -113,8 +113,12 @@ begin for i:=1 to length(s) do if s[i] in ['/','\'] then s[i]:=DirSep; +{$ifdef aros} if (length(s)>0) and (s[length(s)]<>DirSep) and (s[length(s)]<>':') then +{$else} + if (length(s)>0) and (s[length(s)]<>DirSep) then +{$endif} s:=s+DirSep; if (not allowdot) and (s='.'+DirSep) then s:=''; diff --git a/ide/fpviews.pas b/ide/fpviews.pas index 43e0e7bc75..e5f22c46ca 100644 --- a/ide/fpviews.pas +++ b/ide/fpviews.pas @@ -511,6 +511,7 @@ const menu_key_common_copy_borland = 'Ctrl+Ins'; menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft; menu_key_edit_paste_microsoft = 'Ctrl+V'; menu_key_edit_clear = 'Ctrl+Del'; + menu_key_edit_all_borland = ''; menu_key_common_helpindex = 'Shift+F1'; menu_key_common_topicsearch = 'Ctrl+F1'; @@ -530,11 +531,12 @@ const menu_key_common_copy_borland = 'Ctrl+Ins'; const menu_key_edit_cut:string[63]=menu_key_edit_cut_borland; menu_key_edit_copy:string[63]=menu_key_edit_copy_borland; menu_key_edit_paste:string[63]=menu_key_edit_paste_borland; + menu_key_edit_all:string[63]=menu_key_edit_all_borland; menu_key_hlplocal_copy:string[63]=menu_key_hlplocal_copy_borland; cut_key:word=kbShiftDel; copy_key:word=kbCtrlIns; paste_key:word=kbShiftIns; - + all_key:word=kbNoKEy; procedure RegisterFPViews; implementation @@ -4384,10 +4386,17 @@ var P: PVideoMode; begin P:=Item; S:=IntToStr(P^.Col)+'x'+IntToStr(P^.Row)+' '; + {$ifdef aros} // color flag is used in Aros for mark on a seperate window + if P^.Color then + S:=S+'window' + else + S:=S+'screen'; + {$else} if P^.Color then S:=S+'color' else S:=S+'mono'; + {$endif} GetText:=copy(S,1,MaxLen); end; diff --git a/ide/globdir.inc b/ide/globdir.inc index 3e8afe1ae0..ad39893e92 100644 --- a/ide/globdir.inc +++ b/ide/globdir.inc @@ -98,6 +98,9 @@ {$ifdef MorphOS} {$define FSCaseInsensitive} {$endif} +{$ifdef aros} + {$define FSCaseInsensitive} +{$endif} { --- Exclude debugger support --- } {.$DEFINE NODEBUG} diff --git a/ide/wconsole.pas b/ide/wconsole.pas index cf1906eda7..aa8ed821c3 100644 --- a/ide/wconsole.pas +++ b/ide/wconsole.pas @@ -43,6 +43,10 @@ interface {$ifdef morphos} longint {$endif morphos} +{$ifdef aros} + longint +{$endif aros} + ; Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode); Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode); diff --git a/ide/whelp.pas b/ide/whelp.pas index 4c35cbd4eb..ef17704ed1 100644 --- a/ide/whelp.pas +++ b/ide/whelp.pas @@ -316,7 +316,11 @@ begin GetDosTicks := -1; end; {$endif} - +{$ifdef aros} +begin + GetDosTicks := -1; +end; +{$endif} procedure DisposeRecord(var R: TRecord); begin diff --git a/ide/wresourc.pas b/ide/wresourc.pas index e4fa731aa7..c1b796100b 100644 --- a/ide/wresourc.pas +++ b/ide/wresourc.pas @@ -777,6 +777,9 @@ begin Fail; End; MyStream:=true; + {$ifdef aros} + Flush; // must write the header on open or later seek will not work + {$endif} end; constructor TResourceFile.LoadFile(AFileName: string); diff --git a/ide/wutils.pas b/ide/wutils.pas index ad7568fff2..127653b52b 100644 --- a/ide/wutils.pas +++ b/ide/wutils.pas @@ -514,7 +514,11 @@ function DirOf(const S: string): string; var D: DirStr; E: ExtStr; N: NameStr; begin FSplit(S,D,N,E); - if (D<>'') and (D[Length(D)]<>DirSep) then + if (D<>'') and (D[Length(D)]<>DirSep) + {$ifdef aros} + and (D[Length(D)]<>':') + {$endif} + then DirOf:=D+DirSep else DirOf:=D; @@ -1209,8 +1213,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } +{$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then +{$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then +{$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -1220,7 +1228,12 @@ function GetCurDir: string; var S: string; begin GetDir(0,S); - if copy(S,length(S),1)<>DirSep then S:=S+DirSep; + if (copy(S,length(S),1)<>DirSep) +{$ifdef aros} + and (copy(S,length(S),1) <> ':') +{$endif} + then + S:=S+DirSep; GetCurDir:=S; end; @@ -1233,7 +1246,7 @@ var Dir: string; begin Dir:=GetEnv('TEMP'); if Dir='' then Dir:=GetEnv('TMP'); -{$if defined(morphos) or defined(amiga)} +{$if defined(aros) or defined(morphos) or defined(amiga)} if Dir='' then Dir:='T:'; {$endif} if (Dir<>'') then if not ExistsDir(Dir) then Dir:=''; diff --git a/packages/arosunits/Makefile.fpc b/packages/arosunits/Makefile.fpc index 71b98e2b16..6880554874 100644 --- a/packages/arosunits/Makefile.fpc +++ b/packages/arosunits/Makefile.fpc @@ -7,8 +7,8 @@ name=arosunits version=2.7.1 [target] -units= amigados exec intuition gadtools workbench asl agraphics inputevent layers longarray \ - mui pastoc tagsarray timer utility amigalib timerutils diskfont keymap +units= gadtools workbench asl \ + mui amigalib timerutils diskfont [compiler] includedir=src diff --git a/packages/arosunits/src/amigados.pas b/packages/arosunits/src/amigados.pas deleted file mode 100644 index f34b7620ff..0000000000 --- a/packages/arosunits/src/amigados.pas +++ /dev/null @@ -1,4560 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - History: - Added overlay functions for Pchar->Strings, functions - and procedures. Now you can mix PChar and Strings e.g - OpenLibrary('whatis.library',37). No need to cast to - a PChar. - 14 Jul 2000. - - Changed ReadArgs, removed the var for the second arg. - Changed DOSRename from longint to a boolean. - Aug 04 2000. - - Added functions and procedures with array of const. - For use with fpc 1.0.7 - - You have to use systemvartags. Check out that unit. - 09 Nov 2002. - - Added the define use_amiga_smartlink. - 13 Jan 2003. - - Update for AmigaOS 3.9. - Added some const. - 26 Jan 2003. - - Changed integer > smallint. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se -} - -unit amigados; - -INTERFACE - -uses exec, utility, timer; - -Const - -{ Predefined Amiga DOS global constants } - - DOSTRUE = -1; - DOSFALSE = 0; - -{ Mode parameter to Open() } - - MODE_OLDFILE = 1005; { Open existing file read/write - positioned at beginning of file. } - MODE_NEWFILE = 1006; { Open freshly created file (delete - old file) read/write } - MODE_READWRITE = 1004; { Open old file w/exclusive lock } - -{ Relative position to Seek() } - - OFFSET_BEGINNING = -1; { relative to Begining Of File } - OFFSET_CURRENT = 0; { relative to Current file position } - OFFSET_END = 1; { relative to End Of File } - - BITSPERBYTE = 8; - BYTESPERLONG = 4; - BITSPERLONG = 32; - MAXINT = $7FFFFFFF; - MININT = $80000000; - -{ Passed as type to Lock() } - - SHARED_LOCK = -2; { File is readable by others } - ACCESS_READ = -2; { Synonym } - EXCLUSIVE_LOCK = -1; { No other access allowed } - ACCESS_WRITE = -1; { Synonym } - -Type - - FileHandle = BPTR; - FileLock = BPTR; - - pDateStamp = ^tDateStamp; - tDateStamp = record - ds_Days : Longint; { Number of days since Jan. 1, 1978 } - ds_Minute : Longint; { Number of minutes past midnight } - ds_Tick : Longint; { Number of ticks past minute } - end; - -Const - - TICKS_PER_SECOND = 50; { Number of ticks in one second } - -{$PACKRECORDS 4} -Type - -{ Returned by Examine() and ExInfo(), must be on a 4 byte boundary } - - pFileInfoBlock = ^tFileInfoBlock; - tFileInfoBlock = record - fib_DiskKey : Longint; - fib_DirEntryType : Longint; - { Type of Directory. If < 0, then a plain file. - If > 0 a directory } - fib_FileName : Array [0..107] of Char; - { Null terminated. Max 30 chars used for now } - fib_Protection : Longint; - { bit mask of protection, rwxd are 3-0. } - fib_EntryType : Longint; - fib_Size : Longint; { Number of bytes in file } - fib_NumBlocks : Longint; { Number of blocks in file } - fib_Date : tDateStamp; { Date file last changed } - fib_Comment : Array [0..79] of Char; - { Null terminated comment associated with file } - fib_OwnerUID : Word; - fib_OwnerGID : Word; - fib_Reserved : Array [0..31] of Char; - end; - -Const - -{ FIB stands for FileInfoBlock } - -{* FIBB are bit definitions, FIBF are field definitions *} -{* Regular RWED bits are 0 == allowed. *} -{* NOTE: GRP and OTR RWED permissions are 0 == not allowed! *} -{* Group and Other permissions are not directly handled by the filesystem *} - - FIBB_OTR_READ = 15; {* Other: file is readable *} - FIBB_OTR_WRITE = 14; {* Other: file is writable *} - FIBB_OTR_EXECUTE = 13; {* Other: file is executable *} - FIBB_OTR_DELETE = 12; {* Other: prevent file from being deleted *} - FIBB_GRP_READ = 11; {* Group: file is readable *} - FIBB_GRP_WRITE = 10; {* Group: file is writable *} - FIBB_GRP_EXECUTE = 9; {* Group: file is executable *} - FIBB_GRP_DELETE = 8; {* Group: prevent file from being deleted *} - - FIBB_SCRIPT = 6; { program is a script (execute) file } - FIBB_PURE = 5; { program is reentrant and rexecutable} - FIBB_ARCHIVE = 4; { cleared whenever file is changed } - FIBB_READ = 3; { ignored by old filesystem } - FIBB_WRITE = 2; { ignored by old filesystem } - FIBB_EXECUTE = 1; { ignored by system, used by Shell } - FIBB_DELETE = 0; { prevent file from being deleted } - - FIBF_OTR_READ = (1 shl FIBB_OTR_READ); - FIBF_OTR_WRITE = (1 shl FIBB_OTR_WRITE); - FIBF_OTR_EXECUTE = (1 shl FIBB_OTR_EXECUTE); - FIBF_OTR_DELETE = (1 shl FIBB_OTR_DELETE); - FIBF_GRP_READ = (1 shl FIBB_GRP_READ); - FIBF_GRP_WRITE = (1 shl FIBB_GRP_WRITE); - FIBF_GRP_EXECUTE = (1 shl FIBB_GRP_EXECUTE); - FIBF_GRP_DELETE = (1 shl FIBB_GRP_DELETE); - - FIBF_SCRIPT = 64; - FIBF_PURE = 32; - FIBF_ARCHIVE = 16; - FIBF_READ = 8; - FIBF_WRITE = 4; - FIBF_EXECUTE = 2; - FIBF_DELETE = 1; - -{* Standard maximum length for an error string from fault. However, most *} -{* error strings should be kept under 60 characters if possible. Don't *} -{* forget space for the header you pass in. *} - - FAULT_MAX = 82; - -{* All BCPL data must be long Integer aligned. BCPL pointers are the long Integer - * address (i.e byte address divided by 4 (>>2)) *} - -{* BCPL strings have a length in the first byte and then the characters. - * For example: s[0]=3 s[1]=S s[2]=Y s[3]=S *} - - -Type - -{ returned by Info(), must be on a 4 byte boundary } - - pInfoData = ^tInfoData; - tInfoData = record - id_NumSoftErrors : Longint; { number of soft errors on disk } - id_UnitNumber : Longint; { Which unit disk is (was) mounted on } - id_DiskState : Longint; { See defines below } - id_NumBlocks : Longint; { Number of blocks on disk } - id_NumBlocksUsed : Longint; { Number of block in use } - id_BytesPerBlock : Longint; - id_DiskType : Longint; { Disk Type code } - id_VolumeNode : BPTR; { BCPL pointer to volume node } - id_InUse : Longint; { Flag, zero if not in use } - end; - -{$PACKRECORDS NORMAL} - -Const - -{ ID stands for InfoData } - - { Disk states } - - ID_WRITE_PROTECTED = 80; { Disk is write protected } - ID_VALIDATING = 81; { Disk is currently being validated } - ID_VALIDATED = 82; { Disk is consistent and writeable } - -CONST - ID_NO_DISK_PRESENT = -1; - ID_UNREADABLE_DISK = $42414400; { 'BAD\0' } - ID_DOS_DISK = $444F5300; { 'DOS\0' } - ID_FFS_DISK = $444F5301; { 'DOS\1' } - ID_NOT_REALLY_DOS = $4E444F53; { 'NDOS' } - ID_KICKSTART_DISK = $4B49434B; { 'KICK' } - ID_MSDOS_DISK = $4d534400; { 'MSD\0' } - -{ Errors from IoErr(), etc. } - ERROR_NO_FREE_STORE = 103; - ERROR_TASK_TABLE_FULL = 105; - ERROR_BAD_TEMPLATE = 114; - ERROR_BAD_NUMBER = 115; - ERROR_REQUIRED_ARG_MISSING = 116; - ERROR_KEY_NEEDS_ARG = 117; - ERROR_TOO_MANY_ARGS = 118; - ERROR_UNMATCHED_QUOTES = 119; - ERROR_LINE_TOO_LONG = 120; - ERROR_FILE_NOT_OBJECT = 121; - ERROR_INVALID_RESIDENT_LIBRARY = 122; - ERROR_NO_DEFAULT_DIR = 201; - ERROR_OBJECT_IN_USE = 202; - ERROR_OBJECT_EXISTS = 203; - ERROR_DIR_NOT_FOUND = 204; - ERROR_OBJECT_NOT_FOUND = 205; - ERROR_BAD_STREAM_NAME = 206; - ERROR_OBJECT_TOO_LARGE = 207; - ERROR_ACTION_NOT_KNOWN = 209; - ERROR_INVALID_COMPONENT_NAME = 210; - ERROR_INVALID_LOCK = 211; - ERROR_OBJECT_WRONG_TYPE = 212; - ERROR_DISK_NOT_VALIDATED = 213; - ERROR_DISK_WRITE_PROTECTED = 214; - ERROR_RENAME_ACROSS_DEVICES = 215; - ERROR_DIRECTORY_NOT_EMPTY = 216; - ERROR_TOO_MANY_LEVELS = 217; - ERROR_DEVICE_NOT_MOUNTED = 218; - ERROR_SEEK_ERROR = 219; - ERROR_COMMENT_TOO_BIG = 220; - ERROR_DISK_FULL = 221; - ERROR_DELETE_PROTECTED = 222; - ERROR_WRITE_PROTECTED = 223; - ERROR_READ_PROTECTED = 224; - ERROR_NOT_A_DOS_DISK = 225; - ERROR_NO_DISK = 226; - ERROR_NO_MORE_ENTRIES = 232; -{ added for 1.4 } - ERROR_IS_SOFT_LINK = 233; - ERROR_OBJECT_LINKED = 234; - ERROR_BAD_HUNK = 235; - ERROR_NOT_IMPLEMENTED = 236; - ERROR_RECORD_NOT_LOCKED = 240; - ERROR_LOCK_COLLISION = 241; - ERROR_LOCK_TIMEOUT = 242; - ERROR_UNLOCK_ERROR = 243; - -{ error codes 303-305 are defined in dosasl.h } - -{ These are the return codes used by convention by AmigaDOS commands } -{ See FAILAT and IF for relvance to EXECUTE files } - RETURN_OK = 0; { No problems, success } - RETURN_WARN = 5; { A warning only } - RETURN_ERROR = 10; { Something wrong } - RETURN_FAIL = 20; { Complete or severe failure} - -{ Bit numbers that signal you that a user has issued a break } - SIGBREAKB_CTRL_C = 12; - SIGBREAKB_CTRL_D = 13; - SIGBREAKB_CTRL_E = 14; - SIGBREAKB_CTRL_F = 15; - -{ Bit fields that signal you that a user has issued a break } -{ for example: if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); } - SIGBREAKF_CTRL_C = 4096; - SIGBREAKF_CTRL_D = 8192; - SIGBREAKF_CTRL_E = 16384; - SIGBREAKF_CTRL_F = 32768; - -{ Values returned by SameLock() } - LOCK_SAME = 0; - LOCK_SAME_HANDLER = 1; { actually same volume } - LOCK_DIFFERENT = -1; - -{ types for ChangeMode() } - CHANGE_LOCK = 0; - CHANGE_FH = 1; - -{ Values for MakeLink() } - LINK_HARD = 0; - LINK_SOFT = 1; { softlinks are not fully supported yet } - -{ values returned by } - ITEM_EQUAL = -2; { "=" Symbol } - ITEM_ERROR = -1; { error } - ITEM_NOTHING = 0; { *N, ;, endstreamch } - ITEM_UNQUOTED = 1; { unquoted item } - ITEM_QUOTED = 2; { quoted item } - -{ types for AllocDosObject/FreeDosObject } - DOS_FILEHANDLE = 0; { few people should use this } - DOS_EXALLCONTROL = 1; { Must be used to allocate this! } - DOS_FIB = 2; { useful } - DOS_STDPKT = 3; { for doing packet-level I/O } - DOS_CLI = 4; { for shell-writers, etc } - DOS_RDARGS = 5; { for ReadArgs if you pass it in } - - -{ - * Data structures and equates used by the V1.4 DOS functions - * StrtoDate() and DatetoStr() - } - -{--------- String/Date structures etc } -Type - pDateTime = ^tDateTime; - tDateTime = record - dat_Stamp : tDateStamp; { DOS DateStamp } - dat_Format, { controls appearance of dat_StrDate } - dat_Flags : Byte; { see BITDEF's below } - dat_StrDay, { day of the week string } - dat_StrDate, { date string } - dat_StrTime : STRPTR; { time string } - END; - -{ You need this much room for each of the DateTime strings: } -CONST - LEN_DATSTRING = 16; - -{ flags for dat_Flags } - - DTB_SUBST = 0; { substitute Today, Tomorrow, etc. } - DTF_SUBST = 1; - DTB_FUTURE = 1; { day of the week is in future } - DTF_FUTURE = 2; - -{ - * date format values - } - - FORMAT_DOS = 0; { dd-mmm-yy } - FORMAT_INT = 1; { yy-mm-dd } - FORMAT_USA = 2; { mm-dd-yy } - FORMAT_CDN = 3; { dd-mm-yy } - FORMAT_MAX = FORMAT_CDN; - FORMAT_DEF = 4; { use default format, as defined - by locale; if locale not - available, use FORMAT_DOS - instead } - -{********************************************************************** -************************ PATTERN MATCHING ****************************** -************************************************************************ - -* structure expected by MatchFirst, MatchNext. -* Allocate this structure and initialize it as follows: -* -* Set ap_BreakBits to the signal bits (CDEF) that you want to take a -* break on, or NULL, if you don't want to convenience the user. -* -* If you want to have the FULL PATH NAME of the files you found, -* allocate a buffer at the END of this structure, and put the size of -* it into ap_Strlen. If you don't want the full path name, make sure -* you set ap_Strlen to zero. In this case, the name of the file, and stats -* are available in the ap_Info, as per usual. -* -* Then call MatchFirst() and then afterwards, MatchNext() with this structure. -* You should check the return value each time (see below) and take the -* appropriate action, ultimately calling MatchEnd() when there are -* no more files and you are done. You can tell when you are done by -* checking for the normal AmigaDOS return code ERROR_NO_MORE_ENTRIES. -* -} - -Type - pAChain = ^tAChain; - tAChain = record - an_Child, - an_Parent : pAChain; - an_Lock : BPTR; - an_Info : tFileInfoBlock; - an_Flags : Shortint; - an_String : Array[0..0] of Char; { FIX!! } - END; - - pAnchorPath = ^tAnchorPath; - tAnchorPath = record - case smallint of - 0 : ( - ap_First : pAChain; - ap_Last : pAChain; - ); - 1 : ( - ap_Base, { pointer to first anchor } - ap_Current : pAChain; { pointer to last anchor } - ap_BreakBits, { Bits we want to break on } - ap_FoundBreak : Longint; { Bits we broke on. Also returns ERROR_BREAK } - ap_Flags : Shortint; { New use for extra Integer. } - ap_Reserved : Shortint; - ap_Strlen : smallint; { This is what ap_Length used to be } - ap_Info : tFileInfoBlock; - ap_Buf : Array[0..0] of Char; { Buffer for path name, allocated by user !! } - { FIX! } - ); - END; - - -CONST - APB_DOWILD = 0; { User option ALL } - APF_DOWILD = 1; - - APB_ITSWILD = 1; { Set by MatchFirst, used by MatchNext } - APF_ITSWILD = 2; { Application can test APB_ITSWILD, too } - { (means that there's a wildcard } - { in the pattern after calling } - { MatchFirst). } - - APB_DODIR = 2; { Bit is SET IF a DIR node should be } - APF_DODIR = 4; { entered. Application can RESET this } - { bit after MatchFirst/MatchNext to AVOID } - { entering a dir. } - - APB_DIDDIR = 3; { Bit is SET for an "expired" dir node. } - APF_DIDDIR = 8; - - APB_NOMEMERR = 4; { Set on memory error } - APF_NOMEMERR = 16; - - APB_DODOT = 5; { IF set, allow conversion of '.' to } - APF_DODOT = 32; { CurrentDir } - - APB_DirChanged = 6; { ap_Current->an_Lock changed } - APF_DirChanged = 64; { since last MatchNext call } - - - DDB_PatternBit = 0; - DDF_PatternBit = 1; - DDB_ExaminedBit = 1; - DDF_ExaminedBit = 2; - DDB_Completed = 2; - DDF_Completed = 4; - DDB_AllBit = 3; - DDF_AllBit = 8; - DDB_Single = 4; - DDF_Single = 16; - -{ - * Constants used by wildcard routines, these are the pre-parsed tokens - * referred to by pattern match. It is not necessary for you to do - * anything about these, MatchFirst() MatchNext() handle all these for you. - } - - P_ANY = $80; { Token for '*' or '#? } - P_SINGLE = $81; { Token for '?' } - P_ORSTART = $82; { Token for '(' } - P_ORNEXT = $83; { Token for '|' } - P_OREND = $84; { Token for ')' } - P_NOT = $85; { Token for '~' } - P_NOTEND = $86; { Token for } - P_NOTCLASS = $87; { Token for '^' } - P_CLASS = $88; { Token for '[]' } - P_REPBEG = $89; { Token for '[' } - P_REPEND = $8A; { Token for ']' } - P_STOP = $8B; { token to force end of evaluation } - -{ Values for an_Status, NOTE: These are the actual bit numbers } - - COMPLEX_BIT = 1; { Parsing complex pattern } - EXAMINE_BIT = 2; { Searching directory } - -{ - * Returns from MatchFirst(), MatchNext() - * You can also get dos error returns, such as ERROR_NO_MORE_ENTRIES, - * these are in the dos.h file. - } - - ERROR_BUFFER_OVERFLOW = 303; { User OR internal buffer overflow } - ERROR_BREAK = 304; { A break character was received } - ERROR_NOT_EXECUTABLE = 305; { A file has E bit cleared } - -{ hunk types } - HUNK_UNIT = 999 ; - HUNK_NAME = 1000; - HUNK_CODE = 1001; - HUNK_DATA = 1002; - HUNK_BSS = 1003; - HUNK_RELOC32 = 1004; - HUNK_RELOC16 = 1005; - HUNK_RELOC8 = 1006; - HUNK_EXT = 1007; - HUNK_SYMBOL = 1008; - HUNK_DEBUG = 1009; - HUNK_END = 1010; - HUNK_HEADER = 1011; - - HUNK_OVERLAY = 1013; - HUNK_BREAK = 1014; - - HUNK_DREL32 = 1015; - HUNK_DREL16 = 1016; - HUNK_DREL8 = 1017; - - HUNK_LIB = 1018; - HUNK_INDEX = 1019; - -{ hunk_ext sub-types } - EXT_SYMB = 0 ; { symbol table } - EXT_DEF = 1 ; { relocatable definition } - EXT_ABS = 2 ; { Absolute definition } - EXT_RES = 3 ; { no longer supported } - EXT_REF32 = 129; { 32 bit reference to symbol } - EXT_COMMON = 130; { 32 bit reference to COMMON block } - EXT_REF16 = 131; { 16 bit reference to symbol } - EXT_REF8 = 132; { 8 bit reference to symbol } - EXT_DEXT32 = 133; { 32 bit data releative reference } - EXT_DEXT16 = 134; { 16 bit data releative reference } - EXT_DEXT8 = 135; { 8 bit data releative reference } - - -Type - -{ All DOS processes have this structure } -{ Create and Device Proc returns pointer to the MsgPort in this structure } -{ dev_proc = Address(smallint(DeviceProc()) - SizeOf(Task)) } - - pProcess = ^tProcess; - tProcess = record - pr_Task : tTask; - pr_MsgPort : tMsgPort; { This is BPTR address from DOS functions } - pr_Pad : smallint; { Remaining variables on 4 byte boundaries } - pr_SegList : BPTR; { Array of seg lists used by this process } - pr_StackSize : Longint; { Size of process stack in bytes } - pr_GlobVec : Pointer; { Global vector for this process (BCPL) } - pr_TaskNum : Longint; { CLI task number of zero if not a CLI } - pr_StackBase : BPTR; { Ptr to high memory end of process stack } - pr_Result2 : Longint; { Value of secondary result from last call } - pr_CurrentDir : BPTR; { Lock associated with current directory } - pr_CIS : BPTR; { Current CLI Input Stream } - pr_COS : BPTR; { Current CLI Output Stream } - pr_ConsoleTask : Pointer; { Console handler process for current window} - pr_FileSystemTask : Pointer; { File handler process for current drive } - pr_CLI : BPTR; { pointer to ConsoleLineInterpreter } - pr_ReturnAddr : Pointer; { pointer to previous stack frame } - pr_PktWait : Pointer; { Function to be called when awaiting msg } - pr_WindowPtr : Pointer; { Window for error printing } - { following definitions are new with 2.0 } - pr_HomeDir : BPTR; { Home directory of executing program } - pr_Flags : Longint; { flags telling dos about process } - pr_ExitCode : Pointer; { code to call on exit of program OR NULL } - pr_ExitData : Longint; { Passed as an argument to pr_ExitCode. } - pr_Arguments : STRPTR; { Arguments passed to the process at start } - pr_LocalVars : tMinList; { Local environment variables } - pr_ShellPrivate : ULONG; { for the use of the current shell } - pr_CES : BPTR; { Error stream - IF NULL, use pr_COS } - end; - -{ - * Flags for pr_Flags - } -CONST - PRB_FREESEGLIST = 0 ; - PRF_FREESEGLIST = 1 ; - PRB_FREECURRDIR = 1 ; - PRF_FREECURRDIR = 2 ; - PRB_FREECLI = 2 ; - PRF_FREECLI = 4 ; - PRB_CLOSEINPUT = 3 ; - PRF_CLOSEINPUT = 8 ; - PRB_CLOSEOUTPUT = 4 ; - PRF_CLOSEOUTPUT = 16; - PRB_FREEARGS = 5 ; - PRF_FREEARGS = 32; - - -{ The long smallint address (BPTR) of this structure is returned by - * Open() and other routines that return a file. You need only worry - * about this struct to do async io's via PutMsg() instead of - * standard file system calls } - -Type - - pFileHandle = ^tFileHandle; - tFileHandle = record - fh_Link : pMessage; { EXEC message } - fh_Port : pMsgPort; { Reply port for the packet } - fh_Type : pMsgPort; { Port to do PutMsg() to - Address is negative if a plain file } - fh_Buf : Longint; - fh_Pos : Longint; - fh_End : Longint; - fh_Func1 : Longint; - fh_Func2 : Longint; - fh_Func3 : Longint; - fh_Arg1 : Longint; - fh_Arg2 : Longint; - end; - -{ This is the extension to EXEC Messages used by DOS } - - pDosPacket = ^tDosPacket; - tDosPacket = record - dp_Link : pMessage; { EXEC message } - dp_Port : pMsgPort; { Reply port for the packet } - { Must be filled in each send. } - case smallint of - 0 : ( - dp_Action : Longint; - dp_Status : Longint; - dp_Status2 : Longint; - dp_BufAddr : Longint; - ); - 1 : ( - dp_Type : Longint; { See ACTION_... below and - * 'R' means Read, 'W' means Write to the - * file system } - dp_Res1 : Longint; { For file system calls this is the result - * that would have been returned by the - * function, e.g. Write ('W') returns actual - * length written } - dp_Res2 : Longint; { For file system calls this is what would - * have been returned by IoErr() } - dp_Arg1 : Longint; - dp_Arg2 : Longint; - dp_Arg3 : Longint; - dp_Arg4 : Longint; - dp_Arg5 : Longint; - dp_Arg6 : Longint; - dp_Arg7 : Longint; - ); - end; - - -{ A Packet does not require the Message to be before it in memory, but - * for convenience it is useful to associate the two. - * Also see the function init_std_pkt for initializing this structure } - - pStandardPacket = ^tStandardPacket; - tStandardPacket = record - sp_Msg : tMessage; - sp_Pkt : tDosPacket; - end; - - -Const - -{ Packet types } - ACTION_NIL = 0; - ACTION_GET_BLOCK = 2; { OBSOLETE } - ACTION_SET_MAP = 4; - ACTION_DIE = 5; - ACTION_EVENT = 6; - ACTION_CURRENT_VOLUME = 7; - ACTION_LOCATE_OBJECT = 8; - ACTION_RENAME_DISK = 9; - ACTION_WRITE = $57; { 'W' } - ACTION_READ = $52; { 'R' } - ACTION_FREE_LOCK = 15; - ACTION_DELETE_OBJECT = 16; - ACTION_RENAME_OBJECT = 17; - ACTION_MORE_CACHE = 18; - ACTION_COPY_DIR = 19; - ACTION_WAIT_CHAR = 20; - ACTION_SET_PROTECT = 21; - ACTION_CREATE_DIR = 22; - ACTION_EXAMINE_OBJECT = 23; - ACTION_EXAMINE_NEXT = 24; - ACTION_DISK_INFO = 25; - ACTION_INFO = 26; - ACTION_FLUSH = 27; - ACTION_SET_COMMENT = 28; - ACTION_PARENT = 29; - ACTION_TIMER = 30; - ACTION_INHIBIT = 31; - ACTION_DISK_TYPE = 32; - ACTION_DISK_CHANGE = 33; - ACTION_SET_DATE = 34; - - ACTION_SCREEN_MODE = 994; - - ACTION_READ_RETURN = 1001; - ACTION_WRITE_RETURN = 1002; - ACTION_SEEK = 1008; - ACTION_FINDUPDATE = 1004; - ACTION_FINDINPUT = 1005; - ACTION_FINDOUTPUT = 1006; - ACTION_END = 1007; - ACTION_TRUNCATE = 1022; { fast file system only } - ACTION_WRITE_PROTECT = 1023; { fast file system only } - -{ new 2.0 packets } - ACTION_SAME_LOCK = 40; - ACTION_CHANGE_SIGNAL = 995; - ACTION_FORMAT = 1020; - ACTION_MAKE_LINK = 1021; -{} -{} - ACTION_READ_LINK = 1024; - ACTION_FH_FROM_LOCK = 1026; - ACTION_IS_FILESYSTEM = 1027; - ACTION_CHANGE_MODE = 1028; -{} - ACTION_COPY_DIR_FH = 1030; - ACTION_PARENT_FH = 1031; - ACTION_EXAMINE_ALL = 1033; - ACTION_EXAMINE_FH = 1034; - - ACTION_LOCK_RECORD = 2008; - ACTION_FREE_RECORD = 2009; - - ACTION_ADD_NOTIFY = 4097; - ACTION_REMOVE_NOTIFY = 4098; - - {* Added in V39: *} - ACTION_EXAMINE_ALL_END = 1035; - ACTION_SET_OWNER = 1036; - -{* Tell a file system to serialize the current volume. This is typically - * done by changing the creation date of the disk. This packet does not take - * any arguments. NOTE: be prepared to handle failure of this packet for - * V37 ROM filesystems. - *} - - ACTION_SERIALIZE_DISK = 4200; - -{ - * A structure for holding error messages - stored as array with error == 0 - * for the last entry. - } -Type - pErrorString = ^tErrorString; - tErrorString = record - estr_Nums : Pointer; - estr_Strings : Pointer; - END; - - -{ DOS library node structure. - * This is the data at positive offsets from the library node. - * Negative offsets from the node is the jump table to DOS functions - * node = (struct DosLibrary *) OpenLibrary( "dos.library" .. ) } - -Type - - pDosLibrary = ^tDosLibrary; - tDosLibrary = record - dl_lib : tLibrary; - dl_Root : Pointer; { Pointer to RootNode, described below } - (* BINCOMPAT? - dl_GV : Pointer; { Pointer to BCPL global vector } - dl_A2 : Longint; { Private register dump of DOS } - dl_A5 : Longint; - dl_A6 : Longint; - *) - dl_Errors : pErrorString; { pointer to array of error msgs } - dl_TimeReq : pTimeRequest; { private pointer to timer request } - dl_UtilityBase : pLibrary; { private ptr to utility library } - dl_IntuitionBase : pLibrary; - // there are much more fields but all flagged with "do not use" or private - end; - - pRootNode = ^tRootNode; - tRootNode = record - rn_TaskArray : BPTR; { [0] is max number of CLI's - [1] is APTR to process id of CLI 1 - [n] is APTR to process id of CLI n } - rn_ConsoleSegment : BPTR; { SegList for the CLI } - rn_Time : tDateStamp; { Current time } - rn_RestartSeg : Longint; { SegList for the disk validator process } - rn_Info : BPTR; { Pointer ot the Info structure } - rn_FileHandlerSegment : BPTR; { segment for a file handler } - rn_CliList : tMinList; { new list of all CLI processes } - { the first cpl_Array is also rn_TaskArray } - rn_BootProc : pMsgPort; { private ptr to msgport of boot fs } - rn_ShellSegment : BPTR; { seglist for Shell (for NewShell) } - rn_Flags : Longint; { dos flags } - end; - -CONST - RNB_WILDSTAR = 24; - RNF_WILDSTAR = 16777216; - RNB_PRIVATE1 = 1; { private for dos } - RNF_PRIVATE1 = 2; - -Type - pDosInfo = ^tDosInfo; - tDosInfo = record - case smallint of - 0 : ( - di_ResList : BPTR; - ); - 1 : ( - di_McName : BPTR; { Network name of this machine; currently 0 } - di_DevInfo : BPTR; { Device List } - di_Devices : BPTR; { Currently zero } - di_Handlers : BPTR; { Currently zero } - di_NetHand : Pointer; { Network handler processid; currently zero } - di_DevLock, { do NOT access directly! } - di_EntryLock, { do NOT access directly! } - di_DeleteLock : tSignalSemaphore; { do NOT access directly! } - ); - end; - -{ ONLY to be allocated by DOS! } - - pCliProcList = ^tCliProcList; - tCliProcList = record - cpl_Node : tMinNode; - cpl_First : Longint; { number of first entry in array } - cpl_Array : Array[0..0] of pMsgPort; - { [0] is max number of CLI's in this entry (n) - * [1] is CPTR to process id of CLI cpl_First - * [n] is CPTR to process id of CLI cpl_First+n-1 - } - END; - -{ structure for the Dos resident list. Do NOT allocate these, use } -{ AddSegment(), and heed the warnings in the autodocs! } - -Type - pSegment = ^tSegment; - tSegment = record - seg_Next : BPTR; - seg_UC : Longint; - seg_Seg : BPTR; - seg_Name : Array[0..3] of Char; { actually the first 4 chars of BSTR name } - END; - -CONST - CMD_SYSTEM = -1; - CMD_INTERNAL = -2; - CMD_DISABLED = -999; - - -{ DOS Processes started from the CLI via RUN or NEWCLI have this additional - * set to data associated with them } -Type - pCommandLineInterface = ^tCommandLineInterface; - tCommandLineInterface = record - cli_Result2 : Longint; { Value of IoErr from last command } - cli_SetName : BSTR; { Name of current directory } - cli_CommandDir : BPTR; { Lock associated with command directory } - cli_ReturnCode : Longint; { Return code from last command } - cli_CommandName : BSTR; { Name of current command } - cli_FailLevel : Longint; { Fail level (set by FAILAT) } - cli_Prompt : BSTR; { Current prompt (set by PROMPT) } - cli_StandardInput : BPTR; { Default (terminal) CLI input } - cli_CurrentInput : BPTR; { Current CLI input } - cli_CommandFile : BSTR; { Name of EXECUTE command file } - cli_Interactive : Longint; { Boolean; True if prompts required } - cli_Background : Longint; { Boolean; True if CLI created by RUN } - cli_CurrentOutput : BPTR; { Current CLI output } - cli_DefaultStack : Longint; { Stack size to be obtained in long words } - cli_StandardOutput : BPTR; { Default (terminal) CLI output } - cli_Module : BPTR; { SegList of currently loaded command } - end; - -{ This structure can take on different values depending on whether it is - * a device, an assigned directory, or a volume. Below is the structure - * reflecting volumes only. Following that is the structure representing - * only devices. - } - -{ structure representing a volume } - - pDeviceList = ^tDeviceList; - tDeviceList = record - dl_Next : BPTR; { bptr to next device list } - dl_Type : Longint; { see DLT below } - dl_Task : pMsgPort; { ptr to handler task } - dl_Lock : BPTR; { not for volumes } - dl_VolumeDate : tDateStamp; { creation date } - dl_LockList : BPTR; { outstanding locks } - dl_DiskType : Longint; { 'DOS', etc } - dl_unused : Longint; - dl_Name : BSTR; { bptr to bcpl name } - end; - -{ device structure (same as the DeviceNode structure in filehandler.h) } - - pDevInfo = ^tDevInfo; - tDevInfo = record - dvi_Next : BPTR; - dvi_Type : Longint; - dvi_Task : Pointer; - dvi_Lock : BPTR; - dvi_Handler : BSTR; - dvi_StackSize : Longint; - dvi_Priority : Longint; - dvi_Startup : Longint; - dvi_SegList : BPTR; - dvi_GlobVec : BSTR; - dvi_Name : BSTR; - end; - -{ structure used for multi-directory assigns. AllocVec()ed. } - - pAssignList = ^tAssignList; - tAssignList = record - al_Next : pAssignList; - al_Lock : BPTR; - END; - - -{ combined structure for devices, assigned directories, volumes } - - pDosList = ^tDosList; - tDosList = record - dol_Next : BPTR; { bptr to next device on list } - dol_Type : Longint; { see DLT below } - dol_Task : pMsgPort; { ptr to handler task } - dol_Lock : BPTR; - case smallint of - 0 : ( - dol_Handler : record - dol_Handler : BSTR; { file name to load IF seglist is null } - dol_StackSize, { stacksize to use when starting process } - dol_Priority, { task priority when starting process } - dol_Startup : Longint; { startup msg: FileSysStartupMsg for disks } - dol_SegList, { already loaded code for new task } - dol_GlobVec : BPTR; { BCPL global vector to use when starting - * a process. -1 indicates a C/Assembler - * program. } - end; - ); - 1 : ( - dol_Volume : record - dol_VolumeDate : tDateStamp; { creation date } - dol_LockList : BPTR; { outstanding locks } - dol_DiskType : Longint; { 'DOS', etc } - END; - ); - 2 : ( - dol_assign : record - dol_AssignName : STRPTR; { name for non-OR-late-binding assign } - dol_List : pAssignList; { for multi-directory assigns (regular) } - END; - dol_Name : BSTR; { bptr to bcpl name } - ); - END; - -Const - -{ definitions for dl_Type } - - DLT_DEVICE = 0; - DLT_DIRECTORY = 1; - DLT_VOLUME = 2; - DLT_LATE = 3; { late-binding assign } - DLT_NONBINDING = 4; { non-binding assign } - DLT_PRIVATE = -1; { for internal use only } - -{ structure return by GetDeviceProc() } -Type - - pDevProc = ^tDevProc; - tDevProc = record - dvp_Port : pMsgPort; - dvp_Lock : BPTR; - dvp_Flags : Longint; - dvp_DevNode : pDosList; { DON'T TOUCH OR USE! } - END; - -CONST -{ definitions for dvp_Flags } - DVPB_UNLOCK = 0; - DVPF_UNLOCK = 1; - DVPB_ASSIGN = 1; - DVPF_ASSIGN = 2; - -{ Flags to be passed to LockDosList(), etc } - LDB_DEVICES = 2; - LDF_DEVICES = 4; - LDB_VOLUMES = 3; - LDF_VOLUMES = 8; - LDB_ASSIGNS = 4; - LDF_ASSIGNS = 16; - LDB_ENTRY = 5; - LDF_ENTRY = 32; - LDB_DELETE = 6; - LDF_DELETE = 64; - -{ you MUST specify one of LDF_READ or LDF_WRITE } - LDB_READ = 0; - LDF_READ = 1; - LDB_WRITE = 1; - LDF_WRITE = 2; - -{ actually all but LDF_ENTRY (which is used for internal locking) } - LDF_ALL = (LDF_DEVICES+LDF_VOLUMES+LDF_ASSIGNS); - -{ error report types for ErrorReport() } - REPORT_STREAM = 0; { a stream } - REPORT_TASK = 1; { a process - unused } - REPORT_LOCK = 2; { a lock } - REPORT_VOLUME = 3; { a volume node } - REPORT_INSERT = 4; { please insert volume } - -{ Special error codes for ErrorReport() } - ABORT_DISK_ERROR = 296; { Read/write error } - ABORT_BUSY = 288; { You MUST replace... } - -{ types for initial packets to shells from run/newcli/execute/system. } -{ For shell-writers only } - RUN_EXECUTE = -1; - RUN_SYSTEM = -2; - RUN_SYSTEM_ASYNCH = -3; - -{ Types for fib_DirEntryType. NOTE that both USERDIR and ROOT are } -{ directories, and that directory/file checks should use <0 and >=0. } -{ This is not necessarily exhaustive! Some handlers may use other } -{ values as needed, though <0 and >=0 should remain as supported as } -{ possible. } - ST_ROOT = 1 ; - ST_USERDIR = 2 ; - ST_SOFTLINK = 3 ; { looks like dir, but may point to a file! } - ST_LINKDIR = 4 ; { hard link to dir } - ST_FILE = -3; { must be negative for FIB! } - ST_LINKFILE = -4; { hard link to file } - ST_PIPEFILE = -5; { for pipes that support ExamineFH } - -Type - -{ a lock structure, as returned by Lock() or DupLock() } - - pFileLock = ^tFileLock; - tFileLock = record - fl_Link : BPTR; { bcpl pointer to next lock } - fl_Key : Longint; { disk block number } - fl_Access : Longint; { exclusive or shared } - fl_Task : pMsgPort; { handler task's port } - fl_Volume : BPTR; { bptr to a DeviceList } - end; - - -{ NOTE: V37 dos.library, when doing ExAll() emulation, and V37 filesystems } -{ will return an error if passed ED_OWNER. If you get ERROR_BAD_NUMBER, } -{ retry with ED_COMMENT to get everything but owner info. All filesystems } -{ supporting ExAll() must support through ED_COMMENT, and must check Type } -{ and return ERROR_BAD_NUMBER if they don't support the type. } - -{ values that can be passed for what data you want from ExAll() } -{ each higher value includes those below it (numerically) } -{ you MUST chose one of these values } -CONST - ED_NAME = 1; - ED_TYPE = 2; - ED_SIZE = 3; - ED_PROTECTION = 4; - ED_DATE = 5; - ED_COMMENT = 6; - ED_OWNER = 7; -{ - * Structure in which exall results are returned in. Note that only the - * fields asked for will exist! - } -Type - pExAllData = ^tExAllData; - tExAllData = record - ed_Next : pExAllData; - ed_Name : STRPTR; - ed_Type, - ed_Size, - ed_Prot, - ed_Days, - ed_Mins, - ed_Ticks : ULONG; - ed_Comment : STRPTR; { strings will be after last used field } - ed_OwnerUID, { new for V39 } - ed_OwnerGID : Word; - END; - -{ - * Control structure passed to ExAll. Unused fields MUST be initialized to - * 0, expecially eac_LastKey. - * - * eac_MatchFunc is a hook (see utility.library documentation for usage) - * It should return true if the entry is to returned, false if it is to be - * ignored. - * - * This structure MUST be allocated by AllocDosObject()! - } - - pExAllControl = ^tExAllControl; - tExAllControl = record - eac_Entries, { number of entries returned in buffer } - eac_LastKey : ULONG; { Don't touch inbetween linked ExAll calls! } - eac_MatchString : STRPTR; { wildcard string for pattern match OR NULL } - eac_MatchFunc : pHook; { optional private wildcard FUNCTION } - END; - - - -{ The disk "environment" is a longword array that describes the - * disk geometry. It is variable sized, with the length at the beginning. - * Here are the constants for a standard geometry. -} - -Type - - pDosEnvec = ^tDosEnvec; - tDosEnvec = record - de_TableSize : ULONG; { Size of Environment vector } - de_SizeBlock : ULONG; { in longwords: standard value is 128 } - de_SecOrg : ULONG; { not used; must be 0 } - de_Surfaces : ULONG; { # of heads (surfaces). drive specific } - de_SectorPerBlock : ULONG; { not used; must be 1 } - de_BlocksPerTrack : ULONG; { blocks per track. drive specific } - de_Reserved : ULONG; { DOS reserved blocks at start of partition. } - de_PreAlloc : ULONG; { DOS reserved blocks at end of partition } - de_Interleave : ULONG; { usually 0 } - de_LowCyl : ULONG; { starting cylinder. typically 0 } - de_HighCyl : ULONG; { max cylinder. drive specific } - de_NumBuffers : ULONG; { Initial # DOS of buffers. } - de_BufMemType : ULONG; { type of mem to allocate for buffers } - de_MaxTransfer : ULONG; { Max number of bytes to transfer at a time } - de_Mask : ULONG; { Address Mask to block out certain memory } - de_BootPri : Longint; { Boot priority for autoboot } - de_DosType : ULONG; { ASCII (HEX) string showing filesystem type; - * 0X444F5300 is old filesystem, - * 0X444F5301 is fast file system } - de_Baud : ULONG; { Baud rate for serial handler } - de_Control : ULONG; { Control smallint for handler/filesystem } - de_BootBlocks : ULONG; { Number of blocks containing boot code } - end; - -Const - -{ these are the offsets into the array } - - DE_TABLESIZE = 0; { standard value is 11 } - DE_SIZEBLOCK = 1; { in longwords: standard value is 128 } - DE_SECORG = 2; { not used; must be 0 } - DE_NUMHEADS = 3; { # of heads (surfaces). drive specific } - DE_SECSPERBLK = 4; { not used; must be 1 } - DE_BLKSPERTRACK = 5; { blocks per track. drive specific } - DE_RESERVEDBLKS = 6; { unavailable blocks at start. usually 2 } - DE_PREFAC = 7; { not used; must be 0 } - DE_INTERLEAVE = 8; { usually 0 } - DE_LOWCYL = 9; { starting cylinder. typically 0 } - DE_UPPERCYL = 10; { max cylinder. drive specific } - DE_NUMBUFFERS = 11; { starting # of buffers. typically 5 } - DE_MEMBUFTYPE = 12; { type of mem to allocate for buffers. } - DE_BUFMEMTYPE = 12; { same as above, better name - * 1 is public, 3 is chip, 5 is fast } - DE_MAXTRANSFER = 13; { Max number bytes to transfer at a time } - DE_MASK = 14; { Address Mask to block out certain memory } - DE_BOOTPRI = 15; { Boot priority for autoboot } - DE_DOSTYPE = 16; { ASCII (HEX) string showing filesystem type; - * 0X444F5300 is old filesystem, - * 0X444F5301 is fast file system } - DE_BAUD = 17; { Baud rate for serial handler } - DE_CONTROL = 18; { Control smallint for handler/filesystem } - DE_BOOTBLOCKS = 19; { Number of blocks containing boot code } - - -{ The file system startup message is linked into a device node's startup -** field. It contains a pointer to the above environment, plus the -** information needed to do an exec OpenDevice(). -} - -Type - - pFileSysStartupMsg = ^tFileSysStartupMsg; - tFileSysStartupMsg = record - fssm_Unit : ULONG; { exec unit number for this device } - fssm_Device : BSTR; { null terminated bstring to the device name } - fssm_Environ : BPTR; { ptr to environment table (see above) } - fssm_Flags : ULONG; { flags for OpenDevice() } - end; - - -{ The include file "libraries/dosextens.h" has a DeviceList structure. - * The "device list" can have one of three different things linked onto - * it. Dosextens defines the structure for a volume. DLT_DIRECTORY - * is for an assigned directory. The following structure is for - * a dos "device" (DLT_DEVICE). -} - - pDeviceNode = ^tDeviceNode; - tDeviceNode = record - dn_Next : BPTR; { singly linked list } - dn_Type : ULONG; { always 0 for dos "devices" } - dn_Task : pMsgPort; { standard dos "task" field. If this is - * null when the node is accesses, a task - * will be started up } - dn_Lock : BPTR; { not used for devices -- leave null } - dn_Handler : BSTR; { filename to loadseg (if seglist is null) } - dn_StackSize : ULONG; { stacksize to use when starting task } - dn_Priority : Longint; { task priority when starting task } - dn_Startup : BPTR; { startup msg: FileSysStartupMsg for disks } - dn_SegList : BPTR; { code to run to start new task (if necessary). - * if null then dn_Handler will be loaded. } - dn_GlobalVec : BPTR; { BCPL global vector to use when starting - * a task. -1 means that dn_SegList is not - * for a bcpl program, so the dos won't - * try and construct one. 0 tell the - * dos that you obey BCPL linkage rules, - * and that it should construct a global - * vector for you. - } - dn_Name : BSTR; { the node name, e.g. '\3','D','F','3' } - end; - -CONST -{ use of Class and code is discouraged for the time being - we might want to - change things } -{ --- NotifyMessage Class ------------------------------------------------ } - NOTIFY_CLASS = $40000000; - -{ --- NotifyMessage Codes ------------------------------------------------ } - NOTIFY_CODE = $1234; - - -{ Sent to the application if SEND_MESSAGE is specified. } - -Type -{ Do not modify or reuse the notifyrequest while active. } -{ note: the first LONG of nr_Data has the length transfered } - - - pNotifyRequest = ^tNotifyRequest; - tNotifyRequest = record - nr_Name : pchar; - nr_FullName : pchar; - nr_UserData : ULONG; - nr_Flags : ULONG; - nr_stuff : record - case smallint of - 0 : ( nr_Msg : record - nr_Port : pMsgPort; - end ); - 1 : ( nr_Signal : record - nr_Task : pTask; - nr_SignalNum : BYTE; - nr_pad : array[0..2] of BYTE; - end ); - end; - nr_Reserved : array[0..3] of ULONG; - nr_MsgCount : ULONG; - nr_Handler : pMsgPort; - end; - - pNotifyMessage = ^tNotifyMessage; - tNotifyMessage = record - nm_ExecMessage : tMessage; - nm_Class : ULONG; - nm_Code : Word; - nm_NReq : pNotifyRequest; { don't modify the request! } - nm_DoNotTouch, { like it says! For use by handlers } - nm_DoNotTouch2 : ULONG; { ditto } - END; - - -CONST -{ --- NotifyRequest Flags ------------------------------------------------ } - NRF_SEND_MESSAGE = 1 ; - NRF_SEND_SIGNAL = 2 ; - NRF_WAIT_REPLY = 8 ; - NRF_NOTIFY_INITIAL = 16; - -{ do NOT set or remove NRF_MAGIC! Only for use by handlers! } - NRF_MAGIC = $80000000; - -{ bit numbers } - NRB_SEND_MESSAGE = 0; - NRB_SEND_SIGNAL = 1; - NRB_WAIT_REPLY = 3; - NRB_NOTIFY_INITIAL = 4; - - NRB_MAGIC = 31; - -{ Flags reserved for private use by the handler: } - NR_HANDLER_FLAGS = $ffff0000; - -{ ********************************************************************* - * - * The CSource data structure defines the input source for "ReadItem()" - * as well as the ReadArgs call. It is a publicly defined structure - * which may be used by applications which use code that follows the - * conventions defined for access. - * - * When passed to the dos.library functions, the value passed as - * struct *CSource is defined as follows: - * if ( CSource == 0) Use buffered IO "ReadChar()" as data source - * else Use CSource for input character stream - * - * The following two pseudo-code routines define how the CSource structure - * is used: - * - * long CS_ReadChar( struct CSource *CSource ) - * - * if ( CSource == 0 ) return ReadChar(); - * if ( CSource->CurChr >= CSource->Length ) return ENDSTREAMCHAR; - * return CSource->Buffer[ CSource->CurChr++ ]; - * - * - * BOOL CS_UnReadChar( struct CSource *CSource ) - * - * if ( CSource == 0 ) return UnReadChar(); - * if ( CSource->CurChr <= 0 ) return FALSE; - * CSource->CurChr--; - * return TRUE; - * - * - * To initialize a struct CSource, you set CSource->CS_Buffer to - * a string which is used as the data source, and set CS_Length to - * the number of characters in the string. Normally CS_CurChr should - * be initialized to ZERO, or left as it was from prior use as - * a CSource. - * - *********************************************************************} - -Type - pCSource = ^tCSource; - tCSource = record - CS_Buffer : STRPTR; - CS_Length, - CS_CurChr : Longint; - END; - -{ ********************************************************************* - * - * The RDArgs data structure is the input parameter passed to the DOS - * ReadArgs() function call. - * - * The RDA_Source structure is a CSource as defined above; - * if RDA_Source.CS_Buffer is non-null, RDA_Source is used as the input - * character stream to parse, else the input comes from the buffered STDIN - * calls ReadChar/UnReadChar. - * - * RDA_DAList is a private address which is used internally to track - * allocations which are freed by FreeArgs(). This MUST be initialized - * to NULL prior to the first call to ReadArgs(). - * - * The RDA_Buffer and RDA_BufSiz fields allow the application to supply - * a fixed-size buffer in which to store the parsed data. This allows - * the application to pre-allocate a buffer rather than requiring buffer - * space to be allocated. If either RDA_Buffer or RDA_BufSiz is NULL, - * the application has not supplied a buffer. - * - * RDA_ExtHelp is a text string which will be displayed instead of the - * template string, if the user is prompted for input. - * - * RDA_Flags bits control how ReadArgs() works. The flag bits are - * defined below. Defaults are initialized to ZERO. - * - *********************************************************************} - - pRDArgs = ^tRDArgs; - tRDArgs = record - RDA_Source : tCSource; { Select input source } - RDA_DAList : Longint; { PRIVATE. } - RDA_Buffer : STRPTR; { Optional string parsing space. } - RDA_BufSiz : Longint; { Size of RDA_Buffer (0..n) } - RDA_ExtHelp : STRPTR; { Optional extended help } - RDA_Flags : Longint; { Flags for any required control } - END; - -CONST - RDAB_STDIN = 0; { Use "STDIN" rather than "COMMAND LINE" } - RDAF_STDIN = 1; - RDAB_NOALLOC = 1; { If set, do not allocate extra string space.} - RDAF_NOALLOC = 2; - RDAB_NOPROMPT = 2; { Disable reprompting for string input. } - RDAF_NOPROMPT = 4; - -{ ********************************************************************* - * Maximum number of template keywords which can be in a template passed - * to ReadArgs(). IMPLEMENTOR NOTE - must be a multiple of 4. - *********************************************************************} - MAX_TEMPLATE_ITEMS = 100; - -{ ********************************************************************* - * Maximum number of MULTIARG items returned by ReadArgs(), before - * an ERROR_LINE_TOO_LONG. These two limitations are due to stack - * usage. Applications should allow "a lot" of stack to use ReadArgs(). - *********************************************************************} - MAX_MULTIARGS = 128; - -CONST -{ Modes for LockRecord/LockRecords() } - REC_EXCLUSIVE = 0; - REC_EXCLUSIVE_IMMED = 1; - REC_SHARED = 2; - REC_SHARED_IMMED = 3; - -{ struct to be passed to LockRecords()/UnLockRecords() } - -Type - pRecordLock = ^tRecordLock; - tRecordLock = record - rec_FH : BPTR; { filehandle } - rec_Offset, { offset in file } - rec_Length, { length of file to be locked } - rec_Mode : ULONG; { Type of lock } - END; - - -{ the structure in the pr_LocalVars list } -{ Do NOT allocate yourself, use SetVar()!!! This structure may grow in } -{ future releases! The list should be left in alphabetical order, and } -{ may have multiple entries with the same name but different types. } -Type - pLocalVar = ^tLocalVar; - tLocalVar = record - lv_Node : tNode; - lv_Flags : Word; - lv_Value : STRPTR; - lv_Len : ULONG; - END; - -{ - * The lv_Flags bits are available to the application. The unused - * lv_Node.ln_Pri bits are reserved for system use. - } - -CONST -{ bit definitions for lv_Node.ln_Type: } - LV_VAR = 0; { an variable } - LV_ALIAS = 1; { an alias } -{ to be or'ed into type: } - LVB_IGNORE = 7; { ignore this entry on GetVar, etc } - LVF_IGNORE = $80; - -{ definitions of flags passed to GetVar()/SetVar()/DeleteVar() } -{ bit defs to be OR'ed with the type: } -{ item will be treated as a single line of text unless BINARY_VAR is used } - GVB_GLOBAL_ONLY = 8 ; - GVF_GLOBAL_ONLY = $100; - GVB_LOCAL_ONLY = 9 ; - GVF_LOCAL_ONLY = $200; - GVB_BINARY_VAR = 10 ; { treat variable as binary } - GVF_BINARY_VAR = $400; - GVB_DONT_NULL_TERM = 11; { only with GVF_BINARY_VAR } - GVF_DONT_NULL_TERM = $800; - -{ this is only supported in >= V39 dos. V37 dos ignores this. } -{ this causes SetVar to affect ENVARC: as well as ENV:. } - GVB_SAVE_VAR = 12 ; { only with GVF_GLOBAL_VAR } - GVF_SAVE_VAR = $1000 ; - - -CONST -{ ***************************************************************************} -{ definitions for the System() call } - - SYS_Dummy = (TAG_USER + 32); - SYS_Input = (SYS_Dummy + 1); - { specifies the input filehandle } - SYS_Output = (SYS_Dummy + 2); - { specifies the output filehandle } - SYS_Asynch = (SYS_Dummy + 3); - { run asynch, close input/output on exit(!) } - SYS_UserShell = (SYS_Dummy + 4); - { send to user shell instead of boot shell } - SYS_CustomShell= (SYS_Dummy + 5); - { send to a specific shell (data is name) } -{ SYS_Error, } - - -{ ***************************************************************************} -{ definitions for the CreateNewProc() call } -{ you MUST specify one of NP_Seglist or NP_Entry. All else is optional. } - - NP_Dummy = (TAG_USER + 1000); - NP_Seglist = (NP_Dummy + 1); - { seglist of code to run for the process } - NP_FreeSeglist = (NP_Dummy + 2); - { free seglist on exit - only valid for } - { for NP_Seglist. Default is TRUE. } - NP_Entry = (NP_Dummy + 3); - { entry point to run - mutually exclusive } - { with NP_Seglist! } - NP_Input = (NP_Dummy + 4); - { filehandle - default is Open("NIL:"...) } - NP_Output = (NP_Dummy + 5); - { filehandle - default is Open("NIL:"...) } - NP_CloseInput = (NP_Dummy + 6); - { close input filehandle on exit } - { default TRUE } - NP_CloseOutput = (NP_Dummy + 7); - { close output filehandle on exit } - { default TRUE } - NP_Error = (NP_Dummy + 8); - { filehandle - default is Open("NIL:"...) } - NP_CloseError = (NP_Dummy + 9); - { close error filehandle on exit } - { default TRUE } - NP_CurrentDir = (NP_Dummy + 10); - { lock - default is parent's current dir } - NP_StackSize = (NP_Dummy + 11); - { stacksize for process - default 4000 } - NP_Name = (NP_Dummy + 12); - { name for process - default "New Process"} - NP_Priority = (NP_Dummy + 13); - { priority - default same as parent } - NP_ConsoleTask = (NP_Dummy + 14); - { consoletask - default same as parent } - NP_WindowPtr = (NP_Dummy + 15); - { window ptr - default is same as parent } - NP_HomeDir = (NP_Dummy + 16); - { home directory - default curr home dir } - NP_CopyVars = (NP_Dummy + 17); - { boolean to copy local vars-default TRUE } - NP_Cli = (NP_Dummy + 18); - { create cli structure - default FALSE } - NP_Path = (NP_Dummy + 19); - { path - default is copy of parents path } - { only valid if a cli process! } - NP_CommandName = (NP_Dummy + 20); - { commandname - valid only for CLI } - NP_Arguments = (NP_Dummy + 21); - { cstring of arguments - passed with str } - { in a0, length in d0. (copied and freed } - { on exit. Default is empty string. } - { NOTE: not operational until 2.04 - see } - { BIX/TechNotes for more info/workarounds } - { NOTE: in 2.0, it DIDN'T pass "" - the } - { registers were random. } -{ FIX! should this be only for cli's? } - NP_NotifyOnDeath = (NP_Dummy + 22); - { notify parent on death - default FALSE } - { Not functional yet. } - NP_Synchronous = (NP_Dummy + 23); - { don't return until process finishes - } - { default FALSE. } - { Not functional yet. } - NP_ExitCode = (NP_Dummy + 24); - { code to be called on process exit } - NP_ExitData = (NP_Dummy + 25); - { optional argument for NP_EndCode rtn - } - { default NULL } - - -{ ***************************************************************************} -{ tags for AllocDosObject } - - ADO_Dummy = (TAG_USER + 2000); - ADO_FH_Mode = (ADO_Dummy + 1); - { for type DOS_FILEHANDLE only } - { sets up FH for mode specified. - This can make a big difference for buffered - files. } - { The following are for DOS_CLI } - { If you do not specify these, dos will use it's preferred values } - { which may change from release to release. The BPTRs to these } - { will be set up correctly for you. Everything will be zero, } - { except cli_FailLevel (10) and cli_Background (DOSTRUE). } - { NOTE: you may also use these 4 tags with CreateNewProc. } - - ADO_DirLen = (ADO_Dummy + 2); - { size in bytes for current dir buffer } - ADO_CommNameLen= (ADO_Dummy + 3); - { size in bytes for command name buffer } - ADO_CommFileLen= (ADO_Dummy + 4); - { size in bytes for command file buffer } - ADO_PromptLen = (ADO_Dummy + 5); - { size in bytes for the prompt buffer } - -{ ***************************************************************************} -{ tags for NewLoadSeg } -{ no tags are defined yet for NewLoadSeg } - - -//PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket); -//FUNCTION AddBuffers(const name : pCHAR; number : LONGINT) : BOOLEAN; -//FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN; -//FUNCTION AddPart(dirname : pCHAR;const filename : pCHAR; size : ULONG) : BOOLEAN; -//FUNCTION AddSegment(const name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN; -//FUNCTION AllocDosObject(type_ : ULONG;const tags : pTagItem) : POINTER; -//FUNCTION AllocDosObjectTagList(type_ : ULONG;const tags : pTagItem) : POINTER; -//FUNCTION AssignAdd(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION AssignLate(const name : pCHAR;const path : pCHAR) : BOOLEAN; -//FUNCTION AssignLock(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION AssignPath(const name : pCHAR;const path : pCHAR) : BOOLEAN; -//FUNCTION AttemptLockDosList(flags : ULONG) : pDosList; -//FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN; -//FUNCTION CheckSignal(mask : LONGINT) : LONGINT; -FUNCTION Cli : pCommandLineInterface; -//FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT; -//FUNCTION CliInitRun(dp : pDosPacket) : LONGINT; -//FUNCTION CompareDates(const date1 : pDateStamp;const date2 : pDateStamp) : LONGINT; -//FUNCTION CreateDir(const name : pCHAR) : LONGINT; -//FUNCTION CreateNewProc(const tags : pTagItem) : pProcess; -//FUNCTION CreateNewProcTagList(const tags : pTagItem) : pProcess; -//FUNCTION CreateProc(const name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -//FUNCTION CurrentDir(lock : LONGINT) : LONGINT; -//PROCEDURE DateStamp(date : pDateStamp); -//FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN; -//FUNCTION DeleteFile(const name : pCHAR) : BOOLEAN; -//FUNCTION DeleteVar(const name : pCHAR; flags : ULONG) : BOOLEAN; -//FUNCTION DeviceProc(const name : pCHAR) : pMsgPort; -//FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT; -//FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT; -//FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT; -//FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT; -//FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT; -//FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT; -//PROCEDURE DOSClose(file_ : LONGINT); -PROCEDURE DOSDelay(timeout : LONGINT); -//PROCEDURE DOSExit(returnCode : LONGINT); -//FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN; -//FUNCTION DOSInput : LONGINT; -//FUNCTION DOSOpen(const name : pCHAR; accessMode : LONGINT) : LONGINT; -//FUNCTION DOSOutput : LONGINT; -//FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -//FUNCTION DOSRename(const oldName : pCHAR;const newName : pCHAR) : Boolean; -//FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT; -//FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -//FUNCTION DupLock(lock : LONGINT) : LONGINT; -//FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT; -//PROCEDURE EndNotify(notify : pNotifyRequest); -//FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN; -//FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN; -//PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl); -//FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -//FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN; -//FUNCTION Execute(const string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -//FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -//FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION FGetC(fh : LONGINT) : LONGINT; -//FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR; -//FUNCTION FilePart(const path : pCHAR) : pCHAR; -//FUNCTION FindArg(const keyword : pCHAR;const arg_template : pCHAR) : LONGINT; -//FUNCTION FindCliProc(num : ULONG) : pProcess; -//FUNCTION FindDosEntry(const dlist : pDosList;const name : pCHAR; flags : ULONG) : pDosList; -//FUNCTION FindSegment(const name : pCHAR;const seg : pSegment; system : LONGINT) : pSegment; -//FUNCTION FindVar(const name : pCHAR; type_ : ULONG) : pLocalVar; -//FUNCTION Format(const filesystem : pCHAR;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -//FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT; -//FUNCTION FPuts(fh : LONGINT;const str : pCHAR) : BOOLEAN; -//FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -//PROCEDURE FreeArgs(args : pRDArgs); -//PROCEDURE FreeDeviceProc(dp : pDevProc); -//PROCEDURE FreeDosEntry(dlist : pDosList); -//PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER); -//FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -//FUNCTION GetArgStr : pCHAR; -//FUNCTION GetConsoleTask : pMsgPort; -//FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetDeviceProc(const name : pCHAR; dp : pDevProc) : pDevProc; -//FUNCTION GetFileSysTask : pMsgPort; -//FUNCTION GetProgramDir : LONGINT; -//FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -//FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN; -//FUNCTION Inhibit(const name : pCHAR; onoff : LONGINT) : BOOLEAN; -//FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT;const funcarray : pLONGINT; VAR stack : LONGINT) : LONGINT; -//FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN; -//FUNCTION IoErr : LONGINT; -//FUNCTION IsFileSystem(const name : pCHAR) : BOOLEAN; -//FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN; -//FUNCTION LoadSeg(const name : pCHAR) : LONGINT; -//FUNCTION Lock(const name : pCHAR; type_ : LONGINT) : LONGINT; -//FUNCTION LockDosList(flags : ULONG) : pDosList; -//FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN; -//FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN; -//FUNCTION MakeDosEntry(const name : pCHAR; type_ : LONGINT) : pDosList; -//FUNCTION MakeLink(const name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN; -//PROCEDURE MatchEnd(anchor : pAnchorPath); -//FUNCTION MatchFirst(const pat : pCHAR; anchor : pAnchorPath) : LONGINT; -//FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT; -//FUNCTION MatchPattern(const pat : pCHAR; str : pCHAR) : BOOLEAN; -//FUNCTION MatchPatternNoCase(const pat : pCHAR; str : pCHAR) : BOOLEAN; -//FUNCTION MaxCli : ULONG; -//FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION NewLoadSeg(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION NewLoadSegTagList(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION NextDosEntry(const dlist : pDosList; flags : ULONG) : pDosList; -//FUNCTION OpenFromLock(lock : LONGINT) : LONGINT; -//FUNCTION ParentDir(lock : LONGINT) : LONGINT; -//FUNCTION ParentOfFH(fh : LONGINT) : LONGINT; -//FUNCTION ParsePattern(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -//FUNCTION ParsePatternNoCase(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -//FUNCTION PathPart(const path : pCHAR) : pCHAR; -//FUNCTION PrintFault(code : LONGINT;const header : pCHAR) : BOOLEAN; -//FUNCTION PutStr(const str : pCHAR) : BOOLEAN; -//FUNCTION ReadArgs(const arg_template : pCHAR; arra : pLONGINT; args : pRDArgs) : pRDArgs; -//FUNCTION ReadItem(const name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT; -//FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN; -//FUNCTION Relabel(const drive : pCHAR;const newname : pCHAR) : BOOLEAN; -//FUNCTION RemAssignList(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN; -//FUNCTION RemSegment(seg : pSegment) : BOOLEAN; -//PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT); -//FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : pCHAR; paramlen : LONGINT) : LONGINT; -//FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN; -//FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT; -//FUNCTION SelectInput(fh : LONGINT) : LONGINT; -//FUNCTION SelectOutput(fh : LONGINT) : LONGINT; -//PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort); -//FUNCTION SetArgStr(const string_ : pCHAR) : BOOLEAN; -//FUNCTION SetComment(const name : pCHAR;const comment : pCHAR) : BOOLEAN; -//FUNCTION SetConsoleTask(const task : pMsgPort) : pMsgPort; -//FUNCTION SetCurrentDirName(const name : pCHAR) : BOOLEAN; -//FUNCTION SetFileDate(const name : pCHAR; date : pDateStamp) : BOOLEAN; -//FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN; -//FUNCTION SetFileSysTask(const task : pMsgPort) : pMsgPort; -//FUNCTION SetIoErr(result : LONGINT) : LONGINT; -//FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN; -//FUNCTION SetOwner(const name : pCHAR; owner_info : LONGINT) : BOOLEAN; -//FUNCTION SetProgramDir(lock : LONGINT) : LONGINT; -//FUNCTION SetProgramName(const name : pCHAR) : BOOLEAN; -//FUNCTION SetPrompt(const name : pCHAR) : BOOLEAN; -//FUNCTION SetProtection(const name : pCHAR; protect : LONGINT) : BOOLEAN; -//FUNCTION SetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -//FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN; -//FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -//FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN; -//FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN; -//FUNCTION StrToLong(const string_ : pCHAR; VAR value : LONGINT) : LONGINT; -//FUNCTION SystemTagList(const command : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION DOSSystem(const command : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT; -//PROCEDURE UnLoadSeg(seglist : LONGINT); -PROCEDURE UnLock(lock : LONGINT); -//PROCEDURE UnLockDosList(flags : ULONG); -//FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN; -//FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN; -//FUNCTION VFPrintf(fh : LONGINT;const format : pCHAR;const argarray : POINTER) : LONGINT; -//PROCEDURE VFWritef(fh : LONGINT;const format : pCHAR;const argarray : pLONGINT); -//FUNCTION VPrintf(const format : pCHAR; const argarray : POINTER) : LONGINT; -//FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN; -//FUNCTION WaitPkt : pDosPacket; -//FUNCTION WriteChars(const buf : pCHAR; buflen : ULONG) : LONGINT; - -//FUNCTION BADDR(bval :BPTR): POINTER; -//FUNCTION MKBADDR(adr: Pointer): BPTR; - -{ overlay function and procedures} -{ -FUNCTION AddBuffers(const name : string; number : LONGINT) : BOOLEAN; -FUNCTION AddPart(dirname : string;const filename : pCHAR; size : ULONG) : BOOLEAN; -FUNCTION AddPart(dirname : pCHAR;const filename : string; size : ULONG) : BOOLEAN; -FUNCTION AddPart(dirname : string;const filename : string; size : ULONG) : BOOLEAN; -FUNCTION AssignAdd(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION AssignLate(const name : string;const path : pCHAR) : BOOLEAN; -FUNCTION AssignLate(const name : pChar;const path : string) : BOOLEAN; -FUNCTION AssignLate(const name : string;const path : string) : BOOLEAN; -FUNCTION AssignLock(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION AssignPath(const name : string; const path : pCHAR) : BOOLEAN; -FUNCTION AssignPath(const name : pCHAR;const path : string) : BOOLEAN; -FUNCTION AssignPath(const name : string;const path : string) : BOOLEAN; -FUNCTION CreateDir(const name : string) : LONGINT; -FUNCTION CreateProc(const name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -FUNCTION DeleteFile(const name : string) : BOOLEAN; -FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; -FUNCTION DeviceProc(const name : string) : pMsgPort; -FUNCTION DOSOpen(const name : string; accessMode : LONGINT) : LONGINT; -FUNCTION DOSRename(const oldName : string;const newName : pChar) : boolean; -FUNCTION DOSRename(const oldName : pCHAR;const newName : string) : Boolean; -FUNCTION DOSRename(const oldName : string;const newName : string) : Boolean; -FUNCTION Execute(const string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN; -FUNCTION FilePart(const path : string) : pCHAR; -FUNCTION FindArg(const keyword : string;const arg_template : pCHAR) : LONGINT; -FUNCTION FindArg(const keyword : pCHAR;const arg_template : string) : LONGINT; -FUNCTION FindArg(const keyword : string;const arg_template : string) : LONGINT; -FUNCTION FindDosEntry(const dlist : pDosList;const name : string; flags : ULONG) : pDosList; -FUNCTION FindSegment(const name : string;const seg : pSegment; system : LONGINT) : pSegment; -FUNCTION FindVar(const name : string; type_ : ULONG) : pLocalVar; -FUNCTION Format(const filesystem : string;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -FUNCTION Format(const filesystem : pCHAR;const volumename : string; dostype : ULONG) : BOOLEAN; -FUNCTION Format(const filesystem : string;const volumename : string; dostype : ULONG) : BOOLEAN; -FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN; -FUNCTION GetDeviceProc(const name : string; dp : pDevProc) : pDevProc; -FUNCTION GetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -FUNCTION Inhibit(const name : string; onoff : LONGINT) : BOOLEAN; -FUNCTION IsFileSystem(const name : string) : BOOLEAN; -FUNCTION LoadSeg(const name : string) : LONGINT; -FUNCTION Lock(const name : string; type_ : LONGINT) : LONGINT; -FUNCTION MakeDosEntry(const name : string; type_ : LONGINT) : pDosList; -FUNCTION MakeLink(const name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN; -FUNCTION MatchFirst(const pat : string; anchor : pAnchorPath) : LONGINT; -FUNCTION MatchPattern(const pat : string; str : pCHAR) : BOOLEAN; -FUNCTION MatchPattern(const pat : pCHAR; str : string) : BOOLEAN; -FUNCTION MatchPattern(const pat : string; str : string) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : string; str : pCHAR) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : string) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : string; str : string) : BOOLEAN; -FUNCTION NewLoadSeg(const file_ : string;const tags : pTagItem) : LONGINT; -FUNCTION NewLoadSegTagList(const file_ : string;const tags : pTagItem) : LONGINT; -FUNCTION PathPart(const path : string) : pCHAR; -FUNCTION PrintFault(code : LONGINT;const header : string) : BOOLEAN; -FUNCTION PutStr(const str : string) : BOOLEAN; -FUNCTION ReadArgs(const arg_template : string; arra : pLONGINT; args : pRDArgs) : pRDArgs; -FUNCTION ReadItem(const name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT; -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : string; buffer : pCHAR; size : ULONG) : BOOLEAN; -FUNCTION Relabel(const drive : string;const newname : pCHAR) : BOOLEAN; -FUNCTION Relabel(const drive : pCHAR;const newname : string) : BOOLEAN; -FUNCTION Relabel(const drive : string;const newname : string) : BOOLEAN; -FUNCTION RemAssignList(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : string; paramlen : LONGINT) : LONGINT; -FUNCTION SetArgStr(const string_ : string) : BOOLEAN; -FUNCTION SetComment(const name : string;const comment : pCHAR) : BOOLEAN; -FUNCTION SetComment(const name : pCHAR;const comment : string) : BOOLEAN; -FUNCTION SetComment(const name : string;const comment : string) : BOOLEAN; -FUNCTION SetCurrentDirName(const name : string) : BOOLEAN; -FUNCTION SetFileDate(const name : string; date : pDateStamp) : BOOLEAN; -FUNCTION SetOwner(const name : string; owner_info : LONGINT) : BOOLEAN; -FUNCTION SetProgramName(const name : string) : BOOLEAN; -FUNCTION SetPrompt(const name : string) : BOOLEAN; -FUNCTION SetProtection(const name : string; protect : LONGINT) : BOOLEAN; -FUNCTION SetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -FUNCTION StrToLong(const string_ : string; VAR value : LONGINT) : LONGINT; -FUNCTION SystemTagList(const command : string;const tags : pTagItem) : LONGINT; -FUNCTION DOSSystem(const command : string;const tags : pTagItem) : LONGINT; -} -IMPLEMENTATION - -uses pastoc; - - -{ -FUNCTION BADDR(bval : BPTR): POINTER; -BEGIN - BADDR := POINTER( bval shl 2); -END; - -FUNCTION MKBADDR(adr : POINTER): BPTR; -BEGIN - MKBADDR := BPTR( LONGINT(adr) shr 2); -END; - -PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L pkt,D2 - MOVEA.L _DOSBase,A6 - JSR -264(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION AddBuffers(const name : pCHAR; number : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L number,D2 - MOVEA.L _DOSBase,A6 - JSR -732(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -678(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddPart(dirname : pCHAR;const filename : pCHAR; size : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dirname,D1 - MOVE.L filename,D2 - MOVE.L size,D3 - MOVEA.L _DOSBase,A6 - JSR -882(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddSegment(const name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seg,D2 - MOVE.L system,D3 - MOVEA.L _DOSBase,A6 - JSR -774(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AllocDosObject(type_ : ULONG;const tags : pTagItem) : POINTER; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -228(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION AllocDosObjectTagList(type_ : ULONG;const tags : pTagItem) : POINTER; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -228(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION AssignAdd(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -630(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignLate(const name : pCHAR;const path : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L path,D2 - MOVEA.L _DOSBase,A6 - JSR -618(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignLock(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -612(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignPath(const name : pCHAR;const path : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L path,D2 - MOVEA.L _DOSBase,A6 - JSR -624(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AttemptLockDosList(flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -666(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L fh,D2 - MOVE.L newmode,D3 - MOVEA.L _DOSBase,A6 - JSR -450(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION CheckSignal(mask : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L mask,D1 - MOVEA.L _DOSBase,A6 - JSR -792(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Cli : pCommandLineInterface; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -492(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dp,A0 - MOVEA.L _DOSBase,A6 - JSR -930(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CliInitRun(dp : pDosPacket) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dp,A0 - MOVEA.L _DOSBase,A6 - JSR -936(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CompareDates(const date1 : pDateStamp;const date2 : pDateStamp) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L date1,D1 - MOVE.L date2,D2 - MOVEA.L _DOSBase,A6 - JSR -738(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateDir(const name : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -120(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateNewProc(const tags : pTagItem) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L tags,D1 - MOVEA.L _DOSBase,A6 - JSR -498(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateNewProcTagList(const tags : pTagItem) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L tags,D1 - MOVEA.L _DOSBase,A6 - JSR -498(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateProc(const name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L pri,D2 - MOVE.L segList,D3 - MOVE.L stackSize,D4 - MOVEA.L _DOSBase,A6 - JSR -138(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CurrentDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -126(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DateStamp(date : pDateStamp); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L date,D1 - MOVEA.L _DOSBase,A6 - JSR -192(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L datetime,D1 - MOVEA.L _DOSBase,A6 - JSR -744(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeleteFile(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -072(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeleteVar(const name : pCHAR; flags : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L flags,D2 - MOVEA.L _DOSBase,A6 - JSR -912(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeviceProc(const name : pCHAR) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -174(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVE.L arg4,D6 - MOVE.L arg5,D7 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVE.L arg4,D6 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DOSClose(file_ : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVEA.L _DOSBase,A6 - JSR -036(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DOSDelay(timeout : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L timeout,D1 - MOVEA.L _DOSBase,A6 - JSR -198(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DOSExit(returnCode : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L returnCode,D1 - MOVEA.L _DOSBase,A6 - JSR -144(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -360(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DOSInput : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -054(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSOpen(const name : pCHAR; accessMode : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L accessMode,D2 - MOVEA.L _DOSBase,A6 - JSR -030(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSOutput : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -060(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L buffer,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -042(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSRename(const oldName : pCHAR;const newName : pCHAR) : Boolean; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L oldName,D1 - MOVE.L newName,D2 - MOVEA.L _DOSBase,A6 - JSR -078(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L position,D2 - MOVE.L offset,D3 - MOVEA.L _DOSBase,A6 - JSR -066(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L buffer,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -048(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DupLock(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -096(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -372(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE EndNotify(notify : pNotifyRequest); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L notify,D1 - MOVEA.L _DOSBase,A6 - JSR -894(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L type_,D2 - MOVE.L arg1,D3 - MOVE.L device,D4 - MOVEA.L _DOSBase,A6 - JSR -480(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L data,D4 - MOVE.L control,D5 - MOVEA.L _DOSBase,A6 - JSR -432(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L data,D4 - MOVE.L control,D5 - MOVEA.L _DOSBase,A6 - JSR -990(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L fileInfoBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -102(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L fib,D2 - MOVEA.L _DOSBase,A6 - JSR -390(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Execute(const string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVE.L file_,D2 - MOVE.L file2,D3 - MOVEA.L _DOSBase,A6 - JSR -222(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L fileInfoBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -108(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L header,D2 - MOVE.L buffer,D3 - MOVE.L len,D4 - MOVEA.L _DOSBase,A6 - JSR -468(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FGetC(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -306(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -336(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FilePart(const path : pCHAR) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L path,D1 - MOVEA.L _DOSBase,A6 - JSR -870(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindArg(const keyword : pCHAR;const arg_template : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L keyword,D1 - MOVE.L arg_template,D2 - MOVEA.L _DOSBase,A6 - JSR -804(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindCliProc(num : ULONG) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L num,D1 - MOVEA.L _DOSBase,A6 - JSR -546(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindDosEntry(const dlist : pDosList;const name : pCHAR; flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVE.L name,D2 - MOVE.L flags,D3 - MOVEA.L _DOSBase,A6 - JSR -684(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindSegment(const name : pCHAR;const seg : pSegment; system : LONGINT) : pSegment; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seg,D2 - MOVE.L system,D3 - MOVEA.L _DOSBase,A6 - JSR -780(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindVar(const name : pCHAR; type_ : ULONG) : pLocalVar; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -918(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Format(const filesystem : pCHAR;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L filesystem,D1 - MOVE.L volumename,D2 - MOVE.L dostype,D3 - MOVEA.L _DOSBase,A6 - JSR -714(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L ch,D2 - MOVEA.L _DOSBase,A6 - JSR -312(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FPuts(fh : LONGINT;const str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -342(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L block,D2 - MOVE.L blocklen,D3 - MOVE.L number,D4 - MOVEA.L _DOSBase,A6 - JSR -324(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE FreeArgs(args : pRDArgs); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L args,D1 - MOVEA.L _DOSBase,A6 - JSR -858(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDeviceProc(dp : pDevProc); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVEA.L _DOSBase,A6 - JSR -648(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDosEntry(dlist : pDosList); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -702(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L ptr,D2 - MOVEA.L _DOSBase,A6 - JSR -234(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L block,D2 - MOVE.L blocklen,D3 - MOVE.L number,D4 - MOVEA.L _DOSBase,A6 - JSR -330(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetArgStr : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -534(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetConsoleTask : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -510(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -564(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetDeviceProc(const name : pCHAR; dp : pDevProc) : pDevProc; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L dp,D2 - MOVEA.L _DOSBase,A6 - JSR -642(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetFileSysTask : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -522(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetProgramDir : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -600(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -576(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -588(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L flags,D4 - MOVEA.L _DOSBase,A6 - JSR -906(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L parameterBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -114(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Inhibit(const name : pCHAR; onoff : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L onoff,D2 - MOVEA.L _DOSBase,A6 - JSR -726(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT;const funcarray : pLONGINT; VAR stack : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D0 - MOVEA.L table,A0 - MOVEA.L funcarray,A1 - MOVEA.L stack,A2 - MOVEA.L _DOSBase,A6 - JSR -756(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seglist,D1 - MOVEA.L freefunc,A1 - MOVEA.L _DOSBase,A6 - JSR -762(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION IoErr : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -132(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION IsFileSystem(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -708(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVEA.L _DOSBase,A6 - JSR -216(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION LoadSeg(const name : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -150(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Lock(const name : pCHAR; type_ : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -084(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION LockDosList(flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -654(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L offset,D2 - MOVE.L length,D3 - MOVE.L mode,D4 - MOVE.L timeout,D5 - MOVEA.L _DOSBase,A6 - JSR -270(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L recArray,D1 - MOVE.L timeout,D2 - MOVEA.L _DOSBase,A6 - JSR -276(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MakeDosEntry(const name : pCHAR; type_ : LONGINT) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -696(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MakeLink(const name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L dest,D2 - MOVE.L soft,D3 - MOVEA.L _DOSBase,A6 - JSR -444(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE MatchEnd(anchor : pAnchorPath); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L anchor,D1 - MOVEA.L _DOSBase,A6 - JSR -834(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION MatchFirst(const pat : pCHAR; anchor : pAnchorPath) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L anchor,D2 - MOVEA.L _DOSBase,A6 - JSR -822(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L anchor,D1 - MOVEA.L _DOSBase,A6 - JSR -828(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MatchPattern(const pat : pCHAR; str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -846(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -972(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MaxCli : ULONG; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -552(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buffer,D2 - MOVE.L len,D3 - MOVEA.L _DOSBase,A6 - JSR -408(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L len,D3 - MOVEA.L _DOSBase,A6 - JSR -402(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION NewLoadSeg(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -768(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NewLoadSegTagList(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -768(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NextDosEntry(const dlist : pDosList; flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVE.L flags,D2 - MOVEA.L _DOSBase,A6 - JSR -690(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION OpenFromLock(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -378(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParentDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -210(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParentOfFH(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -384(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParsePattern(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -840(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParsePatternNoCase(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -966(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION PathPart(const path : pCHAR) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L path,D1 - MOVEA.L _DOSBase,A6 - JSR -876(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION PrintFault(code : LONGINT;const header : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L header,D2 - MOVEA.L _DOSBase,A6 - JSR -474(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION PutStr(const str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L str,D1 - MOVEA.L _DOSBase,A6 - JSR -948(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ReadArgs(const arg_template : pCHAR; arra : pLONGINT; args : pRDArgs) : pRDArgs; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L arg_template,D1 - MOVE.L arra,D2 - MOVE.L args,D3 - MOVEA.L _DOSBase,A6 - JSR -798(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ReadItem(const name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L maxchars,D2 - MOVE.L cSource,D3 - MOVEA.L _DOSBase,A6 - JSR -810(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L lock,D2 - MOVE.L path,D3 - MOVE.L buffer,D4 - MOVE.L size,D5 - MOVEA.L _DOSBase,A6 - JSR -438(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Relabel(const drive : pCHAR;const newname : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L drive,D1 - MOVE.L newname,D2 - MOVEA.L _DOSBase,A6 - JSR -720(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemAssignList(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -636(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -672(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemSegment(seg : pSegment) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seg,D1 - MOVEA.L _DOSBase,A6 - JSR -786(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVE.L res1,D2 - MOVE.L res2,D3 - MOVEA.L _DOSBase,A6 - JSR -258(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : pCHAR; paramlen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seg,D1 - MOVE.L stack,D2 - MOVE.L paramptr,D3 - MOVE.L paramlen,D4 - MOVEA.L _DOSBase,A6 - JSR -504(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock1,D1 - MOVE.L lock2,D2 - MOVEA.L _DOSBase,A6 - JSR -984(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock1,D1 - MOVE.L lock2,D2 - MOVEA.L _DOSBase,A6 - JSR -420(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SelectInput(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -294(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SelectOutput(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -300(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVE.L port,D2 - MOVE.L replyport,D3 - MOVEA.L _DOSBase,A6 - JSR -246(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION SetArgStr(const string_ : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVEA.L _DOSBase,A6 - JSR -540(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetComment(const name : pCHAR;const comment : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L comment,D2 - MOVEA.L _DOSBase,A6 - JSR -180(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetConsoleTask(const task : pMsgPort) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L task,D1 - MOVEA.L _DOSBase,A6 - JSR -516(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetCurrentDirName(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -558(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileDate(const name : pCHAR; date : pDateStamp) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L date,D2 - MOVEA.L _DOSBase,A6 - JSR -396(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L pos,D2 - MOVE.L mode,D3 - MOVEA.L _DOSBase,A6 - JSR -456(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileSysTask(const task : pMsgPort) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L task,D1 - MOVEA.L _DOSBase,A6 - JSR -528(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetIoErr(result : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L result,D1 - MOVEA.L _DOSBase,A6 - JSR -462(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L mode,D2 - MOVEA.L _DOSBase,A6 - JSR -426(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetOwner(const name : pCHAR; owner_info : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L owner_info,D2 - MOVEA.L _DOSBase,A6 - JSR -996(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetProgramDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -594(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetProgramName(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -570(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetPrompt(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -582(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetProtection(const name : pCHAR; protect : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L protect,D2 - MOVEA.L _DOSBase,A6 - JSR -186(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L flags,D4 - MOVEA.L _DOSBase,A6 - JSR -900(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buff,D2 - MOVE.L type_,D3 - MOVE.L size,D4 - MOVEA.L _DOSBase,A6 - JSR -366(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seperator,D2 - MOVE.L buf,D3 - MOVE.L oldpos,D4 - MOVE.L size,D5 - MOVEA.L _DOSBase,A6 - JSR -414(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L notify,D1 - MOVEA.L _DOSBase,A6 - JSR -888(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L datetime,D1 - MOVEA.L _DOSBase,A6 - JSR -750(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION StrToLong(const string_ : pCHAR; VAR value : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVE.L value,D2 - MOVEA.L _DOSBase,A6 - JSR -816(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SystemTagList(const command : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L command,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -606(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSSystem(const command : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L command,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -606(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L character,D2 - MOVEA.L _DOSBase,A6 - JSR -318(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE UnLoadSeg(seglist : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seglist,D1 - MOVEA.L _DOSBase,A6 - JSR -156(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnLock(lock : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -090(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnLockDosList(flags : ULONG); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -660(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L offset,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -282(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L recArray,D1 - MOVEA.L _DOSBase,A6 - JSR -288(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION VFPrintf(fh : LONGINT;const format : pCHAR;const argarray : POINTER) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L format,D2 - MOVE.L argarray,D3 - MOVEA.L _DOSBase,A6 - JSR -354(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE VFWritef(fh : LONGINT;const format : pCHAR;const argarray : pLONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L format,D2 - MOVE.L argarray,D3 - MOVEA.L _DOSBase,A6 - JSR -348(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION VPrintf(const format : pCHAR; const argarray : POINTER) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L format,D1 - MOVE.L argarray,D2 - MOVEA.L _DOSBase,A6 - JSR -954(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L timeout,D2 - MOVEA.L _DOSBase,A6 - JSR -204(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION WaitPkt : pDosPacket; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -252(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WriteChars(const buf : pCHAR; buflen : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L buflen,D2 - MOVEA.L _DOSBase,A6 - JSR -942(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - - -FUNCTION AddBuffers(const name : string; number : LONGINT) : BOOLEAN; -begin - AddBuffers := AddBuffers(pas2c(name), number); -end; - -FUNCTION AddPart(dirname : string;const filename : pCHAR; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(pas2c(dirname),filename,size); -end; - -FUNCTION AddPart(dirname : pCHAR;const filename : string; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(dirname,pas2c(filename),size); -end; - -FUNCTION AddPart(dirname : string;const filename : string; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(pas2c(dirname),pas2c(filename),size); -end; - -FUNCTION AssignAdd(const name : string; lock : LONGINT) : BOOLEAN; -begin - AssignAdd := AssignAdd(pas2c(name),lock); -end; - -FUNCTION AssignLate(const name : string;const path : pCHAR) : BOOLEAN; -begin - AssignLate := AssignLate(pas2c(name),path); -end; - -FUNCTION AssignLate(const name : pChar;const path : string) : BOOLEAN; -begin - AssignLate := AssignLate(name,pas2c(path)); -end; - -FUNCTION AssignLate(const name : string;const path : string) : BOOLEAN; -begin - AssignLate := AssignLate(pas2c(name),pas2c(path)); -end; - -FUNCTION AssignLock(const name : string; lock : LONGINT) : BOOLEAN; -begin - AssignLock := AssignLock(pas2c(name),lock); -end; - -FUNCTION AssignPath(const name : string;const path : pCHAR) : BOOLEAN; -begin - AssignPath := AssignPath(pas2c(name),path); -end; - -FUNCTION AssignPath(const name : pCHAR;const path : string) : BOOLEAN; -begin - AssignPath := AssignPath(name,pas2c(path)); -end; - -FUNCTION AssignPath(const name : string;const path : string) : BOOLEAN; -begin - AssignPath := AssignPath(pas2c(name),pas2c(path)); -end; - -FUNCTION CreateDir(const name : string) : LONGINT; -begin - CreateDir := CreateDir(pas2c(name)); -end; - -FUNCTION CreateProc(const name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -begin - CreateProc := CreateProc(pas2c(name),pri,segList,stackSize); -end; - -FUNCTION DeleteFile(const name : string) : BOOLEAN; -begin - DeleteFile := DeleteFile(pas2c(name)); -end; - -FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; -begin - DeleteVar := DeleteVar(pas2c(name),flags); -end; - -FUNCTION DeviceProc(const name : string) : pMsgPort; -begin - Deviceproc := DeviceProc(pas2c(name)); -end; - -FUNCTION DOSOpen(const name : string; accessMode : LONGINT) : LONGINT; -begin - DOSOpen := DOSOpen(pas2c(name),accessMode); -end; - -FUNCTION DOSRename(const oldName : string;const newName : pCHAR) : Boolean; -begin - DOSRename := DOSRename(pas2c(oldName),newName); -end; - -FUNCTION DOSRename(const oldName : pCHAR;const newName : string) : Boolean; -begin - DOSRename := DOSRename(oldName,pas2c(newName)); -end; - -FUNCTION DOSRename(const oldName : string;const newName : string) : Boolean; -begin - DOSRename := DOSRename(pas2c(oldName),pas2c(newName)); -end; - -FUNCTION Execute(const string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -begin - Execute := Execute(pas2c(string_),file_ ,file2); -end; - -FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN; -begin - Fault := Fault(code,pas2c(header),buffer,len); -end; - -FUNCTION FilePart(const path : string) : pCHAR; -begin - FilePart := FilePart(pas2c(path)); -end; - -FUNCTION FindArg(const keyword : string;const arg_template : pCHAR) : LONGINT; -begin - FindArg := FindArg(pas2c(keyword),arg_template); -end; - -FUNCTION FindArg(const keyword : pCHAR;const arg_template : string) : LONGINT; -begin - FindArg := FindArg(keyword,pas2c(arg_template)); -end; - -FUNCTION FindArg(const keyword : string;const arg_template : string) : LONGINT; -begin - FindArg := FindArg(pas2c(keyword),pas2c(arg_template)); -end; - -FUNCTION FindDosEntry(const dlist : pDosList;const name : string; flags : ULONG) : pDosList; -begin - FindDosEntry := FindDosEntry(dlist,pas2c(name),flags); -end; - -FUNCTION FindSegment(const name : string;const seg : pSegment; system : LONGINT) : pSegment; -begin - FindSegment := FindSegment(pas2c(name),seg,system); -end; - -FUNCTION FindVar(const name : string; type_ : ULONG) : pLocalVar; -begin - FindVar := FindVar(pas2c(name),type_); -end; - -FUNCTION Format(const filesystem : string;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -begin - Format := Format(pas2c(filesystem),volumename,dostype); -end; - -FUNCTION Format(const filesystem : pCHAR;const volumename : string; dostype : ULONG) : BOOLEAN; -begin - Format := Format(filesystem,pas2c(volumename),dostype); -end; - -FUNCTION Format(const filesystem : string;const volumename : string; dostype : ULONG) : BOOLEAN; -begin - Format := Format(pas2c(filesystem),pas2c(volumename),dostype); -end; - -FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN; -begin - FPuts := FPuts(fh,pas2c(str)); -end; - -FUNCTION GetDeviceProc(const name : string; dp : pDevProc) : pDevProc; -begin - GetDeviceProc := GetDeviceProc(pas2c(name),dp); -end; - -FUNCTION GetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -begin - GetVar := GetVar(pas2c(name),buffer,size,flags); -end; - -FUNCTION Inhibit(const name : string; onoff : LONGINT) : BOOLEAN; -begin - Inhibit := Inhibit(pas2c(name),onoff); -end; - -FUNCTION IsFileSystem(const name : string) : BOOLEAN; -begin - IsFileSystem := IsFileSystem(pas2c(name)); -end; - -FUNCTION LoadSeg(const name : string) : LONGINT; -begin - LoadSeg := LoadSeg(pas2c(name)); -end; - -FUNCTION Lock(const name : string; type_ : LONGINT) : LONGINT; -begin - Lock := Lock(pas2c(name),type_); -end; - -FUNCTION MakeDosEntry(const name : string; type_ : LONGINT) : pDosList; -begin - MakeDosEntry := MakeDosEntry(pas2c(name),type_); -end; - -FUNCTION MakeLink(const name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN; -begin - MakeLink := MakeLink(pas2c(name),dest,soft); -end; - -FUNCTION MatchFirst(const pat : string; anchor : pAnchorPath) : LONGINT; -begin - MatchFirst := MatchFirst(pas2c(pat),anchor); -end; - -FUNCTION MatchPattern(const pat : string; str : pCHAR) : BOOLEAN; -begin - MatchPattern := MatchPattern(pas2c(pat),str); -end; - -FUNCTION MatchPattern(const pat : pCHAR; str : string) : BOOLEAN; -begin - MatchPattern := MatchPattern(pat,pas2c(str)); -end; - -FUNCTION MatchPattern(const pat : string; str : string) : BOOLEAN; -begin - MatchPattern := MatchPattern(pas2c(pat),pas2c(str)); -end; - -FUNCTION MatchPatternNoCase(const pat : string; str : pCHAR) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),str); -end; - -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : string) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pat,pas2c(str)); -end; - -FUNCTION MatchPatternNoCase(const pat : string; str : string) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),pas2c(str)); -end; - -FUNCTION NewLoadSeg(const file_ : string;const tags : pTagItem) : LONGINT; -begin - NewLoadSeg := NewLoadSeg(pas2c(file_),tags); -end; - -FUNCTION NewLoadSegTagList(const file_ : string;const tags : pTagItem) : LONGINT; -begin - NewLoadSegTagList := NewLoadSegTagList(pas2c(file_),tags); -end; - -FUNCTION PathPart(const path : string) : pCHAR; -begin - PathPart := PathPart(pas2c(path)); -end; - -FUNCTION PrintFault(code : LONGINT;const header : string) : BOOLEAN; -begin - PrintFault := PrintFault(code,pas2c(header)); -end; - -FUNCTION PutStr(const str : string) : BOOLEAN; -begin - PutStr := PutStr(pas2c(str)); -end; - -FUNCTION ReadArgs(const arg_template : string; arra : pLONGINT; args : pRDArgs) : pRDArgs; -begin - ReadArgs := ReadArgs(pas2c(arg_template),arra,args); -end; - -FUNCTION ReadItem(const name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT; -begin - ReadItem := ReadItem(pas2c(name),maxchars,cSource); -end; - -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : string; buffer : pCHAR; size : ULONG) : BOOLEAN; -begin - ReadLink := ReadLink(port,lock,pas2c(path),buffer,size); -end; - -FUNCTION Relabel(const drive : string;const newname : pCHAR) : BOOLEAN; -begin - Relabel := Relabel(pas2c(drive),newname); -end; - -FUNCTION Relabel(const drive : pCHAR;const newname : string) : BOOLEAN; -begin - Relabel := Relabel(drive,pas2c(newname)); -end; - -FUNCTION Relabel(const drive : string;const newname : string) : BOOLEAN; -begin - Relabel := Relabel(pas2c(drive),pas2c(newname)); -end; - -FUNCTION RemAssignList(const name : string; lock : LONGINT) : BOOLEAN; -begin - RemAssignList := RemAssignList(pas2c(name),lock); -end; - -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : string; paramlen : LONGINT) : LONGINT; -begin - RunCommand := RunCommand(seg,stack,pas2c(paramptr),paramlen); -end; - -FUNCTION SetArgStr(const string_ : string) : BOOLEAN; -begin - SetArgStr := SetArgStr(pas2c(string_)); -end; - -FUNCTION SetComment(const name : string;const comment : pCHAR) : BOOLEAN; -begin - SetComment := SetComment(pas2c(name),comment); -end; - -FUNCTION SetComment(const name : pCHAR;const comment : string) : BOOLEAN; -begin - SetComment := SetComment(name,pas2c(comment)); -end; - -FUNCTION SetComment(const name : string;const comment : string) : BOOLEAN; -begin - SetComment := SetComment(pas2c(name),pas2c(comment)); -end; - -FUNCTION SetCurrentDirName(const name : string) : BOOLEAN; -begin - SetCurrentDirName := SetCurrentDirName(pas2c(name)); -end; - -FUNCTION SetFileDate(const name : string; date : pDateStamp) : BOOLEAN; -begin - SetFileDate := SetFileDate(pas2c(name),date); -end; - -FUNCTION SetOwner(const name : string; owner_info : LONGINT) : BOOLEAN; -begin - SetOwner := SetOwner(pas2c(name),owner_info); -end; - -FUNCTION SetProgramName(const name : string) : BOOLEAN; -begin - SetProgramName := SetProgramName(pas2c(name)); -end; - -FUNCTION SetPrompt(const name : string) : BOOLEAN; -begin - SetPrompt := SetPrompt(pas2c(name)); -end; - -FUNCTION SetProtection(const name : string; protect : LONGINT) : BOOLEAN; -begin - SetProtection := SetProtection(pas2c(name),protect); -end; - -FUNCTION SetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -begin - SetVar := SetVar(pas2c(name),buffer,size,flags); -end; - -FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -begin - SplitName := SplitName(pas2c(name), seperator,buf,oldpos,size); -end; - -FUNCTION StrToLong(const string_ : string; VAR value : LONGINT) : LONGINT; -begin - StrToLong := StrToLong(pas2c(string_),value); -end; - -FUNCTION SystemTagList(const command : string;const tags : pTagItem) : LONGINT; -begin - SystemTagList := SystemTagList(pas2c(command),tags); -end; - -FUNCTION DOSSystem(const command : string;const tags : pTagItem) : LONGINT; -begin - DOSSystem := DOSSystem(pas2c(command),tags); -end; -} - -FUNCTION Cli : pCommandLineInterface; -type - TLocalCall = function(LibBase: Pointer): pCommandLineInterface; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 82)); - Cli := Call(AOS_DOSBase); -end; - -PROCEDURE UnLock(lock : LONGINT); -type - TLocalCall = procedure(lock : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 15)); - Call(lock, AOS_DOSBase); -end; - -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -type - TLocalCall = function(lock : LONGINT; buffer : pCHAR; len : LONGINT; LibBase: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 67)); - NameFromLock := Call(lock, buffer, len, AOS_DOSBase); -end; - -PROCEDURE DOSDelay(timeout : LONGINT); -type - TLocalCall = procedure(timeout : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 33)); - Call(timeout, AOS_DOSBase); -end; - - -END. (* UNIT DOS *) - - diff --git a/packages/arosunits/src/asl.pas b/packages/arosunits/src/asl.pas index 6d7756819a..51508f57d1 100644 --- a/packages/arosunits/src/asl.pas +++ b/packages/arosunits/src/asl.pas @@ -572,7 +572,7 @@ IMPLEMENTATION FUNCTION AllocAslRequestA(reqType : ULONG; tagList : pTagItem) : POINTER; type - TLocalCall = function(reqType : ULONG; tagList : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(reqType : ULONG; tagList : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -582,7 +582,7 @@ end; FUNCTION AllocFileRequest : pFileRequester; type - TLocalCall = function(Base: Pointer): pFileRequester; stdcall; + TLocalCall = function(Base: Pointer): pFileRequester; cdecl; var Call: TLocalCall; begin @@ -592,7 +592,7 @@ end; FUNCTION AslRequestA(requester : POINTER; tagList : pTagItem) : BOOLEAN; type - TLocalCall = function(requester : POINTER; tagList : pTagItem; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(requester : POINTER; tagList : pTagItem; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -602,7 +602,7 @@ end; PROCEDURE FreeAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -612,7 +612,7 @@ end; PROCEDURE FreeFileRequest(fileReq : pFileRequester); type - TLocalCall = procedure(fileReq : pFileRequester; Base: Pointer); stdcall; + TLocalCall = procedure(fileReq : pFileRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -622,7 +622,7 @@ end; FUNCTION RequestFile(fileReq : pFileRequester) : BOOLEAN; type - TLocalCall = function(fileReq : pFileRequester; Base: Pointer) : BOOLEAN; stdcall; + TLocalCall = function(fileReq : pFileRequester; Base: Pointer) : BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -632,7 +632,7 @@ end; PROCEDURE AbortAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -642,7 +642,7 @@ end; PROCEDURE ActivateAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/diskfont.pas b/packages/arosunits/src/diskfont.pas index 2ccbf33908..f685048a8c 100644 --- a/packages/arosunits/src/diskfont.pas +++ b/packages/arosunits/src/diskfont.pas @@ -152,7 +152,7 @@ IMPLEMENTATION function AvailFonts(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT) : LONGINT; type - TLocalCall = function(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -163,7 +163,7 @@ end; procedure DisposeFontContents(fontContentsHeader : pFontContentsHeader); type - TLocalCall = procedure(fontContentsHeader : pFontContentsHeader; Base: Pointer); stdcall; + TLocalCall = procedure(fontContentsHeader : pFontContentsHeader; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -173,7 +173,7 @@ end; function NewFontContents(fontsLock : BPTR; fontName : pCHAR) : pFontContentsHeader; type - TLocalCall = function(fontsLock : BPTR; fontName : pCHAR; Base: Pointer): pFontContentsHeader; stdcall; + TLocalCall = function(fontsLock : BPTR; fontName : pCHAR; Base: Pointer): pFontContentsHeader; cdecl; var Call: TLocalCall; begin @@ -183,7 +183,7 @@ end; function NewScaledDiskFont(sourceFont : pTextFont; destTextAttr : pTextAttr) : pDiskFontHeader; type - TLocalCall = function(sourceFont : pTextFont; destTextAttr : pTextAttr; Base: Pointer): pDiskFontHeader; stdcall; + TLocalCall = function(sourceFont : pTextFont; destTextAttr : pTextAttr; Base: Pointer): pDiskFontHeader; cdecl; var Call: TLocalCall; begin @@ -193,7 +193,7 @@ end; function OpenDiskFont(textAttr : pTextAttr) : pTextFont; type - TLocalCall = function(textAttr : pTextAttr; Base: Pointer): pTextFont; stdcall; + TLocalCall = function(textAttr : pTextAttr; Base: Pointer): pTextFont; cdecl; var Call: TLocalCall; begin @@ -203,7 +203,7 @@ end; { function GetDiskFontCtrl(tagid : LONGINT) : LONGINT; type - TLocalCall = function(tagid : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(tagid : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -213,7 +213,7 @@ end; procedure SetDiskFontCtrlA(taglist : pTagItem); type - TLocalCall = procedure(taglist : pTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(taglist : pTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/gadtools.pas b/packages/arosunits/src/gadtools.pas index f2a57596b7..be8b680500 100644 --- a/packages/arosunits/src/gadtools.pas +++ b/packages/arosunits/src/gadtools.pas @@ -755,7 +755,7 @@ END; } FUNCTION CreateContext(glistptr : pGadget): pGadget; type - TLocalCall = function(glistptr : pGadget; Base: Pointer): pGadget; stdcall; + TLocalCall = function(glistptr : pGadget; Base: Pointer): pGadget; cdecl; var Call: TLocalCall; begin @@ -765,7 +765,7 @@ end; FUNCTION CreateGadgetA(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem) : pGadget; type - TLocalCall = function(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem; Base: Pointer): pGadget; stdcall; + TLocalCall = function(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem; Base: Pointer): pGadget; cdecl; var Call: TLocalCall; begin @@ -776,7 +776,7 @@ end; PROCEDURE FreeGadgets(gad : pGadget); type - TLocalCall = procedure(gad : pGadget; Base: Pointer); stdcall; + TLocalCall = procedure(gad : pGadget; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -786,7 +786,7 @@ end; PROCEDURE GT_RefreshWindow(win : pWindow; req : pRequester); type - TLocalCall = procedure(win : pWindow; req : pRequester; Base: Pointer); stdcall; + TLocalCall = procedure(win : pWindow; req : pRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -796,7 +796,7 @@ end; FUNCTION GetVisualInfoA(screen : pScreen;const taglist : pTagItem) : POINTER; type - TLocalCall = function(screen : pScreen;const taglist : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(screen : pScreen;const taglist : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -806,7 +806,7 @@ end; PROCEDURE FreeVisualInfo(vi : POINTER); type - TLocalCall = procedure(vi : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(vi : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -816,7 +816,7 @@ end; FUNCTION GT_GetGadgetAttrsA(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem) : LONGINT; type - TLocalCall = function(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -826,7 +826,7 @@ end; PROCEDURE GT_SetGadgetAttrsA(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem); type - TLocalCall = procedure(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/layers.pas b/packages/arosunits/src/layers.pas deleted file mode 100644 index 7d41e8f2ea..0000000000 --- a/packages/arosunits/src/layers.pas +++ /dev/null @@ -1,568 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - History: - - Added the defines use_amiga_smartlink and - use_auto_openlib. Implemented autoopening - of the library. - 14 Jan 2003. - - Update for AmigaOS 3.9. - Changed start code for unit. - 06 Feb 2003. - - Changed integer > smallint, - cardinal > longword. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se -} - -UNIT layers; - -INTERFACE -USES exec, agraphics, utility; - -const - - LAYERSIMPLE = 1; - LAYERSMART = 2; - LAYERSUPER = 4; - LAYERUPDATING = $10; - LAYERBACKDROP = $40; - LAYERREFRESH = $80; - LAYER_CLIPRECTS_LOST = $100; { during BeginUpdate } - { or during layerop } - { this happens if out of memory } - LMN_REGION = -1; - -type - pLayer_Info = ^tLayer_Info; - tLayer_Info = record - top_layer : pLayer; - check_lp : pLayer; { !! Private !! } - obs : pClipRect; - FreeClipRects : pClipRect; { !! Private !! } - PrivateReserve1, { !! Private !! } - PrivateReserve2 : Longint; { !! Private !! } - Lock : tSignalSemaphore; { !! Private !! } - gs_Head : tMinList; { !! Private !! } - PrivateReserve3 : smallint; { !! Private !! } - PrivateReserve4 : Pointer; { !! Private !! } - Flags : WORD; - fatten_count : Shortint; { !! Private !! } - LockLayersCount : Shortint; { !! Private !! } - PrivateReserve5 : smallint; { !! Private !! } - BlankHook, { !! Private !! } - LayerInfo_extra : Pointer; { !! Private !! } - end; - -const - NEWLAYERINFO_CALLED = 1; - -{ - * LAYERS_NOBACKFILL is the value needed to get no backfill hook - * LAYERS_BACKFILL is the value needed to get the default backfill hook - } - LAYERS_NOBACKFILL = 1; - LAYERS_BACKFILL = 0; - - LAYERSNAME : PChar = 'layers.library'; - -VAR LayersBase : pLibrary; -{ -FUNCTION BeginUpdate(l : pLayer) : LONGINT; -FUNCTION BehindLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -FUNCTION CreateBehindHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -FUNCTION CreateBehindLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -FUNCTION CreateUpfrontHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -FUNCTION CreateUpfrontLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -FUNCTION DeleteLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -PROCEDURE DisposeLayerInfo(li : pLayer_Info); -PROCEDURE DoHookClipRects(hook : pHook; rport : pRastPort;const rect : pRectangle); -PROCEDURE EndUpdate(layer : pLayer; flag : ULONG); -FUNCTION FattenLayerInfo(li : pLayer_Info) : LONGINT; -PROCEDURE InitLayers(li : pLayer_Info); -FUNCTION InstallClipRegion(layer : pLayer;const region : pRegion) : pRegion; -FUNCTION InstallLayerHook(layer : pLayer; hook : pHook) : pHook; -FUNCTION InstallLayerInfoHook(li : pLayer_Info;const hook : pHook) : pHook; -PROCEDURE LockLayer(dummy : LONGINT; layer : pLayer); -PROCEDURE LockLayerInfo(li : pLayer_Info); -PROCEDURE LockLayers(li : pLayer_Info); -FUNCTION MoveLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -FUNCTION MoveLayerInFrontOf(layer_to_move : pLayer; other_layer : pLayer) : LONGINT; -FUNCTION MoveSizeLayer(layer : pLayer; dx : LONGINT; dy : LONGINT; dw : LONGINT; dh : LONGINT) : LONGINT; -FUNCTION NewLayerInfo : pLayer_Info; -PROCEDURE ScrollLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT); -FUNCTION SizeLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -PROCEDURE SortLayerCR(layer : pLayer; dx : LONGINT; dy : LONGINT); -PROCEDURE SwapBitsRastPortClipRect(rp : pRastPort; cr : pClipRect); -PROCEDURE ThinLayerInfo(li : pLayer_Info); -PROCEDURE UnlockLayer(layer : pLayer); -PROCEDURE UnlockLayerInfo(li : pLayer_Info); -PROCEDURE UnlockLayers(li : pLayer_Info); -FUNCTION UpfrontLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -FUNCTION WhichLayer(li : pLayer_Info; x : LONGINT; y : LONGINT) : pLayer; -} -{Here we read how to compile this unit} -{You can remove this include and use a define instead} - -{This is a variable that knows how the unit is compiled} -var - LAYERSIsCompiledHow : longint; - -IMPLEMENTATION - - -{ - -FUNCTION BeginUpdate(l : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L l,A0 - MOVEA.L LayersBase,A6 - JSR -078(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION BehindLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -054(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateBehindHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L hook,A3 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -192(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateBehindLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -042(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateUpfrontHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L hook,A3 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -186(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateUpfrontLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -036(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DeleteLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -090(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DisposeLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -150(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DoHookClipRects(hook : pHook; rport : pRastPort;const rect : pRectangle); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L hook,A0 - MOVEA.L rport,A1 - MOVEA.L rect,A2 - MOVEA.L LayersBase,A6 - JSR -216(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE EndUpdate(layer : pLayer; flag : ULONG); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L flag,D0 - MOVEA.L LayersBase,A6 - JSR -084(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION FattenLayerInfo(li : pLayer_Info) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -156(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE InitLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -030(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION InstallClipRegion(layer : pLayer;const region : pRegion) : pRegion; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L region,A1 - MOVEA.L LayersBase,A6 - JSR -174(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InstallLayerHook(layer : pLayer; hook : pHook) : pHook; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L hook,A1 - MOVEA.L LayersBase,A6 - JSR -198(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InstallLayerInfoHook(li : pLayer_Info;const hook : pHook) : pHook; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L hook,A1 - MOVEA.L LayersBase,A6 - JSR -204(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE LockLayer(dummy : LONGINT; layer : pLayer); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -096(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE LockLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -120(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE LockLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -108(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION MoveLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -060(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MoveLayerInFrontOf(layer_to_move : pLayer; other_layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer_to_move,A0 - MOVEA.L other_layer,A1 - MOVEA.L LayersBase,A6 - JSR -168(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MoveSizeLayer(layer : pLayer; dx : LONGINT; dy : LONGINT; dw : LONGINT; dh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVE.L dw,D2 - MOVE.L dh,D3 - MOVEA.L LayersBase,A6 - JSR -180(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NewLayerInfo : pLayer_Info; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L LayersBase,A6 - JSR -144(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE ScrollLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -072(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION SizeLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -066(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE SortLayerCR(layer : pLayer; dx : LONGINT; dy : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -210(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE SwapBitsRastPortClipRect(rp : pRastPort; cr : pClipRect); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L rp,A0 - MOVEA.L cr,A1 - MOVEA.L LayersBase,A6 - JSR -126(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE ThinLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -162(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayer(layer : pLayer); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L LayersBase,A6 - JSR -102(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -138(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -114(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION UpfrontLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -048(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WhichLayer(li : pLayer_Info; x : LONGINT; y : LONGINT) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVE.L x,D0 - MOVE.L y,D1 - MOVEA.L LayersBase,A6 - JSR -132(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; -} - - - - -END. (* UNIT LAYERS *) - - - diff --git a/packages/arosunits/src/mui.pas b/packages/arosunits/src/mui.pas index bd3d2aff06..4bca5a484a 100644 --- a/packages/arosunits/src/mui.pas +++ b/packages/arosunits/src/mui.pas @@ -3872,7 +3872,7 @@ end; FUNCTION MUI_NewObjectA(class_ : pCHar; tags : pTagItem) : pObject_; type - TLocalCall = function(class_ : pCHar; tags : pTagItem; Base: Pointer): pObject_; stdcall; + TLocalCall = function(class_ : pCHar; tags : pTagItem; Base: Pointer): pObject_; cdecl; var Call: TLocalCall; begin @@ -3882,7 +3882,7 @@ end; PROCEDURE MUI_DisposeObject(obj : pObject_); type - TLocalCall = procedure(obj : pObject_; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3892,7 +3892,7 @@ end; FUNCTION MUI_RequestA(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER) : LONGINT; type - TLocalCall = function(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3902,7 +3902,7 @@ end; FUNCTION MUI_AllocAslRequest(typ : ULONG; tags : pTagItem) : POINTER; type - TLocalCall = function(typ : ULONG; tags : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(typ : ULONG; tags : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -3912,7 +3912,7 @@ end; FUNCTION MUI_AslRequest(req : POINTER; tags : pTagItem) : BOOLEAN; type - TLocalCall = function(req : POINTER; tags : pTagItem; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(req : POINTER; tags : pTagItem; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3922,7 +3922,7 @@ end; PROCEDURE MUI_FreeAslRequest(req : POINTER); type - TLocalCall = procedure(req : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(req : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3932,7 +3932,7 @@ end; FUNCTION MUI_Error : LONGINT; type - TLocalCall = function(Base: Pointer): LONGINT; stdcall; + TLocalCall = function(Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3942,7 +3942,7 @@ end; FUNCTION MUI_SetError(errnum : LONGINT) : LONGINT; type - TLocalCall = function(errnum : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(errnum : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3952,7 +3952,7 @@ end; FUNCTION MUI_GetClass(name : pChar) : pIClass; type - TLocalCall = function(name : pChar; Base: Pointer): pIClass; stdcall; + TLocalCall = function(name : pChar; Base: Pointer): pIClass; cdecl; var Call: TLocalCall; begin @@ -3962,7 +3962,7 @@ end; PROCEDURE MUI_FreeClass(cl : pIClass); type - TLocalCall = procedure(cl : pIClass; Base: Pointer); stdcall; + TLocalCall = procedure(cl : pIClass; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3972,7 +3972,7 @@ end; PROCEDURE MUI_RequestIDCMP(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3982,7 +3982,7 @@ end; PROCEDURE MUI_RejectIDCMP(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3992,7 +3992,7 @@ end; PROCEDURE MUI_Redraw(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4002,7 +4002,7 @@ end; FUNCTION MUI_CreateCustomClass(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER) : pMUI_CustomClass; type - TLocalCall = function(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER; LibBase: Pointer): pMUI_CustomClass; stdcall; + TLocalCall = function(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER; LibBase: Pointer): pMUI_CustomClass; cdecl; var Call: TLocalCall; begin @@ -4012,7 +4012,7 @@ end; FUNCTION MUI_DeleteCustomClass(mcc : pMUI_CustomClass) : BOOLEAN; type - TLocalCall = function(mcc : pMUI_CustomClass; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(mcc : pMUI_CustomClass; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4022,7 +4022,7 @@ end; FUNCTION MUI_MakeObjectA(typ : LONGINT; params : pULONG) : pObject_; type - TLocalCall = function(typ : LONGINT; params : pULONG; Base: Pointer): pObject_; stdcall; + TLocalCall = function(typ : LONGINT; params : pULONG; Base: Pointer): pObject_; cdecl; var Call: TLocalCall; begin @@ -4032,7 +4032,7 @@ end; FUNCTION MUI_Layout(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG) : BOOLEAN; type - TLocalCall = function(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4042,7 +4042,7 @@ end; FUNCTION MUI_ObtainPen(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG) : LONGINT; type - TLocalCall = function(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -4052,7 +4052,7 @@ end; PROCEDURE MUI_ReleasePen(mri : pMUI_RenderInfo; pen : LONGINT); type - TLocalCall = procedure(mri : pMUI_RenderInfo; pen : LONGINT; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; pen : LONGINT; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4062,7 +4062,7 @@ end; FUNCTION MUI_AddClipping(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint) : POINTER; type - TLocalCall = function(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint; Base: Pointer): POINTER; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -4072,7 +4072,7 @@ end; PROCEDURE MUI_RemoveClipping(mri : pMUI_RenderInfo; h : POINTER); type - TLocalCall = procedure(mri : pMUI_RenderInfo; h : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; h : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4082,7 +4082,7 @@ end; FUNCTION MUI_AddClipRegion(mri : pMUI_RenderInfo; region : pRegion) : POINTER; type - TLocalCall = function(mri : pMUI_RenderInfo; region : pRegion; Base: Pointer): POINTER; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; region : pRegion; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -4092,7 +4092,7 @@ end; PROCEDURE MUI_RemoveClipRegion(mri : pMUI_RenderInfo; region : POINTER); type - TLocalCall = procedure(mri : pMUI_RenderInfo; region : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; region : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4102,7 +4102,7 @@ end; FUNCTION MUI_BeginRefresh(mri : pMUI_RenderInfo; flags : ULONG) : BOOLEAN; type - TLocalCall = function(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4112,7 +4112,7 @@ end; PROCEDURE MUI_EndRefresh(mri : pMUI_RenderInfo; flags : ULONG); type - TLocalCall = procedure(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/Makefile b/rtl/aros/Makefile index 71e72ea9a5..8d75683b3c 100755 --- a/rtl/aros/Makefile +++ b/rtl/aros/Makefile @@ -1,8 +1,8 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/08/07] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013/01/13] # default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-aros m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded x86_64-aros arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux +MAKEFILETARGETS=i386-aros BSDs = freebsd netbsd openbsd darwin UNIXs = linux $(BSDs) solaris qnx haiku LIMIT83fs = go32v2 os2 emx watcom @@ -303,982 +303,22 @@ override FPCOPT+=-Ur endif OBJPASDIR=$(RTL)/objpas GRAPHDIR=$(INC)/graph -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif ifeq ($(FULL_TARGET),i386-aros) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_LOADERS+=prt0 +override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects pastoc longarray tagsarray exec amigados utility keymap timer inputevent layers intuition agraphics video keyboard mouse fpintres exeinfo lineinfo endif ifeq ($(FULL_TARGET),i386-aros) override TARGET_LOADERS+=prt0 endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif ifeq ($(FULL_TARGET),i386-aros) override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif override INSTALL_FPCPACKAGE=y -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-win32) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-os2) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-beos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netware) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-emx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-wince) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-nativent) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif ifeq ($(FULL_TARGET),i386-aros) override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) endif -ifeq ($(FULL_TARGET),m68k-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-wince) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-gba) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-nds) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-win32) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-os2) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-beos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netware) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-emx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-wince) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-nativent) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif ifeq ($(FULL_TARGET),i386-aros) override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) endif -ifeq ($(FULL_TARGET),m68k-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-wince) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-gba) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-nds) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif ifdef REQUIRE_UNITSDIR override UNITSDIR+=$(REQUIRE_UNITSDIR) endif diff --git a/rtl/aros/Makefile.fpc b/rtl/aros/Makefile.fpc index 7b82a3bb3b..cca171e47c 100644 --- a/rtl/aros/Makefile.fpc +++ b/rtl/aros/Makefile.fpc @@ -12,8 +12,11 @@ units=$(SYSTEMUNIT) objpas macpas iso7185 strings \ sysutils fgl classes strutils math typinfo varutils fmtbcd \ charset ucomplex getopts matrix \ variants types rtlconsts sysconst dateutil objects \ + pastoc longarray tagsarray exec amigados utility keymap \ + timer inputevent layers \ + intuition agraphics video keyboard mouse \ fpintres exeinfo lineinfo -# \ +# # exec timer doslib utility hardware inputevent graphics layers \ # intuition aboxlib mui \ # these can be moved to packages later diff --git a/packages/arosunits/src/agraphics.pas b/rtl/aros/agraphics.pas index 35ba61419f..949dc8dd6a 100644 --- a/packages/arosunits/src/agraphics.pas +++ b/rtl/aros/agraphics.pas @@ -2564,7 +2564,7 @@ END; procedure AddAnimOb(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort); type - TLocalCall = procedure(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2574,7 +2574,7 @@ end; procedure AddBob(bob : PBob; Rp : PRastPort); type - TLocalCall = procedure(bob : PBob; Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(bob : PBob; Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2584,7 +2584,7 @@ end; function AddDisplayDriverA(P: Pointer; tags: PTagItem): LongInt; type - TLocalCall = function(P: Pointer; tags: PTagItem; Base: Pointer): LongInt; stdcall; + TLocalCall = function(P: Pointer; tags: PTagItem; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2594,7 +2594,7 @@ end; procedure AddFont(TextFont : PTextFont); type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2604,7 +2604,7 @@ end; procedure AddVSprite(VSprite : PVSprite; Rp : PRastPort); type - TLocalCall = procedure(VSprite : PVSprite; Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(VSprite : PVSprite; Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2614,7 +2614,7 @@ end; function AllocBitMap(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap): PBitMap; type - TLocalCall = function(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap; Base: Pointer): PBitMap; stdcall; + TLocalCall = function(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap; Base: Pointer): PBitMap; cdecl; var Call: TLocalCall; begin @@ -2624,7 +2624,7 @@ end; function AllocDBufInfo(Vp : PViewPort): PDBufInfo; type - TLocalCall = function(Vp : PViewPort; Base: Pointer): PDBufInfo; stdcall; + TLocalCall = function(Vp : PViewPort; Base: Pointer): PDBufInfo; cdecl; var Call: TLocalCall; begin @@ -2634,7 +2634,7 @@ end; function AllocRaster(Width : LongWord; Height : LongWord) : PChar; type - TLocalCall = function(Width : LongWord; Height : LongWord; Base: Pointer): PChar; stdcall; + TLocalCall = function(Width : LongWord; Height : LongWord; Base: Pointer): PChar; cdecl; var Call: TLocalCall; begin @@ -2644,7 +2644,7 @@ end; function AllocSpriteDataA(const Bm : PBitMap;const tags : PTagItem) : PExtSprite; type - TLocalCall = function(const Bm : PBitMap;const tags : PTagItem; Base: Pointer): PExtSprite; stdcall; + TLocalCall = function(const Bm : PBitMap;const tags : PTagItem; Base: Pointer): PExtSprite; cdecl; var Call: TLocalCall; begin @@ -2654,7 +2654,7 @@ end; procedure AndRectRegion(region : PRegion;const rectangle : pRectangle); type - TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); stdcall; + TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2664,7 +2664,7 @@ end; function AndRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2674,7 +2674,7 @@ end; procedure AndRectRegionND(region : PRegion;const rectangle : pRectangle); type - TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); stdcall; + TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2684,7 +2684,7 @@ end; function AndRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2694,7 +2694,7 @@ end; procedure Animate(AnKey : PPAnimOb; Rp : PRastPort); type - TLocalCall = procedure(AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2704,7 +2704,7 @@ end; function AreaDraw(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2714,7 +2714,7 @@ end; function AreaEllipse(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word) : LongInt; type - TLocalCall = function(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2724,7 +2724,7 @@ end; function AreaEnd(Rp : PRastPort) : LongInt; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2734,7 +2734,7 @@ end; function AreaMove(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2744,7 +2744,7 @@ end; procedure AskFont(Rp : PRastPort; textAttr : pTextAttr); type - TLocalCall = procedure(Rp : PRastPort; textAttr : pTextAttr; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; textAttr : pTextAttr; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2754,7 +2754,7 @@ end; function AskSoftStyle(Rp : PRastPort) : LongWord; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -2764,7 +2764,7 @@ end; function AttachPalExtra(cm : pColorMap; Vp : PViewPort) : LongInt; type - TLocalCall = function(cm : pColorMap; Vp : PViewPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(cm : pColorMap; Vp : PViewPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2774,7 +2774,7 @@ end; function AttemptLockLayerRom(layer : pLayer) : BOOLEAN; type - TLocalCall = function(layer : pLayer; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(layer : pLayer; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2784,7 +2784,7 @@ end; function BestModeIDA(const tags : PTagItem) : LongWord; type - TLocalCall = function(const tags : PTagItem; Base: Pointer): LongWord; stdcall; + TLocalCall = function(const tags : PTagItem; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -2794,7 +2794,7 @@ end; procedure BitMapScale(bitScaleArgs : pBitScaleArgs); type - TLocalCall = procedure(bitScaleArgs : pBitScaleArgs; Base: Pointer); stdcall; + TLocalCall = procedure(bitScaleArgs : pBitScaleArgs; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2804,7 +2804,7 @@ end; function BltBitMap(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar) : LongInt; type - TLocalCall = function(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar; Base: Pointer): LongInt ; stdcall; + TLocalCall = function(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar; Base: Pointer): LongInt ; cdecl; var Call: TLocalCall; begin @@ -2814,7 +2814,7 @@ end; procedure BltBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); type - TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2824,7 +2824,7 @@ end; procedure BltClear(memBlock : PChar; byteCount : LongWord; Flags : LongWord); type - TLocalCall = procedure(memBlock : PChar; byteCount : LongWord; Flags : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(memBlock : PChar; byteCount : LongWord; Flags : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2834,7 +2834,7 @@ end; procedure BltMaskBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar); type - TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar; Base: Pointer); stdcall; + TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2844,7 +2844,7 @@ end; procedure BltPattern(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord); type - TLocalCall = procedure(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2854,7 +2854,7 @@ end; procedure BltTemplate(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt); type - TLocalCall = procedure(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2864,7 +2864,7 @@ end; function CalcIVG(v : pView; Vp : PViewPort) : WORD; type - TLocalCall = function(v : pView; Vp : PViewPort; Base: Pointer): WORD; stdcall; + TLocalCall = function(v : pView; Vp : PViewPort; Base: Pointer): WORD; cdecl; var Call: TLocalCall; begin @@ -2874,7 +2874,7 @@ end; procedure CBump(copList : pUCopList); type - TLocalCall = procedure(copList : pUCopList; Base: Pointer); stdcall; + TLocalCall = procedure(copList : pUCopList; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2884,7 +2884,7 @@ end; function ChangeExtSpriteA(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem) : LongInt; type - TLocalCall = function(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -2894,7 +2894,7 @@ end; procedure ChangeSprite(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD); type - TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2904,7 +2904,7 @@ end; procedure ChangeVPBitMap(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo); type - TLocalCall = procedure(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2914,7 +2914,7 @@ end; procedure ClearEOL(Rp : PRastPort); type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2924,7 +2924,7 @@ end; function ClearRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2934,7 +2934,7 @@ end; function ClearRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2944,7 +2944,7 @@ end; procedure ClearRegionRegionND(region1 : PRegion; region2 : PRegion); type - TLocalCall = procedure(region1 : PRegion; region2 : PRegion; Base: Pointer); stdcall; + TLocalCall = procedure(region1 : PRegion; region2 : PRegion; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2954,7 +2954,7 @@ end; procedure ClearRegion(region : PRegion); type - TLocalCall = procedure(region : PRegion; Base: Pointer); stdcall; + TLocalCall = procedure(region : PRegion; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2964,7 +2964,7 @@ end; procedure ClearScreen(Rp : PRastPort); type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2974,7 +2974,7 @@ end; procedure ClipBlit(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); type - TLocalCall = procedure(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2984,7 +2984,7 @@ end; procedure CloseFont(TextFont : PTextFont); type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -2994,7 +2994,7 @@ end; function CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN; type - TLocalCall = function(monitorSpec : pMonitorSpec; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(monitorSpec : pMonitorSpec; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3004,7 +3004,7 @@ end; procedure CMove(copList : pUCopList; destination : Pointer; data : LongInt); type - TLocalCall = procedure(copList : pUCopList; destination : Pointer; data : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(copList : pUCopList; destination : Pointer; data : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3014,7 +3014,7 @@ end; function CoerceMode(Vp : PViewPort; monitorid : LongWord; Flags : LongWord) : LongWord; type - TLocalCall = function(Vp : PViewPort; monitorid : LongWord; Flags : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Vp : PViewPort; monitorid : LongWord; Flags : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3024,7 +3024,7 @@ end; procedure CopySBitMap(layer : pLayer); type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3034,7 +3034,7 @@ end; function CreateRastPort(): PRastPort; type - TLocalCall = function(Base: Pointer): PRastPort; stdcall; + TLocalCall = function(Base: Pointer): PRastPort; cdecl; var Call: TLocalCall; begin @@ -3044,7 +3044,7 @@ end; function CloneRastPort(Rp: PRastPort): PRastPort; type - TLocalCall = function(Rp: PRastPort; Base: Pointer): PRastPort; stdcall; + TLocalCall = function(Rp: PRastPort; Base: Pointer): PRastPort; cdecl; var Call: TLocalCall; begin @@ -3054,7 +3054,7 @@ end; procedure DeinitRastPort(Rp: PRastPort); type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3064,7 +3064,7 @@ end; procedure FreeRastPort(Rp: PRastPort); type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3074,7 +3074,7 @@ end; procedure CWait(copList : pUCopList; v : LongInt; h : LongInt); type - TLocalCall = procedure(copList : pUCopList; v : LongInt; h : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(copList : pUCopList; v : LongInt; h : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3084,7 +3084,7 @@ end; procedure DisownBlitter; type - TLocalCall = procedure(Base: Pointer); stdcall; + TLocalCall = procedure(Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3094,7 +3094,7 @@ end; procedure DisposeRegion(region : PRegion); type - TLocalCall = procedure(region : PRegion; Base: Pointer); stdcall; + TLocalCall = procedure(region : PRegion; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3104,7 +3104,7 @@ end; procedure DoCollision(Rp : PRastPort); type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3114,7 +3114,7 @@ end; procedure Draw(Rp : PRastPort; x : LongInt; y : LongInt); type - TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3124,7 +3124,7 @@ end; procedure DrawEllipse(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt); type - TLocalCall = procedure(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3134,7 +3134,7 @@ end; procedure DrawGList(Rp : PRastPort; Vp : PViewPort); type - TLocalCall = procedure(Rp : PRastPort; Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3144,7 +3144,7 @@ end; procedure EraseRect(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); type - TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3154,7 +3154,7 @@ end; function ExtendFont(font : PTextFont;const fontTags : PTagItem) : LongWord; type - TLocalCall = function(font : PTextFont;const fontTags : PTagItem; Base: Pointer): LongWord; stdcall; + TLocalCall = function(font : PTextFont;const fontTags : PTagItem; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3164,7 +3164,7 @@ end; function FindColor(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt) : LongInt; type - TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt; Base: Pointer): LongInt; stdcall; + TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3174,7 +3174,7 @@ end; function FindDisplayInfo(displayID : LongWord) : Pointer; type - TLocalCall = function(displayID : LongWord; Base: Pointer): Pointer; stdcall; + TLocalCall = function(displayID : LongWord; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -3184,7 +3184,7 @@ end; function Flood(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt) : BOOLEAN; type - TLocalCall = function(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3194,7 +3194,7 @@ end; procedure FontExtent(const font : PTextFont; fontExtent : pTextExtent); type - TLocalCall = procedure(const font : PTextFont; fontExtent : pTextExtent; Base: Pointer); stdcall; + TLocalCall = procedure(const font : PTextFont; fontExtent : pTextExtent; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3204,7 +3204,7 @@ end; procedure FreeBitMap(Bm : PBitMap); type - TLocalCall = procedure(Bm : PBitMap; Base: Pointer); stdcall; + TLocalCall = procedure(Bm : PBitMap; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3214,7 +3214,7 @@ end; procedure FreeColorMap(colorMap : pColorMap); type - TLocalCall = procedure(colorMap : pColorMap; Base: Pointer); stdcall; + TLocalCall = procedure(colorMap : pColorMap; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3224,7 +3224,7 @@ end; procedure FreeCopList(copList : pCopList); type - TLocalCall = procedure(copList : pCopList; Base: Pointer); stdcall; + TLocalCall = procedure(copList : pCopList; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3234,7 +3234,7 @@ end; procedure FreeCprList(cprList : pcprlist); type - TLocalCall = procedure(cprList : pcprlist; Base: Pointer); stdcall; + TLocalCall = procedure(cprList : pcprlist; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3244,7 +3244,7 @@ end; procedure FreeDBufInfo(dbi : PDBufInfo); type - TLocalCall = procedure(dbi : PDBufInfo; Base: Pointer); stdcall; + TLocalCall = procedure(dbi : PDBufInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3254,7 +3254,7 @@ end; procedure FreeGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt); type - TLocalCall = procedure(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3264,7 +3264,7 @@ end; procedure FreeRaster(p : PChar; Width : LongWord; Height : LongWord); type - TLocalCall = procedure(p : PChar; Width : LongWord; Height : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(p : PChar; Width : LongWord; Height : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3274,7 +3274,7 @@ end; procedure FreeSprite(num : LongInt); type - TLocalCall = procedure(num : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(num : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3284,7 +3284,7 @@ end; procedure FreeSpriteData(sp : PExtSprite); type - TLocalCall = procedure(sp : PExtSprite; Base: Pointer); stdcall; + TLocalCall = procedure(sp : PExtSprite; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3294,7 +3294,7 @@ end; procedure FreeVPortCopLists(Vp : PViewPort); type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3304,7 +3304,7 @@ end; function GetAPen(Rp : PRastPort) : LongWord; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3314,7 +3314,7 @@ end; function GetBitMapAttr(const Bm : PBitMap; attrnum : LongWord) : LongWord; type - TLocalCall = function(const Bm : PBitMap; attrnum : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(const Bm : PBitMap; attrnum : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3324,7 +3324,7 @@ end; function GetBPen(Rp : PRastPort) : LongWord; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3334,7 +3334,7 @@ end; function GetColorMap(entries : LongInt) : pColorMap; type - TLocalCall = function(entries : LongInt; Base: Pointer): pColorMap; stdcall; + TLocalCall = function(entries : LongInt; Base: Pointer): pColorMap; cdecl; var Call: TLocalCall; begin @@ -3344,7 +3344,7 @@ end; function GetDisplayInfoData(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord) : LongWord; type - TLocalCall = function(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3354,7 +3354,7 @@ end; function GetDrMd(Rp : PRastPort) : LongWord; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3364,7 +3364,7 @@ end; function GetExtSpriteA(ss : PExtSprite;const tags : PTagItem) : LongInt; type - TLocalCall = function(ss : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; stdcall; + TLocalCall = function(ss : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3374,7 +3374,7 @@ end; function GetGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt) : BOOLEAN; type - TLocalCall = function(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3384,7 +3384,7 @@ end; function GetOutlinePen(Rp : PRastPort) : LongWord; type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3394,7 +3394,7 @@ end; procedure GetRGB32(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong); type - TLocalCall = procedure(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong; Base: Pointer); stdcall; + TLocalCall = procedure(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3404,7 +3404,7 @@ end; function GetRGB4(colorMap : pColorMap; entry : LongInt) : LongWord; type - TLocalCall = function(colorMap : pColorMap; entry : LongInt; Base: Pointer): LongWord; stdcall; + TLocalCall = function(colorMap : pColorMap; entry : LongInt; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3414,7 +3414,7 @@ end; procedure GetRPAttrsA(const Rp : PRastPort;const tags : PTagItem); type - TLocalCall = procedure(const Rp : PRastPort;const tags : PTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(const Rp : PRastPort;const tags : PTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3424,7 +3424,7 @@ end; function GetSprite(sprite : pSimpleSprite; num : LongInt) : smallint; type - TLocalCall = function(sprite : pSimpleSprite; num : LongInt; Base: Pointer): smallint; stdcall; + TLocalCall = function(sprite : pSimpleSprite; num : LongInt; Base: Pointer): smallint; cdecl; var Call: TLocalCall; begin @@ -3434,7 +3434,7 @@ end; function GetVPModeID(const Vp : PViewPort) : LongInt; type - TLocalCall = function(const Vp : PViewPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(const Vp : PViewPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3444,7 +3444,7 @@ end; procedure GfxAssociate(const associateNode : Pointer; gfxNodePtr : Pointer); type - TLocalCall = procedure(const associateNode : Pointer; gfxNodePtr : Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(const associateNode : Pointer; gfxNodePtr : Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3454,7 +3454,7 @@ end; procedure GfxFree(gfxNodePtr : Pointer); type - TLocalCall = procedure(gfxNodePtr : Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(gfxNodePtr : Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3464,7 +3464,7 @@ end; function GfxLookUp(const associateNode : Pointer) : Pointer; type - TLocalCall = function(const associateNode : Pointer; Base: Pointer): Pointer; stdcall; + TLocalCall = function(const associateNode : Pointer; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -3474,7 +3474,7 @@ end; function GfxNew(gfxNodeType : LongWord) : Pointer; type - TLocalCall = function(gfxNodeType : LongWord; Base: Pointer): Pointer; stdcall; + TLocalCall = function(gfxNodeType : LongWord; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -3484,7 +3484,7 @@ end; procedure InitArea(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt); type - TLocalCall = procedure(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3494,7 +3494,7 @@ end; procedure InitBitMap(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt); type - TLocalCall = procedure(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3504,7 +3504,7 @@ end; procedure InitGels(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo); type - TLocalCall = procedure(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo; Base: Pointer); stdcall; + TLocalCall = procedure(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3514,7 +3514,7 @@ end; procedure InitGMasks(AnOb : PAnimOb); type - TLocalCall = procedure(AnOb : PAnimOb; Base: Pointer); stdcall; + TLocalCall = procedure(AnOb : PAnimOb; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3524,7 +3524,7 @@ end; procedure InitMasks(VSprite : PVSprite); type - TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); stdcall; + TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3534,7 +3534,7 @@ end; procedure InitRastPort(Rp : PRastPort); type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3544,7 +3544,7 @@ end; function InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt) : pTmpRas; type - TLocalCall = function(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt; Base: Pointer): pTmpRas; stdcall; + TLocalCall = function(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt; Base: Pointer): pTmpRas; cdecl; var Call: TLocalCall; begin @@ -3554,7 +3554,7 @@ end; procedure InitView(view : pView); type - TLocalCall = procedure(view : pView; Base: Pointer); stdcall; + TLocalCall = procedure(view : pView; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3564,7 +3564,7 @@ end; procedure InitVPort(Vp : PViewPort); type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3574,7 +3574,7 @@ end; procedure LoadRGB32(Vp : PViewPort;const table : pULONG); type - TLocalCall = procedure(Vp : PViewPort;const table : pULONG; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort;const table : pULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3584,7 +3584,7 @@ end; procedure LoadRGB4(Vp : PViewPort;const colors : pWord; count : LongInt); type - TLocalCall = procedure(Vp : PViewPort;const colors : pWord; count : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort;const colors : pWord; count : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3594,7 +3594,7 @@ end; procedure LoadView(view : pView); type - TLocalCall = procedure(view : pView; Base: Pointer); stdcall; + TLocalCall = procedure(view : pView; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3604,7 +3604,7 @@ end; procedure LockLayerRom(layer : pLayer); type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3614,7 +3614,7 @@ end; function MakeVPort(view : pView; Vp : PViewPort) : LongWord; type - TLocalCall = function(view : pView; Vp : PViewPort; Base: Pointer): LongWord; stdcall; + TLocalCall = function(view : pView; Vp : PViewPort; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3624,7 +3624,7 @@ end; function ModeNotAvailable(modeID : LongWord) : LongInt; type - TLocalCall = function(modeID : LongWord; Base: Pointer): LongInt; stdcall; + TLocalCall = function(modeID : LongWord; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3634,7 +3634,7 @@ end; procedure Move(Rp : PRastPort; x : LongInt; y : LongInt); type - TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3644,7 +3644,7 @@ end; procedure MoveSprite(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt); type - TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3654,7 +3654,7 @@ end; function MrgCop(view : pView) : LongWord; type - TLocalCall = function(view : pView; Base: Pointer): LongWord; stdcall; + TLocalCall = function(view : pView; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3664,7 +3664,7 @@ end; function NewRegion : PRegion; type - TLocalCall = function(Base: Pointer): PRegion; stdcall; + TLocalCall = function(Base: Pointer): PRegion; cdecl; var Call: TLocalCall; begin @@ -3674,7 +3674,7 @@ end; function NextDisplayInfo(displayID : LongWord) : LongWord; type - TLocalCall = function(displayID : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(displayID : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3684,7 +3684,7 @@ end; function ObtainBestPenA(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem) : LongInt; type - TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem; Base: Pointer): LongInt; stdcall; + TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3694,7 +3694,7 @@ end; function ObtainPen(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt) : LongWord; type - TLocalCall = function(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt; Base: Pointer): LongWord; stdcall; + TLocalCall = function(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3704,7 +3704,7 @@ end; function OpenFont(textAttr : pTextAttr) : PTextFont; type - TLocalCall = function(textAttr : pTextAttr; Base: Pointer): PTextFont; stdcall; + TLocalCall = function(textAttr : pTextAttr; Base: Pointer): PTextFont; cdecl; var Call: TLocalCall; begin @@ -3714,7 +3714,7 @@ end; function OpenMonitor(const monitorName : PChar; displayID : LongWord) : pMonitorSpec; type - TLocalCall = function(const monitorName : PChar; displayID : LongWord; Base: Pointer): pMonitorSpec; stdcall; + TLocalCall = function(const monitorName : PChar; displayID : LongWord; Base: Pointer): pMonitorSpec; cdecl; var Call: TLocalCall; begin @@ -3724,7 +3724,7 @@ end; function OrRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3734,7 +3734,7 @@ end; function OrRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3744,7 +3744,7 @@ end; function OrRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3754,7 +3754,7 @@ end; function OrRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3764,7 +3764,7 @@ end; procedure OwnBlitter; type - TLocalCall = procedure(Base: Pointer); stdcall; + TLocalCall = procedure(Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3774,7 +3774,7 @@ end; procedure PolyDraw(Rp : PRastPort; count : LongInt;const polyTable : pLongint); type - TLocalCall = procedure(Rp : PRastPort; count : LongInt;const polyTable : pLongint; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; count : LongInt;const polyTable : pLongint; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3784,7 +3784,7 @@ end; procedure QBlit(blit : pbltnode); type - TLocalCall = procedure(blit : pbltnode; Base: Pointer); stdcall; + TLocalCall = procedure(blit : pbltnode; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3794,7 +3794,7 @@ end; procedure QBSBlit(blit : pbltnode); type - TLocalCall = procedure(blit : pbltnode; Base: Pointer); stdcall; + TLocalCall = procedure(blit : pbltnode; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3804,7 +3804,7 @@ end; function ReadPixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongWord; type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3814,7 +3814,7 @@ end; function ReadPixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3824,7 +3824,7 @@ end; function ReadPixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3834,7 +3834,7 @@ end; procedure RectFill(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); type - TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3844,7 +3844,7 @@ end; procedure ReleasePen(cm : pColorMap; n : LongWord); type - TLocalCall = procedure(cm : pColorMap; n : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(cm : pColorMap; n : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3854,7 +3854,7 @@ end; procedure RemFont(TextFont : PTextFont); type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3864,7 +3864,7 @@ end; procedure RemIBob(bob : PBob; Rp : PRastPort; Vp : PViewPort); type - TLocalCall = procedure(bob : PBob; Rp : PRastPort; Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(bob : PBob; Rp : PRastPort; Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3874,7 +3874,7 @@ end; procedure RemVSprite(VSprite : PVSprite); type - TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); stdcall; + TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3884,7 +3884,7 @@ end; function ScalerDiv(factor : LongWord; numerator : LongWord; denominator : LongWord) : WORD; type - TLocalCall = function(factor : LongWord; numerator : LongWord; denominator : LongWord; Base: Pointer): WORD; stdcall; + TLocalCall = function(factor : LongWord; numerator : LongWord; denominator : LongWord; Base: Pointer): WORD; cdecl; var Call: TLocalCall; begin @@ -3894,7 +3894,7 @@ end; procedure ScrollRaster(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); type - TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3904,7 +3904,7 @@ end; procedure ScrollRasterBF(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); type - TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3914,7 +3914,7 @@ end; procedure ScrollVPort(Vp : PViewPort); type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3924,7 +3924,7 @@ end; procedure SetABPenDrMd(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord); type - TLocalCall = procedure(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3934,7 +3934,7 @@ end; procedure SetAPen(Rp : PRastPort; pen : LongWord); type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3944,7 +3944,7 @@ end; procedure SetBPen(Rp : PRastPort; pen : LongWord); type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3954,7 +3954,7 @@ end; function SetChipRev(want : LongWord) : LongWord; type - TLocalCall = function(want : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(want : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -3964,7 +3964,7 @@ end; procedure SetCollision(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo); type - TLocalCall = procedure(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo; Base: Pointer); stdcall; + TLocalCall = procedure(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3974,7 +3974,7 @@ end; procedure SetDrMd(Rp : PRastPort; drawMode : LongWord); type - TLocalCall = procedure(Rp : PRastPort; drawMode : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; drawMode : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3984,7 +3984,7 @@ end; function SetFont(Rp : PRastPort;const TextFont : PTextFont) : LongInt; type - TLocalCall = function(Rp : PRastPort;const TextFont : PTextFont; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort;const TextFont : PTextFont; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -3994,7 +3994,7 @@ end; procedure SetMaxPen(Rp : PRastPort; maxpen : LongWord); type - TLocalCall = procedure(Rp : PRastPort; maxpen : LongWord; Base: Pointer) ; stdcall; + TLocalCall = procedure(Rp : PRastPort; maxpen : LongWord; Base: Pointer) ; cdecl; var Call: TLocalCall; begin @@ -4004,7 +4004,7 @@ end; function SetOutlinePen(Rp : PRastPort; pen : LongWord) : LongWord; type - TLocalCall = function(Rp : PRastPort; pen : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; pen : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -4014,7 +4014,7 @@ end; procedure SetRast(Rp : PRastPort; pen : LongWord); type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4024,7 +4024,7 @@ end; procedure SetRGB32(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord); type - TLocalCall = procedure(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4034,7 +4034,7 @@ end; procedure SetRGB32CM(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord); type - TLocalCall = procedure(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4044,7 +4044,7 @@ end; procedure SetRGB4(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); type - TLocalCall = procedure(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4054,7 +4054,7 @@ end; procedure SetRGB4CM(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); type - TLocalCall = procedure(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4064,7 +4064,7 @@ end; procedure SetRPAttrsA(Rp : PRastPort;const tags : PTagItem); type - TLocalCall = procedure(Rp : PRastPort;const tags : PTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort;const tags : PTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4074,7 +4074,7 @@ end; function SetSoftStyle(Rp : PRastPort; style : LongWord; enable : LongWord) : LongWord; type - TLocalCall = function(Rp : PRastPort; style : LongWord; enable : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; style : LongWord; enable : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -4084,7 +4084,7 @@ end; function SetWriteMask(Rp : PRastPort; msk : LongWord) : LongWord; type - TLocalCall = function(Rp : PRastPort; msk : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort; msk : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -4094,7 +4094,7 @@ end; procedure SortGList(Rp : PRastPort); type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4104,7 +4104,7 @@ end; procedure StripFont(font : PTextFont); type - TLocalCall = procedure(font : PTextFont; Base: Pointer); stdcall; + TLocalCall = procedure(font : PTextFont; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4114,7 +4114,7 @@ end; procedure SyncSBitMap(layer : pLayer); type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4124,7 +4124,7 @@ end; function GText(Rp : PRastPort;const string_ : PChar; count : LongWord) : LongInt; type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -4134,7 +4134,7 @@ end; function TextExtent(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent) : smallint; type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent; Base: Pointer): smallint; stdcall; + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent; Base: Pointer): smallint; cdecl; var Call: TLocalCall; begin @@ -4144,7 +4144,7 @@ end; function TextFit(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord) : LongWord; type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -4154,7 +4154,7 @@ end; function TextLength(Rp : PRastPort;const string_ : PChar; count : LongWord) : smallint; type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): smallint; stdcall; + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): smallint; cdecl; var Call: TLocalCall; begin @@ -4164,7 +4164,7 @@ end; function UCopperListInit(uCopList : pUCopList; n : LongInt) : pCopList; type - TLocalCall = function(uCopList : pUCopList; n : LongInt; Base: Pointer): pCopList; stdcall; + TLocalCall = function(uCopList : pUCopList; n : LongInt; Base: Pointer): pCopList; cdecl; var Call: TLocalCall; begin @@ -4174,7 +4174,7 @@ end; procedure UnlockLayerRom(layer : pLayer); type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4184,7 +4184,7 @@ end; function VBeamPos : LongInt; type - TLocalCall = function(Base: Pointer): LongInt; stdcall; + TLocalCall = function(Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -4194,7 +4194,7 @@ end; function VideoControl(colorMap : pColorMap; tagarray : PTagItem) : BOOLEAN; type - TLocalCall = function(colorMap : pColorMap; tagarray : PTagItem; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(colorMap : pColorMap; tagarray : PTagItem; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4204,7 +4204,7 @@ end; procedure WaitBlit; type - TLocalCall = procedure(Base: Pointer); stdcall; + TLocalCall = procedure(Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4214,7 +4214,7 @@ end; procedure WaitBOVP(Vp : PViewPort); type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4224,7 +4224,7 @@ end; procedure WaitTOF; type - TLocalCall = procedure(Base: Pointer); stdcall; + TLocalCall = procedure(Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4234,7 +4234,7 @@ end; function WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem) : smallint; type - TLocalCall = function(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem; Base: Pointer): smallint; stdcall; + TLocalCall = function(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem; Base: Pointer): smallint; cdecl; var Call: TLocalCall; begin @@ -4244,7 +4244,7 @@ end; procedure WriteChunkyPixels(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt); type - TLocalCall = procedure(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4254,7 +4254,7 @@ end; function WritePixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -4264,7 +4264,7 @@ end; function WritePixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -4274,7 +4274,7 @@ end; function WritePixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -4284,7 +4284,7 @@ end; function XorRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4294,7 +4294,7 @@ end; function XorRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4305,7 +4305,7 @@ end; function XorRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4315,7 +4315,7 @@ end; function XorRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/amigados.pas b/rtl/aros/amigados.pas new file mode 100644 index 0000000000..064a512fa8 --- /dev/null +++ b/rtl/aros/amigados.pas @@ -0,0 +1,4123 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{ + History: + Added overlay functions for Pchar->Strings, functions + and procedures. Now you can mix PChar and Strings e.g + OpenLibrary('whatis.library',37). No need to cast to + a PChar. + 14 Jul 2000. + + Changed ReadArgs, removed the var for the second arg. + Changed DOSRename from longint to a boolean. + Aug 04 2000. + + Added functions and procedures with array of const. + For use with fpc 1.0.7 + + You have to use systemvartags. Check out that unit. + 09 Nov 2002. + + Added the define use_amiga_smartlink. + 13 Jan 2003. + + Update for AmigaOS 3.9. + Added some const. + 26 Jan 2003. + + Changed integer > smallint. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se +} + +unit amigados; + +INTERFACE + +uses exec, utility, timer; + +const + +{ Predefined Amiga DOS global constants } + + DOSTRUE = -1; + DOSFALSE = 0; + +{ Mode parameter to Open() } + + MODE_OLDFILE = 1005; { Open existing file read/write + positioned at beginning of file. } + MODE_NEWFILE = 1006; { Open freshly created file (delete + old file) read/write } + MODE_READWRITE = 1004; { Open old file w/exclusive lock } + +{ Relative position to Seek() } + + OFFSET_BEGINNING = -1; { relative to Begining Of File } + OFFSET_CURRENT = 0; { relative to Current file position } + OFFSET_END = 1; { relative to End Of File } + + BITSPERBYTE = 8; + BYTESPERLONG = 4; + BITSPERLONG = 32; + MAXINT = $7FFFFFFF; + MININT = $80000000; + +{ Passed as type to Lock() } + + SHARED_LOCK = -2; { File is readable by others } + ACCESS_READ = -2; { Synonym } + EXCLUSIVE_LOCK = -1; { No other access allowed } + ACCESS_WRITE = -1; { Synonym } + +type + + FileHandle = BPTR; + FileLock = BPTR; + + pDateStamp = ^tDateStamp; + tDateStamp = record + ds_Days : Longint; { Number of days since Jan. 1, 1978 } + ds_Minute : Longint; { Number of minutes past midnight } + ds_Tick : Longint; { Number of ticks past minute } + end; + +const + + TICKS_PER_SECOND = 50; { Number of ticks in one second } + +{$PACKRECORDS 4} +type + +{ Returned by Examine() and ExInfo(), must be on a 4 byte boundary } + + PFileInfoBlock = ^TFileInfoBlock; + TFileInfoBlock = record + fib_DiskKey : LongInt; + fib_DirEntryType : LongInt; + { type of Directory. If < 0, then a plain file. + If > 0 a directory } + fib_FileName : Array [0..107] of Char; + { Null terminated. Max 30 chars used for now } + fib_Protection : LongInt; + { bit mask of protection, rwxd are 3-0. } + fib_EntryType : LongInt; + fib_Size : LongInt; { Number of bytes in file } + fib_NumBlocks : LongInt; { Number of blocks in file } + fib_Date : TDateStamp; { Date file last changed } + fib_Comment : Array [0..79] of Char; + { Null terminated comment associated with file } + fib_OwnerUID : Word; + fib_OwnerGID : Word; + fib_Reserved : Array [0..31] of Char; + end; + +const + +{ FIB stands for FileInfoBlock } + +{* FIBB are bit definitions, FIBF are field definitions *} +{* Regular RWED bits are 0 == allowed. *} +{* NOTE: GRP and OTR RWED permissions are 0 == not allowed! *} +{* Group and Other permissions are not directly handled by the filesystem *} + + FIBB_OTR_READ = 15; {* Other: file is readable *} + FIBB_OTR_WRITE = 14; {* Other: file is writable *} + FIBB_OTR_EXECUTE = 13; {* Other: file is executable *} + FIBB_OTR_DELETE = 12; {* Other: prevent file from being deleted *} + FIBB_GRP_READ = 11; {* Group: file is readable *} + FIBB_GRP_WRITE = 10; {* Group: file is writable *} + FIBB_GRP_EXECUTE = 9; {* Group: file is executable *} + FIBB_GRP_DELETE = 8; {* Group: prevent file from being deleted *} + + FIBB_SCRIPT = 6; { program is a script (execute) file } + FIBB_PURE = 5; { program is reentrant and rexecutable} + FIBB_ARCHIVE = 4; { cleared whenever file is changed } + FIBB_READ = 3; { ignored by old filesystem } + FIBB_WRITE = 2; { ignored by old filesystem } + FIBB_EXECUTE = 1; { ignored by system, used by Shell } + FIBB_DELETE = 0; { prevent file from being deleted } + + FIBF_OTR_READ = (1 shl FIBB_OTR_READ); + FIBF_OTR_WRITE = (1 shl FIBB_OTR_WRITE); + FIBF_OTR_EXECUTE = (1 shl FIBB_OTR_EXECUTE); + FIBF_OTR_DELETE = (1 shl FIBB_OTR_DELETE); + FIBF_GRP_READ = (1 shl FIBB_GRP_READ); + FIBF_GRP_WRITE = (1 shl FIBB_GRP_WRITE); + FIBF_GRP_EXECUTE = (1 shl FIBB_GRP_EXECUTE); + FIBF_GRP_DELETE = (1 shl FIBB_GRP_DELETE); + + FIBF_SCRIPT = 64; + FIBF_PURE = 32; + FIBF_ARCHIVE = 16; + FIBF_READ = 8; + FIBF_WRITE = 4; + FIBF_EXECUTE = 2; + FIBF_DELETE = 1; + +{* Standard maximum length for an error string from fault. However, most *} +{* error strings should be kept under 60 characters if possible. Don't *} +{* forget space for the header you pass in. *} + + FAULT_MAX = 82; + +{* All BCPL data must be long Integer aligned. BCPL pointers are the long Integer + * address (i.e byte address divided by 4 (>>2)) *} + +{* BCPL strings have a length in the first byte and then the characters. + * For example: s[0]=3 s[1]=S s[2]=Y s[3]=S *} + + +type + +{ returned by Info(), must be on a 4 byte boundary } + + PInfoData = ^TInfoData; + TInfoData = record + id_NumSoftErrors : LongInt; { number of soft errors on disk } + id_UnitNumber : LongInt; { Which unit disk is (was) mounted on } + id_DiskState : LongInt; { See defines below } + id_NumBlocks : LongInt; { Number of blocks on disk } + id_NumBlocksUsed : LongInt; { Number of block in use } + id_BytesPerBlock : LongInt; + id_DiskType : LongInt; { Disk type code } + id_VolumeNode : BPTR; { BCPL pointer to volume node } + id_InUse : LongInt; { Flag, zero if not in use } + end; + +{$PACKRECORDS NORMAL} + +const + +{ ID stands for InfoData } + + { Disk states } + + ID_WRITE_PROTECTED = 80; { Disk is write protected } + ID_VALIDATING = 81; { Disk is currently being validated } + ID_VALIDATED = 82; { Disk is consistent and writeable } + +const + ID_NO_DISK_PRESENT = -1; + ID_UNREADABLE_DISK = $42414400; { 'BAD\0' } + ID_DOS_DISK = $444F5300; { 'DOS\0' } + ID_FFS_DISK = $444F5301; { 'DOS\1' } + ID_NOT_REALLY_DOS = $4E444F53; { 'NDOS' } + ID_KICKSTART_DISK = $4B49434B; { 'KICK' } + ID_MSDOS_DISK = $4d534400; { 'MSD\0' } + ID_SFS_BE_DISK = $53465300; { 'SFS\0' } + ID_SFS_LE_DISK = $73667300; { 'sfs\0' } + +{ Errors from IoErr(), etc. } + ERROR_NO_FREE_STORE = 103; + ERROR_TASK_TABLE_FULL = 105; + ERROR_BAD_TEMPLATE = 114; + ERROR_BAD_NUMBER = 115; + ERROR_REQUIRED_ARG_MISSING = 116; + ERROR_KEY_NEEDS_ARG = 117; + ERROR_TOO_MANY_ARGS = 118; + ERROR_UNMATCHED_QUOTES = 119; + ERROR_LINE_TOO_LONG = 120; + ERROR_FILE_NOT_OBJECT = 121; + ERROR_INVALID_RESIDENT_LIBRARY = 122; + ERROR_NO_DEFAULT_DIR = 201; + ERROR_OBJECT_IN_USE = 202; + ERROR_OBJECT_EXISTS = 203; + ERROR_DIR_NOT_FOUND = 204; + ERROR_OBJECT_NOT_FOUND = 205; + ERROR_BAD_STREAM_NAME = 206; + ERROR_OBJECT_TOO_LARGE = 207; + ERROR_ACTION_NOT_KNOWN = 209; + ERROR_INVALID_COMPONENT_NAME = 210; + ERROR_INVALID_LOCK = 211; + ERROR_OBJECT_WRONG_TYPE = 212; + ERROR_DISK_NOT_VALIDATED = 213; + ERROR_DISK_WRITE_PROTECTED = 214; + ERROR_RENAME_ACROSS_DEVICES = 215; + ERROR_DIRECTORY_NOT_EMPTY = 216; + ERROR_TOO_MANY_LEVELS = 217; + ERROR_DEVICE_NOT_MOUNTED = 218; + ERROR_SEEK_ERROR = 219; + ERROR_COMMENT_TOO_BIG = 220; + ERROR_DISK_FULL = 221; + ERROR_DELETE_PROTECTED = 222; + ERROR_WRITE_PROTECTED = 223; + ERROR_READ_PROTECTED = 224; + ERROR_NOT_A_DOS_DISK = 225; + ERROR_NO_DISK = 226; + ERROR_NO_MORE_ENTRIES = 232; +{ added for 1.4 } + ERROR_IS_SOFT_LINK = 233; + ERROR_OBJECT_LINKED = 234; + ERROR_BAD_HUNK = 235; + ERROR_NOT_IMPLEMENTED = 236; + ERROR_RECORD_NOT_LOCKED = 240; + ERROR_LOCK_COLLISION = 241; + ERROR_LOCK_TIMEOUT = 242; + ERROR_UNLOCK_ERROR = 243; + +{ error codes 303-305 are defined in dosasl.h } + +{ These are the return codes used by convention by AmigaDOS commands } +{ See FAILAT and IF for relvance to EXECUTE files } + RETURN_OK = 0; { No problems, success } + RETURN_WARN = 5; { A warning only } + RETURN_ERROR = 10; { Something wrong } + RETURN_FAIL = 20; { Complete or severe failure} + +{ Bit numbers that signal you that a user has issued a break } + SIGBREAKB_CTRL_C = 12; + SIGBREAKB_CTRL_D = 13; + SIGBREAKB_CTRL_E = 14; + SIGBREAKB_CTRL_F = 15; + +{ Bit fields that signal you that a user has issued a break } +{ for example: if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); } + SIGBREAKF_CTRL_C = 4096; + SIGBREAKF_CTRL_D = 8192; + SIGBREAKF_CTRL_E = 16384; + SIGBREAKF_CTRL_F = 32768; + +{ Values returned by SameLock() } + LOCK_SAME = 0; + LOCK_SAME_HANDLER = 1; { actually same volume } + LOCK_DIFFERENT = -1; + +{ types for ChangeMode() } + CHANGE_LOCK = 0; + CHANGE_FH = 1; + +{ Values for MakeLink() } + LINK_HARD = 0; + LINK_SOFT = 1; { softlinks are not fully supported yet } + +{ values returned by } + ITEM_EQUAL = -2; { "=" Symbol } + ITEM_ERROR = -1; { error } + ITEM_NOTHING = 0; { *N, ;, endstreamch } + ITEM_UNQUOTED = 1; { unquoted item } + ITEM_QUOTED = 2; { quoted item } + +{ types for AllocDosObject/FreeDosObject } + DOS_FILEHANDLE = 0; { few people should use this } + DOS_EXALLCONTROL = 1; { Must be used to allocate this! } + DOS_FIB = 2; { useful } + DOS_STDPKT = 3; { for doing packet-level I/O } + DOS_CLI = 4; { for shell-writers, etc } + DOS_RDARGS = 5; { for ReadArgs if you pass it in } + + +{ + * Data structures and equates used by the V1.4 DOS functions + * StrtoDate() and DatetoStr() + } + +{--------- String/Date structures etc } +type + PDateTime = ^TDateTime; + TDateTime = record + dat_Stamp : TDateStamp; { DOS DateStamp } + dat_Format, { controls appearance of dat_StrDate } + dat_Flags : Byte; { see BITDEF's below } + dat_StrDay, { day of the week string } + dat_StrDate, { date string } + dat_StrTime : STRPTR; { time string } + END; + +{ You need this much room for each of the DateTime strings: } +const + LEN_DATSTRING = 16; + +{ flags for dat_Flags } + + DTB_SUBST = 0; { substitute Today, Tomorrow, etc. } + DTF_SUBST = 1; + DTB_FUTURE = 1; { day of the week is in future } + DTF_FUTURE = 2; + +{ + * date format values + } + + FORMAT_DOS = 0; { dd-mmm-yy } + FORMAT_INT = 1; { yy-mm-dd } + FORMAT_USA = 2; { mm-dd-yy } + FORMAT_CDN = 3; { dd-mm-yy } + FORMAT_MAX = FORMAT_CDN; + FORMAT_DEF = 4; { use default format, as defined + by locale; if locale not + available, use FORMAT_DOS + instead } + +{********************************************************************** +************************ PATTERN MATCHING ****************************** +************************************************************************ + +* structure expected by MatchFirst, MatchNext. +* Allocate this structure and initialize it as follows: +* +* Set ap_BreakBits to the signal bits (CDEF) that you want to take a +* break on, or NULL, if you don't want to convenience the user. +* +* If you want to have the FULL PATH NAME of the files you found, +* allocate a buffer at the END of this structure, and put the size of +* it into ap_Strlen. If you don't want the full path name, make sure +* you set ap_Strlen to zero. In this case, the name of the file, and stats +* are available in the ap_Info, as per usual. +* +* Then call MatchFirst() and then afterwards, MatchNext() with this structure. +* You should check the return value each time (see below) and take the +* appropriate action, ultimately calling MatchEnd() when there are +* no more files and you are done. You can tell when you are done by +* checking for the normal AmigaDOS return code ERROR_NO_MORE_ENTRIES. +* +} + +type + PAChain = ^TAChain; + TAChain = record + an_Child, + an_Parent : PAChain; + an_Lock : BPTR; + an_Info : TFileInfoBlock; + an_Flags : Shortint; + an_String : Array[0..0] of Char; { FIX!! } + END; + + PAnchorPath = ^TAnchorPath; + TAnchorPath = record + case SmallInt of + 0 : ( + ap_First : PAChain; + ap_Last : PAChain; + ); + 1 : ( + ap_Base, { pointer to first anchor } + ap_Current : PAChain; { pointer to last anchor } + ap_BreakBits, { Bits we want to break on } + ap_FoundBreak : LongInt; { Bits we broke on. Also returns ERROR_BREAK } + ap_Flags : Shortint; { New use for extra Integer. } + ap_Reserved : Shortint; + ap_Strlen : SmallInt; { This is what ap_Length used to be } + ap_Info : TFileInfoBlock; + ap_Buf : Array[0..0] of Char; { Buffer for path name, allocated by user !! } + { FIX! } + ); + END; + + +const + APB_DOWILD = 0; { User option ALL } + APF_DOWILD = 1; + + APB_ITSWILD = 1; { Set by MatchFirst, used by MatchNext } + APF_ITSWILD = 2; { Application can test APB_ITSWILD, too } + { (means that there's a wildcard } + { in the pattern after calling } + { MatchFirst). } + + APB_DODIR = 2; { Bit is SET IF a DIR node should be } + APF_DODIR = 4; { entered. Application can RESET this } + { bit after MatchFirst/MatchNext to AVOID } + { entering a dir. } + + APB_DIDDIR = 3; { Bit is SET for an "expired" dir node. } + APF_DIDDIR = 8; + + APB_NOMEMERR = 4; { Set on memory error } + APF_NOMEMERR = 16; + + APB_DODOT = 5; { IF set, allow conversion of '.' to } + APF_DODOT = 32; { CurrentDir } + + APB_DirChanged = 6; { ap_Current->an_Lock changed } + APF_DirChanged = 64; { since last MatchNext call } + + + DDB_PatternBit = 0; + DDF_PatternBit = 1; + DDB_ExaminedBit = 1; + DDF_ExaminedBit = 2; + DDB_Completed = 2; + DDF_Completed = 4; + DDB_AllBit = 3; + DDF_AllBit = 8; + DDB_Single = 4; + DDF_Single = 16; + +{ + * Constants used by wildcard routines, these are the pre-parsed tokens + * referred to by pattern match. It is not necessary for you to do + * anything about these, MatchFirst() MatchNext() handle all these for you. + } + + P_ANY = $80; { Token for '*' or '#? } + P_SINGLE = $81; { Token for '?' } + P_ORSTART = $82; { Token for '(' } + P_ORNEXT = $83; { Token for '|' } + P_OREND = $84; { Token for ')' } + P_NOT = $85; { Token for '~' } + P_NOTEND = $86; { Token for } + P_NOTCLASS = $87; { Token for '^' } + P_CLASS = $88; { Token for '[]' } + P_REPBEG = $89; { Token for '[' } + P_REPEND = $8A; { Token for ']' } + P_STOP = $8B; { token to force end of evaluation } + +{ Values for an_Status, NOTE: These are the actual bit numbers } + + COMPLEX_BIT = 1; { Parsing complex pattern } + EXAMINE_BIT = 2; { Searching directory } + +{ + * Returns from MatchFirst(), MatchNext() + * You can also get dos error returns, such as ERROR_NO_MORE_ENTRIES, + * these are in the dos.h file. + } + + ERROR_BUFFER_OVERFLOW = 303; { User OR internal buffer overflow } + ERROR_BREAK = 304; { A break character was received } + ERROR_NOT_EXECUTABLE = 305; { A file has E bit cleared } + +{ hunk types } + HUNK_UNIT = 999 ; + HUNK_NAME = 1000; + HUNK_CODE = 1001; + HUNK_DATA = 1002; + HUNK_BSS = 1003; + HUNK_RELOC32 = 1004; + HUNK_RELOC16 = 1005; + HUNK_RELOC8 = 1006; + HUNK_EXT = 1007; + HUNK_SYMBOL = 1008; + HUNK_DEBUG = 1009; + HUNK_END = 1010; + HUNK_HEADER = 1011; + + HUNK_OVERLAY = 1013; + HUNK_BREAK = 1014; + + HUNK_DREL32 = 1015; + HUNK_DREL16 = 1016; + HUNK_DREL8 = 1017; + + HUNK_LIB = 1018; + HUNK_INDEX = 1019; + +{ hunk_ext sub-types } + EXT_SYMB = 0 ; { symbol table } + EXT_DEF = 1 ; { relocatable definition } + EXT_ABS = 2 ; { Absolute definition } + EXT_RES = 3 ; { no longer supported } + EXT_REF32 = 129; { 32 bit reference to symbol } + EXT_COMMON = 130; { 32 bit reference to COMMON block } + EXT_REF16 = 131; { 16 bit reference to symbol } + EXT_REF8 = 132; { 8 bit reference to symbol } + EXT_DEXT32 = 133; { 32 bit data releative reference } + EXT_DEXT16 = 134; { 16 bit data releative reference } + EXT_DEXT8 = 135; { 8 bit data releative reference } + + +type + +{ All DOS processes have this structure } +{ Create and Device Proc returns pointer to the MsgPort in this structure } +{ dev_proc = Address(SmallInt(DeviceProc()) - SizeOf(Task)) } + + pProcess = ^tProcess; + tProcess = record + pr_Task : tTask; + pr_MsgPort : tMsgPort; { This is BPTR address from DOS functions } + pr_Pad : SmallInt; { Remaining variables on 4 byte boundaries } + pr_SegList : BPTR; { Array of seg lists used by this process } + pr_StackSize : LongInt; { Size of process stack in bytes } + pr_GlobVec : Pointer; { Global vector for this process (BCPL) } + pr_TaskNum : LongInt; { CLI task number of zero if not a CLI } + pr_StackBase : BPTR; { Ptr to high memory end of process stack } + pr_Result2 : LongInt; { Value of secondary result from last call } + pr_CurrentDir : BPTR; { Lock associated with current directory } + pr_CIS : BPTR; { Current CLI Input Stream } + pr_COS : BPTR; { Current CLI Output Stream } + pr_ConsoleTask : Pointer; { Console handler process for current window} + pr_FileSystemTask : Pointer; { File handler process for current drive } + pr_CLI : BPTR; { pointer to ConsoleLineInterpreter } + pr_ReturnAddr : Pointer; { pointer to previous stack frame } + pr_PktWait : Pointer; { Function to be called when awaiting msg } + pr_WindowPtr : Pointer; { Window for error printing } + { following definitions are new with 2.0 } + pr_HomeDir : BPTR; { Home directory of executing program } + pr_Flags : LongInt; { flags telling dos about process } + pr_ExitCode : Pointer; { code to call on exit of program OR NULL } + pr_ExitData : LongInt; { Passed as an argument to pr_ExitCode. } + pr_Arguments : STRPTR; { Arguments passed to the process at start } + pr_LocalVars : tMinList; { Local environment variables } + pr_ShellPrivate : ULONG; { for the use of the current shell } + pr_CES : BPTR; { Error stream - IF NULL, use pr_COS } + end; + +{ + * Flags for pr_Flags + } +const + PRB_FREESEGLIST = 0 ; + PRF_FREESEGLIST = 1 ; + PRB_FREECURRDIR = 1 ; + PRF_FREECURRDIR = 2 ; + PRB_FREECLI = 2 ; + PRF_FREECLI = 4 ; + PRB_CLOSEINPUT = 3 ; + PRF_CLOSEINPUT = 8 ; + PRB_CLOSEOUTPUT = 4 ; + PRF_CLOSEOUTPUT = 16; + PRB_FREEARGS = 5 ; + PRF_FREEARGS = 32; + + +{ The long SmallInt address (BPTR) of this structure is returned by + * Open() and other routines that return a file. You need only worry + * about this struct to do async io's via PutMsg() instead of + * standard file system calls } + +type + + PFileHandle = ^TFileHandle; + TFileHandle = record + fh_Link : PMessage; { EXEC message } + fh_Port : PMsgPort; { Reply port for the packet } + fh_Type : PMsgPort; { Port to do PutMsg() to + Address is negative if a plain file } + fh_Buf : LongInt; + fh_Pos : LongInt; + fh_End : LongInt; + fh_Func1 : LongInt; + fh_Func2 : LongInt; + fh_Func3 : LongInt; + fh_Arg1 : LongInt; + fh_Arg2 : LongInt; + end; + +{ This is the extension to EXEC Messages used by DOS } + + PDosPacket = ^TDosPacket; + TDosPacket = record + dp_Link : PMessage; { EXEC message } + dp_Port : PMsgPort; { Reply port for the packet } + { Must be filled in each send. } + case SmallInt of + 0 : ( + dp_Action : LongInt; + dp_Status : LongInt; + dp_Status2 : LongInt; + dp_BufAddr : LongInt; + ); + 1 : ( + dp_Type : LongInt; { See ACTION_... below and + * 'R' means Read, 'W' means Write to the + * file system } + dp_Res1 : LongInt; { For file system calls this is the result + * that would have been returned by the + * function, e.g. Write ('W') returns actual + * length written } + dp_Res2 : LongInt; { For file system calls this is what would + * have been returned by IoErr() } + dp_Arg1 : LongInt; + dp_Arg2 : LongInt; + dp_Arg3 : LongInt; + dp_Arg4 : LongInt; + dp_Arg5 : LongInt; + dp_Arg6 : LongInt; + dp_Arg7 : LongInt; + ); + end; + + +{ A Packet does not require the Message to be before it in memory, but + * for convenience it is useful to associate the two. + * Also see the function init_std_pkt for initializing this structure } + + PStandardPacket = ^TStandardPacket; + TStandardPacket = record + sp_Msg : TMessage; + sp_Pkt : TDosPacket; + end; + + +const + +{ Packet types } + ACTION_NIL = 0; + ACTION_GET_BLOCK = 2; { OBSOLETE } + ACTION_SET_MAP = 4; + ACTION_DIE = 5; + ACTION_EVENT = 6; + ACTION_CURRENT_VOLUME = 7; + ACTION_LOCATE_OBJECT = 8; + ACTION_RENAME_DISK = 9; + ACTION_WRITE = $57; { 'W' } + ACTION_READ = $52; { 'R' } + ACTION_FREE_LOCK = 15; + ACTION_DELETE_OBJECT = 16; + ACTION_RENAME_OBJECT = 17; + ACTION_MORE_CACHE = 18; + ACTION_COPY_DIR = 19; + ACTION_WAIT_CHAR = 20; + ACTION_SET_PROTECT = 21; + ACTION_CREATE_DIR = 22; + ACTION_EXAMINE_OBJECT = 23; + ACTION_EXAMINE_NEXT = 24; + ACTION_DISK_INFO = 25; + ACTION_INFO = 26; + ACTION_FLUSH = 27; + ACTION_SET_COMMENT = 28; + ACTION_PARENT = 29; + ACTION_TIMER = 30; + ACTION_INHIBIT = 31; + ACTION_DISK_TYPE = 32; + ACTION_DISK_CHANGE = 33; + ACTION_SET_DATE = 34; + + ACTION_SCREEN_MODE = 994; + + ACTION_READ_RETURN = 1001; + ACTION_WRITE_RETURN = 1002; + ACTION_SEEK = 1008; + ACTION_FINDUPDATE = 1004; + ACTION_FINDINPUT = 1005; + ACTION_FINDOUTPUT = 1006; + ACTION_END = 1007; + ACTION_TRUNCATE = 1022; { fast file system only } + ACTION_WRITE_PROTECT = 1023; { fast file system only } + +{ new 2.0 packets } + ACTION_SAME_LOCK = 40; + ACTION_CHANGE_SIGNAL = 995; + ACTION_FORMAT = 1020; + ACTION_MAKE_LINK = 1021; +{} +{} + ACTION_READ_LINK = 1024; + ACTION_FH_FROM_LOCK = 1026; + ACTION_IS_FILESYSTEM = 1027; + ACTION_CHANGE_MODE = 1028; +{} + ACTION_COPY_DIR_FH = 1030; + ACTION_PARENT_FH = 1031; + ACTION_EXAMINE_ALL = 1033; + ACTION_EXAMINE_FH = 1034; + + ACTION_LOCK_RECORD = 2008; + ACTION_FREE_RECORD = 2009; + + ACTION_ADD_NOTIFY = 4097; + ACTION_REMOVE_NOTIFY = 4098; + + {* Added in V39: *} + ACTION_EXAMINE_ALL_END = 1035; + ACTION_SET_OWNER = 1036; + +{* Tell a file system to serialize the current volume. This is typically + * done by changing the creation date of the disk. This packet does not take + * any arguments. NOTE: be prepared to handle failure of this packet for + * V37 ROM filesystems. + *} + + ACTION_SERIALIZE_DISK = 4200; + +{ + * A structure for holding error messages - stored as array with error == 0 + * for the last entry. + } +type + PErrorString = ^TErrorString; + TErrorString = record + estr_Nums : Pointer; + estr_Strings : Pointer; + END; + + +{ DOS library node structure. + * This is the data at positive offsets from the library node. + * Negative offsets from the node is the jump table to DOS functions + * node = (struct DosLibrary *) OpenLibrary( "dos.library" .. ) } +(* +type + + TDosLibrary = ^TDosLibrary; + TDosLibrary = record + dl_lib : TLibrary; + dl_Root : Pointer; { Pointer to RootNode, described below } + dl_GV : Pointer; { Pointer to BCPL global vector } + dl_A2 : LongInt; { Private register dump of DOS } + dl_A5 : LongInt; + dl_A6 : LongInt; + dl_Errors : PErrorString; { pointer to array of error msgs } + dl_TimeReq : pTimeRequest; { private pointer to timer request } + dl_UtilityBase : PLibrary; { private ptr to utility library } + dl_IntuitionBase : PLibrary; + end; *) + + PRootNode = ^TRootNode; + TRootNode = record + rn_TaskArray : BPTR; { [0] is max number of CLI's + [1] is APTR to process id of CLI 1 + [n] is APTR to process id of CLI n } + rn_ConsoleSegment : BPTR; { SegList for the CLI } + rn_Time : TDateStamp; { Current time } + rn_RestartSeg : LongInt; { SegList for the disk validator process } + rn_Info : BPTR; { Pointer ot the Info structure } + rn_FileHandlerSegment : BPTR; { segment for a file handler } + rn_CliList : tMinList; { new list of all CLI processes } + { the first cpl_Array is also rn_TaskArray } + rn_BootProc : PMsgPort; { private ptr to msgport of boot fs } + rn_ShellSegment : BPTR; { seglist for Shell (for NewShell) } + rn_Flags : LongInt; { dos flags } + end; + +const + RNB_WILDSTAR = 24; + RNF_WILDSTAR = 16777216; + RNB_PRIVATE1 = 1; { private for dos } + RNF_PRIVATE1 = 2; + +type + PDosInfo = ^TDosInfo; + TDosInfo = record + case SmallInt of + 0 : ( + di_ResList : BPTR; + ); + 1 : ( + di_McName : BPTR; { Network name of this machine; currently 0 } + di_DevInfo : BPTR; { Device List } + di_Devices : BPTR; { Currently zero } + di_Handlers : BPTR; { Currently zero } + di_NetHand : Pointer; { Network handler processid; currently zero } + di_DevLock, { do NOT access directly! } + di_EntryLock, { do NOT access directly! } + di_DeleteLock : TSignalSemaphore; { do NOT access directly! } + ); + end; + +{ ONLY to be allocated by DOS! } + + PCliProcList = ^TCliProcList; + TCliProcList = record + cpl_Node : TMinNode; + cpl_First : LongInt; { number of first entry in array } + cpl_Array : Array[0..0] of PMsgPort; + { [0] is max number of CLI's in this entry (n) + * [1] is CPTR to process id of CLI cpl_First + * [n] is CPTR to process id of CLI cpl_First+n-1 + } + END; + +{ structure for the Dos resident list. Do NOT allocate these, use } +{ AddSegment(), and heed the warnings in the autodocs! } + +type + PSegment = ^TSegment; + TSegment = record + seg_Next : BPTR; + seg_UC : LongInt; + seg_Seg : BPTR; + seg_Name : Array[0..3] of Char; { actually the first 4 chars of BSTR name } + END; + +const + CMD_SYSTEM = -1; + CMD_INTERNAL = -2; + CMD_DISABLED = -999; + + +{ DOS Processes started from the CLI via RUN or NEWCLI have this additional + * set to data associated with them } +type + PCommandLineInterface = ^TCommandLineInterface; + TCommandLineInterface = record + cli_Result2 : LongInt; { Value of IoErr from last command } + cli_SetName : BSTR; { Name of current directory } + cli_CommandDir : BPTR; { Lock associated with command directory } + cli_ReturnCode : LongInt; { Return code from last command } + cli_CommandName : BSTR; { Name of current command } + cli_FailLevel : LongInt; { Fail level (set by FAILAT) } + cli_Prompt : BSTR; { Current prompt (set by PROMPT) } + cli_StandardInput : BPTR; { Default (terminal) CLI input } + cli_CurrentInput : BPTR; { Current CLI input } + cli_CommandFile : BSTR; { Name of EXECUTE command file } + cli_Interactive : LongInt; { Boolean; True if prompts required } + cli_Background : LongInt; { Boolean; True if CLI created by RUN } + cli_CurrentOutput : BPTR; { Current CLI output } + cli_DefaultStack : LongInt; { Stack size to be obtained in long words } + cli_StandardOutput : BPTR; { Default (terminal) CLI output } + cli_Module : BPTR; { SegList of currently loaded command } + end; + +{ This structure can take on different values depending on whether it is + * a device, an assigned directory, or a volume. Below is the structure + * reflecting volumes only. Following that is the structure representing + * only devices. + } + +{ structure representing a volume } + + PDeviceList = ^TDeviceList; + TDeviceList = record + dl_Next : BPTR; { bptr to next device list } + dl_Type : LongInt; { see DLT below } + dl_Task : PMsgPort; { ptr to handler task } + dl_Lock : BPTR; { not for volumes } + dl_VolumeDate : TDateStamp; { creation date } + dl_LockList : BPTR; { outstanding locks } + dl_DiskType : LongInt; { 'DOS', etc } + dl_unused : LongInt; + dl_Name : BSTR; { bptr to bcpl name } + end; + +{ device structure (same as the DeviceNode structure in filehandler.h) } + + PDevInfo = ^TDevInfo; + TDevInfo = record + dvi_Next : BPTR; + dvi_Type : LongInt; + dvi_Task : Pointer; + dvi_Lock : BPTR; + dvi_Handler : BSTR; + dvi_StackSize : LongInt; + dvi_Priority : LongInt; + dvi_Startup : LongInt; + dvi_SegList : BPTR; + dvi_GlobVec : BSTR; + dvi_Name : BSTR; + end; + +{ structure used for multi-directory assigns. AllocVec()ed. } + + PAssignList = ^TAssignList; + TAssignList = record + al_Next : PAssignList; + al_Lock : BPTR; + END; + + +{ combined structure for devices, assigned directories, volumes } + + PDosList = ^TDosList; + TDosList = record + dol_Next : BPTR; { bptr to next device on list } + dol_Type : LongInt; { see DLT below } + dol_Task : PMsgPort; { ptr to handler task } + dol_Lock : BPTR; + case SmallInt of + 0 : ( + dol_Handler : record + dol_Handler : BSTR; { file name to load IF seglist is null } + dol_StackSize, { stacksize to use when starting process } + dol_Priority, { task priority when starting process } + dol_Startup : LongInt; { startup msg: FileSysStartupMsg for disks } + dol_SegList, { already loaded code for new task } + dol_GlobVec : BPTR; { BCPL global vector to use when starting + * a process. -1 indicates a C/Assembler + * program. } + end; + ); + 1 : ( + dol_Volume : record + dol_VolumeDate : TDateStamp; { creation date } + dol_LockList : BPTR; { outstanding locks } + dol_DiskType : LongInt; { 'DOS', etc } + END; + ); + 2 : ( + dol_assign : record + dol_AssignName : STRPTR; { name for non-OR-late-binding assign } + dol_List : PAssignList; { for multi-directory assigns (regular) } + END; + dol_Name : BSTR; { bptr to bcpl name } + ); + END; + +const + +{ definitions for dl_Type } + + DLT_DEVICE = 0; + DLT_DIRECTORY = 1; + DLT_VOLUME = 2; + DLT_LATE = 3; { late-binding assign } + DLT_NONBINDING = 4; { non-binding assign } + DLT_PRIVATE = -1; { for internal use only } + +{ structure return by GetDeviceProc() } +type + + PDevProc = ^TDevProc; + TDevProc = record + dvp_Port : PMsgPort; + dvp_Lock : BPTR; + dvp_Flags : LongInt; + dvp_DevNode : PDosList; { DON'T TOUCH OR USE! } + END; + +const +{ definitions for dvp_Flags } + DVPB_UNLOCK = 0; + DVPF_UNLOCK = 1; + DVPB_ASSIGN = 1; + DVPF_ASSIGN = 2; + +{ Flags to be passed to LockDosList(), etc } + LDB_DEVICES = 2; + LDF_DEVICES = 4; + LDB_VOLUMES = 3; + LDF_VOLUMES = 8; + LDB_ASSIGNS = 4; + LDF_ASSIGNS = 16; + LDB_ENTRY = 5; + LDF_ENTRY = 32; + LDB_DELETE = 6; + LDF_DELETE = 64; + +{ you MUST specify one of LDF_READ or LDF_WRITE } + LDB_READ = 0; + LDF_READ = 1; + LDB_WRITE = 1; + LDF_WRITE = 2; + +{ actually all but LDF_ENTRY (which is used for internal locking) } + LDF_ALL = (LDF_DEVICES+LDF_VOLUMES+LDF_ASSIGNS); + +{ error report types for ErrorReport() } + REPORT_STREAM = 0; { a stream } + REPORT_TASK = 1; { a process - unused } + REPORT_LOCK = 2; { a lock } + REPORT_VOLUME = 3; { a volume node } + REPORT_INSERT = 4; { please insert volume } + +{ Special error codes for ErrorReport() } + ABORT_DISK_ERROR = 296; { Read/write error } + ABORT_BUSY = 288; { You MUST replace... } + +{ types for initial packets to shells from run/newcli/execute/system. } +{ For shell-writers only } + RUN_EXECUTE = -1; + RUN_SYSTEM = -2; + RUN_SYSTEM_ASYNCH = -3; + +{ Types for fib_DirEntryType. NOTE that both USERDIR and ROOT are } +{ directories, and that directory/file checks should use <0 and >=0. } +{ This is not necessarily exhaustive! Some handlers may use other } +{ values as needed, though <0 and >=0 should remain as supported as } +{ possible. } + ST_ROOT = 1 ; + ST_USERDIR = 2 ; + ST_SOFTLINK = 3 ; { looks like dir, but may point to a file! } + ST_LINKDIR = 4 ; { hard link to dir } + ST_FILE = -3; { must be negative for FIB! } + ST_LINKFILE = -4; { hard link to file } + ST_PIPEFILE = -5; { for pipes that support ExamineFH } + +type + +{ a lock structure, as returned by Lock() or DupLock() } + + PFileLock = ^TFileLock; + TFileLock = record + fl_Link : BPTR; { bcpl pointer to next lock } + fl_Key : LongInt; { disk block number } + fl_Access : LongInt; { exclusive or shared } + fl_Task : PMsgPort; { handler task's port } + fl_Volume : BPTR; { bptr to a DeviceList } + end; + + +{ NOTE: V37 dos.library, when doing ExAll() emulation, and V37 filesystems } +{ will return an error if passed ED_OWNER. If you get ERROR_BAD_NUMBER, } +{ retry with ED_COMMENT to get everything but owner info. All filesystems } +{ supporting ExAll() must support through ED_COMMENT, and must check type } +{ and return ERROR_BAD_NUMBER if they don't support the type. } + +{ values that can be passed for what data you want from ExAll() } +{ each higher value includes those below it (numerically) } +{ you MUST chose one of these values } +const + ED_NAME = 1; + ED_TYPE = 2; + ED_SIZE = 3; + ED_PROTECTION = 4; + ED_DATE = 5; + ED_COMMENT = 6; + ED_OWNER = 7; +{ + * Structure in which exall results are returned in. Note that only the + * fields asked for will exist! + } +type + PExAllData = ^TExAllData; + TExAllData = record + ed_Next : PExAllData; + ed_Name : STRPTR; + ed_Type, + ed_Size, + ed_Prot, + ed_Days, + ed_Mins, + ed_Ticks : ULONG; + ed_Comment : STRPTR; { strings will be after last used field } + ed_OwnerUID, { new for V39 } + ed_OwnerGID : Word; + END; + +{ + * Control structure passed to ExAll. Unused fields MUST be initialized to + * 0, expecially eac_LastKey. + * + * eac_MatchFunc is a hook (see utility.library documentation for usage) + * It should return true if the entry is to returned, false if it is to be + * ignored. + * + * This structure MUST be allocated by AllocDosObject()! + } + + PExAllControl = ^TExAllControl; + TExAllControl = record + eac_Entries, { number of entries returned in buffer } + eac_LastKey : ULONG; { Don't touch inbetween linked ExAll calls! } + eac_MatchString : STRPTR; { wildcard string for pattern match OR NULL } + eac_MatchFunc : pHook; { optional private wildcard FUNCTION } + END; + + + +{ The disk "environment" is a longword array that describes the + * disk geometry. It is variable sized, with the length at the beginning. + * Here are the constants for a standard geometry. +} + +type + + PDosEnvec = ^TDosEnvec; + TDosEnvec = record + de_TableSize : ULONG; { Size of Environment vector } + de_SizeBlock : ULONG; { in longwords: standard value is 128 } + de_SecOrg : ULONG; { not used; must be 0 } + de_Surfaces : ULONG; { # of heads (surfaces). drive specific } + de_SectorPerBlock : ULONG; { not used; must be 1 } + de_BlocksPerTrack : ULONG; { blocks per track. drive specific } + de_Reserved : ULONG; { DOS reserved blocks at start of partition. } + de_PreAlloc : ULONG; { DOS reserved blocks at end of partition } + de_Interleave : ULONG; { usually 0 } + de_LowCyl : ULONG; { starting cylinder. typically 0 } + de_HighCyl : ULONG; { max cylinder. drive specific } + de_NumBuffers : ULONG; { Initial # DOS of buffers. } + de_BufMemType : ULONG; { type of mem to allocate for buffers } + de_MaxTransfer : ULONG; { Max number of bytes to transfer at a time } + de_Mask : ULONG; { Address Mask to block out certain memory } + de_BootPri : LongInt; { Boot priority for autoboot } + de_DosType : ULONG; { ASCII (HEX) string showing filesystem type; + * 0X444F5300 is old filesystem, + * 0X444F5301 is fast file system } + de_Baud : ULONG; { Baud rate for serial handler } + de_Control : ULONG; { Control SmallInt for handler/filesystem } + de_BootBlocks : ULONG; { Number of blocks containing boot code } + end; + +const + +{ these are the offsets into the array } + + DE_TABLESIZE = 0; { standard value is 11 } + DE_SIZEBLOCK = 1; { in longwords: standard value is 128 } + DE_SECORG = 2; { not used; must be 0 } + DE_NUMHEADS = 3; { # of heads (surfaces). drive specific } + DE_SECSPERBLK = 4; { not used; must be 1 } + DE_BLKSPERTRACK = 5; { blocks per track. drive specific } + DE_RESERVEDBLKS = 6; { unavailable blocks at start. usually 2 } + DE_PREFAC = 7; { not used; must be 0 } + DE_INTERLEAVE = 8; { usually 0 } + DE_LOWCYL = 9; { starting cylinder. typically 0 } + DE_UPPERCYL = 10; { max cylinder. drive specific } + DE_NUMBUFFERS = 11; { starting # of buffers. typically 5 } + DE_MEMBUFTYPE = 12; { type of mem to allocate for buffers. } + DE_BUFMEMTYPE = 12; { same as above, better name + * 1 is public, 3 is chip, 5 is fast } + DE_MAXTRANSFER = 13; { Max number bytes to transfer at a time } + DE_MASK = 14; { Address Mask to block out certain memory } + DE_BOOTPRI = 15; { Boot priority for autoboot } + DE_DOSTYPE = 16; { ASCII (HEX) string showing filesystem type; + * 0X444F5300 is old filesystem, + * 0X444F5301 is fast file system } + DE_BAUD = 17; { Baud rate for serial handler } + DE_CONTROL = 18; { Control SmallInt for handler/filesystem } + DE_BOOTBLOCKS = 19; { Number of blocks containing boot code } + + +{ The file system startup message is linked into a device node's startup +** field. It contains a pointer to the above environment, plus the +** information needed to do an exec OpenDevice(). +} + +type + + PFileSysStartupMsg = ^TFileSysStartupMsg; + TFileSysStartupMsg = record + fssm_Unit : ULONG; { exec unit number for this device } + fssm_Device : BSTR; { null terminated bstring to the device name } + fssm_Environ : BPTR; { ptr to environment table (see above) } + fssm_Flags : ULONG; { flags for OpenDevice() } + end; + + +{ The include file "libraries/dosextens.h" has a DeviceList structure. + * The "device list" can have one of three different things linked onto + * it. Dosextens defines the structure for a volume. DLT_DIRECTORY + * is for an assigned directory. The following structure is for + * a dos "device" (DLT_DEVICE). +} + + PDeviceNode = ^TDeviceNode; + TDeviceNode = record + dn_Next : BPTR; { singly linked list } + dn_Type : ULONG; { always 0 for dos "devices" } + dn_Task : PMsgPort; { standard dos "task" field. If this is + * null when the node is accesses, a task + * will be started up } + dn_Lock : BPTR; { not used for devices -- leave null } + dn_Handler : BSTR; { filename to loadseg (if seglist is null) } + dn_StackSize : ULONG; { stacksize to use when starting task } + dn_Priority : LongInt; { task priority when starting task } + dn_Startup : BPTR; { startup msg: FileSysStartupMsg for disks } + dn_SegList : BPTR; { code to run to start new task (if necessary). + * if null then dn_Handler will be loaded. } + dn_GlobalVec : BPTR; { BCPL global vector to use when starting + * a task. -1 means that dn_SegList is not + * for a bcpl program, so the dos won't + * try and construct one. 0 tell the + * dos that you obey BCPL linkage rules, + * and that it should construct a global + * vector for you. + } + dn_Name : BSTR; { the node name, e.g. '\3','D','F','3' } + end; + +const +{ use of Class and code is discouraged for the time being - we might want to + change things } +{ --- NotifyMessage Class ------------------------------------------------ } + NOTIFY_CLASS = $40000000; + +{ --- NotifyMessage Codes ------------------------------------------------ } + NOTIFY_CODE = $1234; + + +{ Sent to the application if SEND_MESSAGE is specified. } + +type +{ Do not modify or reuse the notifyrequest while active. } +{ note: the first LONG of nr_Data has the length transfered } + + + PNotifyRequest = ^TNotifyRequest; + TNotifyRequest = record + nr_Name : PChar; + nr_FullName : PChar; + nr_UserData : LongWord; + nr_Flags : LongWord; + nr_stuff : record + case SmallInt of + 0 : ( nr_Msg : record + nr_Port : PMsgPort; + end ); + 1 : ( nr_Signal : record + nr_Task : pTask; + nr_SignalNum : Byte; + nr_pad : array[0..2] of Byte; + end ); + end; + nr_Reserved : array[0..3] of LongWord; + nr_MsgCount : LongWord; + nr_Handler : PMsgPort; + end; + + PNotifyMessage = ^TNotifyMessage; + TNotifyMessage = record + nm_ExecMessage : TMessage; + nm_Class : LongWord; + nm_Code : Word; + nm_NReq : PNotifyRequest; { don't modify the request! } + nm_DoNotTouch, { like it says! For use by handlers } + nm_DoNotTouch2 : LongWord; { ditto } + END; + + +const +{ --- NotifyRequest Flags ------------------------------------------------ } + NRF_SEND_MESSAGE = 1 ; + NRF_SEND_SIGNAL = 2 ; + NRF_WAIT_REPLY = 8 ; + NRF_NOTIFY_INITIAL = 16; + +{ do NOT set or remove NRF_MAGIC! Only for use by handlers! } + NRF_MAGIC = $80000000; + +{ bit numbers } + NRB_SEND_MESSAGE = 0; + NRB_SEND_SIGNAL = 1; + NRB_WAIT_REPLY = 3; + NRB_NOTIFY_INITIAL = 4; + + NRB_MAGIC = 31; + +{ Flags reserved for private use by the handler: } + NR_HANDLER_FLAGS = $ffff0000; + +{ ********************************************************************* + * + * The CSource data structure defines the input source for "ReadItem()" + * as well as the ReadArgs call. It is a publicly defined structure + * which may be used by applications which use code that follows the + * conventions defined for access. + * + * When passed to the dos.library functions, the value passed as + * struct *CSource is defined as follows: + * if ( CSource == 0) Use buffered IO "ReadChar()" as data source + * else Use CSource for input character stream + * + * The following two pseudo-code routines define how the CSource structure + * is used: + * + * long CS_ReadChar( struct CSource *CSource ) + * + * if ( CSource == 0 ) return ReadChar(); + * if ( CSource->CurChr >= CSource->Length ) return ENDSTREAMCHAR; + * return CSource->Buffer[ CSource->CurChr++ ]; + * + * + * BOOL CS_UnReadChar( struct CSource *CSource ) + * + * if ( CSource == 0 ) return UnReadChar(); + * if ( CSource->CurChr <= 0 ) return FALSE; + * CSource->CurChr--; + * return TRUE; + * + * + * To initialize a struct CSource, you set CSource->CS_Buffer to + * a string which is used as the data source, and set CS_Length to + * the number of characters in the string. Normally CS_CurChr should + * be initialized to ZERO, or left as it was from prior use as + * a CSource. + * + *********************************************************************} + +type + PCSource = ^TCSource; + TCSource = record + CS_Buffer : STRPTR; + CS_Length, + CS_CurChr : LongInt; + END; + +{ ********************************************************************* + * + * The RDArgs data structure is the input parameter passed to the DOS + * ReadArgs() function call. + * + * The RDA_Source structure is a CSource as defined above; + * if RDA_Source.CS_Buffer is non-null, RDA_Source is used as the input + * character stream to parse, else the input comes from the buffered STDIN + * calls ReadChar/UnReadChar. + * + * RDA_DAList is a private address which is used internally to track + * allocations which are freed by FreeArgs(). This MUST be initialized + * to NULL prior to the first call to ReadArgs(). + * + * The RDA_Buffer and RDA_BufSiz fields allow the application to supply + * a fixed-size buffer in which to store the parsed data. This allows + * the application to pre-allocate a buffer rather than requiring buffer + * space to be allocated. If either RDA_Buffer or RDA_BufSiz is NULL, + * the application has not supplied a buffer. + * + * RDA_ExtHelp is a text string which will be displayed instead of the + * template string, if the user is prompted for input. + * + * RDA_Flags bits control how ReadArgs() works. The flag bits are + * defined below. Defaults are initialized to ZERO. + * + *********************************************************************} + + PRDArgs = ^TRDArgs; + TRDArgs = record + RDA_Source : TCSource; { Select input source } + RDA_DAList : LongInt; { PRIVATE. } + RDA_Buffer : STRPTR; { Optional string parsing space. } + RDA_BufSiz : LongInt; { Size of RDA_Buffer (0..n) } + RDA_ExtHelp : STRPTR; { Optional extended help } + RDA_Flags : LongInt; { Flags for any required control } + END; + +const + RDAB_STDIN = 0; { Use "STDIN" rather than "COMMAND LINE" } + RDAF_STDIN = 1; + RDAB_NOALLOC = 1; { If set, do not allocate extra string space.} + RDAF_NOALLOC = 2; + RDAB_NOPROMPT = 2; { Disable reprompting for string input. } + RDAF_NOPROMPT = 4; + +{ ********************************************************************* + * Maximum number of template keywords which can be in a template passed + * to ReadArgs(). IMPLEMENTOR NOTE - must be a multiple of 4. + *********************************************************************} + MAX_TEMPLATE_ITEMS = 100; + +{ ********************************************************************* + * Maximum number of MULTIARG items returned by ReadArgs(), before + * an ERROR_LINE_TOO_LONG. These two limitations are due to stack + * usage. Applications should allow "a lot" of stack to use ReadArgs(). + *********************************************************************} + MAX_MULTIARGS = 128; + +const +{ Modes for LockRecord/LockRecords() } + REC_EXCLUSIVE = 0; + REC_EXCLUSIVE_IMMED = 1; + REC_SHARED = 2; + REC_SHARED_IMMED = 3; + +{ struct to be passed to LockRecords()/UnLockRecords() } + +type + PRecordLock = ^TRecordLock; + TRecordLock = record + rec_FH : BPTR; { filehandle } + rec_Offset, { offset in file } + rec_Length, { length of file to be locked } + rec_Mode : LongWord; { type of lock } + END; + + +{ the structure in the pr_LocalVars list } +{ Do NOT allocate yourself, use SetVar()!!! This structure may grow in } +{ future releases! The list should be left in alphabetical order, and } +{ may have multiple entries with the same name but different types. } +type + PLocalVar = ^TLocalVar; + TLocalVar = record + lv_Node : tNode; + lv_Flags : Word; + lv_Value : STRPTR; + lv_Len : LongWord; + END; + +{ + * The lv_Flags bits are available to the application. The unused + * lv_Node.ln_Pri bits are reserved for system use. + } + +const +{ bit definitions for lv_Node.ln_Type: } + LV_VAR = 0; { an variable } + LV_ALIAS = 1; { an alias } +{ to be or'ed into type: } + LVB_IGNORE = 7; { ignore this entry on GetVar, etc } + LVF_IGNORE = $80; + +{ definitions of flags passed to GetVar()/SetVar()/DeleteVar() } +{ bit defs to be OR'ed with the type: } +{ item will be treated as a single line of text unless BINARY_VAR is used } + GVB_GLOBAL_ONLY = 8 ; + GVF_GLOBAL_ONLY = $100; + GVB_LOCAL_ONLY = 9 ; + GVF_LOCAL_ONLY = $200; + GVB_BINARY_VAR = 10 ; { treat variable as binary } + GVF_BINARY_VAR = $400; + GVB_DONT_NULL_TERM = 11; { only with GVF_BINARY_VAR } + GVF_DONT_NULL_TERM = $800; + +{ this is only supported in >= V39 dos. V37 dos ignores this. } +{ this causes SetVar to affect ENVARC: as well as ENV:. } + GVB_SAVE_VAR = 12 ; { only with GVF_GLOBAL_VAR } + GVF_SAVE_VAR = $1000 ; + + +const +{ ***************************************************************************} +{ definitions for the System() call } + + SYS_Dummy = (TAG_USER + 32); + SYS_Input = (SYS_Dummy + 1); + { specifies the input filehandle } + SYS_Output = (SYS_Dummy + 2); + { specifies the output filehandle } + SYS_Asynch = (SYS_Dummy + 3); + { run asynch, close input/output on exit(!) } + SYS_UserShell = (SYS_Dummy + 4); + { send to user shell instead of boot shell } + SYS_CustomShell= (SYS_Dummy + 5); + { send to a specific shell (data is name) } +{ SYS_Error, } + + +{ ***************************************************************************} +{ definitions for the CreateNewProc() call } +{ you MUST specify one of NP_Seglist or NP_Entry. All else is optional. } + + NP_Dummy = (TAG_USER + 1000); + NP_Seglist = (NP_Dummy + 1); + { seglist of code to run for the process } + NP_FreeSeglist = (NP_Dummy + 2); + { free seglist on exit - only valid for } + { for NP_Seglist. Default is TRUE. } + NP_Entry = (NP_Dummy + 3); + { entry point to run - mutually exclusive } + { with NP_Seglist! } + NP_Input = (NP_Dummy + 4); + { filehandle - default is Open("NIL:"...) } + NP_Output = (NP_Dummy + 5); + { filehandle - default is Open("NIL:"...) } + NP_CloseInput = (NP_Dummy + 6); + { close input filehandle on exit } + { default TRUE } + NP_CloseOutput = (NP_Dummy + 7); + { close output filehandle on exit } + { default TRUE } + NP_Error = (NP_Dummy + 8); + { filehandle - default is Open("NIL:"...) } + NP_CloseError = (NP_Dummy + 9); + { close error filehandle on exit } + { default TRUE } + NP_CurrentDir = (NP_Dummy + 10); + { lock - default is parent's current dir } + NP_StackSize = (NP_Dummy + 11); + { stacksize for process - default 4000 } + NP_Name = (NP_Dummy + 12); + { name for process - default "New Process"} + NP_Priority = (NP_Dummy + 13); + { priority - default same as parent } + NP_ConsoleTask = (NP_Dummy + 14); + { consoletask - default same as parent } + NP_WindowPtr = (NP_Dummy + 15); + { window ptr - default is same as parent } + NP_HomeDir = (NP_Dummy + 16); + { home directory - default curr home dir } + NP_CopyVars = (NP_Dummy + 17); + { boolean to copy local vars-default TRUE } + NP_Cli = (NP_Dummy + 18); + { create cli structure - default FALSE } + NP_Path = (NP_Dummy + 19); + { path - default is copy of parents path } + { only valid if a cli process! } + NP_CommandName = (NP_Dummy + 20); + { commandname - valid only for CLI } + NP_Arguments = (NP_Dummy + 21); + { cstring of arguments - passed with str } + { in a0, length in d0. (copied and freed } + { on exit. Default is empty string. } + { NOTE: not operational until 2.04 - see } + { BIX/TechNotes for more info/workarounds } + { NOTE: in 2.0, it DIDN'T pass "" - the } + { registers were random. } +{ FIX! should this be only for cli's? } + NP_NotifyOnDeath = (NP_Dummy + 22); + { notify parent on death - default FALSE } + { Not functional yet. } + NP_Synchronous = (NP_Dummy + 23); + { don't return until process finishes - } + { default FALSE. } + { Not functional yet. } + NP_ExitCode = (NP_Dummy + 24); + { code to be called on process exit } + NP_ExitData = (NP_Dummy + 25); + { optional argument for NP_EndCode rtn - } + { default NULL } + + +{ ***************************************************************************} +{ tags for AllocDosObject } + + ADO_Dummy = (TAG_USER + 2000); + ADO_FH_Mode = (ADO_Dummy + 1); + { for type DOS_FILEHANDLE only } + { sets up FH for mode specified. + This can make a big difference for buffered + files. } + { The following are for DOS_CLI } + { If you do not specify these, dos will use it's preferred values } + { which may change from release to release. The BPTRs to these } + { will be set up correctly for you. Everything will be zero, } + { except cli_FailLevel (10) and cli_Background (DOSTRUE). } + { NOTE: you may also use these 4 tags with CreateNewProc. } + + ADO_DirLen = (ADO_Dummy + 2); + { size in bytes for current dir buffer } + ADO_CommNameLen= (ADO_Dummy + 3); + { size in bytes for command name buffer } + ADO_CommFileLen= (ADO_Dummy + 4); + { size in bytes for command file buffer } + ADO_PromptLen = (ADO_Dummy + 5); + { size in bytes for the prompt buffer } + +{ ***************************************************************************} +{ tags for NewLoadSeg } +{ no tags are defined yet for NewLoadSeg } + +procedure AbortPkt(Port : PMsgPort; Pkt : PDosPacket); +function AddBuffers(const Name : PChar; Number : LongInt) : Boolean; +function AddDosEntry(DList : PDosList) : Boolean; +function AddPart(dirname : PChar;const filename : PChar; size : LongWord) : Boolean; +function AddSegment(const Name : PChar; seg : LongInt; system : LongInt) : Boolean; +function AllocDosObject(Type_ : LongWord;const Tags : PTagItem) : Pointer; +//function AllocDosObjectTagList(Type_ : LongWord;const Tags : PTagItem) : Pointer; +function AssignAdd(const Name : PChar; Lock : LongInt) : Boolean; +function AssignLate(const Name : PChar;const Path : PChar) : Boolean; +function AssignLock(const Name : PChar; Lock : LongInt) : Boolean; +function AssignPath(const Name : PChar;const Path : PChar) : Boolean; +function AttemptLockDosList(Flags : LongWord) : PDosList; +function ChangeMode(Type_ : LongInt; fh : LongInt; NewMode : LongInt) : Boolean; +function CheckSignal(Mask : LongInt) : LongInt; +function Cli : PCommandLineInterface; +function CliInitNewcli(dp : PDosPacket) : LongInt; +function CliInitRun(dp : PDosPacket) : LongInt; +function CompareDates(const date1 : PDateStamp;const date2 : PDateStamp) : LongInt; +function CreateDir(const Name : PChar) : LongInt; +function CreateNewProc(const Tags : PTagItem) : pProcess; +//function CreateNewProcTagList(const Tags : PTagItem) : pProcess; +function CreateProc(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt) : PMsgPort; +function CurrentDir(Lock : LongInt) : LongInt; +procedure DateStamp(date : pDateStamp); +function DateToStr(datetime : PDateTime) : Boolean; +function DeleteFile(const Name : PChar) : Boolean; +function DeleteVar(const Name : PChar; Flags : LongWord) : Boolean; +function DeviceProc(const Name : PChar) : PMsgPort; +function DoPkt(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt) : LongInt; +{ +function DoPkt0(Port : PMsgPort; action : LongInt) : LongInt; +function DoPkt1(Port : PMsgPort; action : LongInt; arg1 : LongInt) : LongInt; +function DoPkt2(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt) : LongInt; +function DoPkt3(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt) : LongInt; +function DoPkt4(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt) : LongInt; +} +procedure DOSClose(file_ : LongInt); +procedure DOSDelay(timeout : LongInt); +procedure DOSExit(returnCode : LongInt); +function DOSFlush(fh : LongInt) : Boolean; +function DOSInput : LongInt; +function DOSOpen(const Name : PChar; accessMode : LongInt) : LongInt; +function DOSOutput : LongInt; +function DOSRead(file_ : LongInt; buffer : Pointer; length : LongInt) : LongInt; +function DOSRename(const oldName : PChar;const newName : PChar) : Boolean; +function DOSSeek(file_ : LongInt; position : LongInt; offset : LongInt) : LongInt; +function DOSWrite(file_ : LongInt; buffer : Pointer; length : LongInt) : LongInt; +function DupLock(Lock : LongInt) : LongInt; +function DupLockFromFH(fh : LongInt) : LongInt; +procedure EndNotify(notify : PNotifyRequest); +function ErrorReport(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort) : Boolean; +function ExAll(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl) : Boolean; +procedure ExAllEnd(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl); +function Examine(Lock : LongInt; fileInfoBlock : PFileInfoBlock) : Boolean; +function ExamineFH(fh : LongInt; fib : PFileInfoBlock) : Boolean; +function Execute(const string_ : PChar; file_ : LongInt; file2 : LongInt) : Boolean; +function ExNext(Lock : LongInt; fileInfoBlock : PFileInfoBlock) : Boolean; +function Fault(code : LongInt; header : PChar; buffer : PChar; len : LongInt) : Boolean; +function FGetC(fh : LongInt) : LongInt; +function FGets(fh : LongInt; buf : PChar; buflen : LongWord) : PChar; +function FilePart(const Path : PChar) : PChar; +function FindArg(const keyword : PChar;const arg_template : PChar) : LongInt; +function FindCliProc(num : LongWord) : pProcess; +function FindDosEntry(const DList : PDosList;const Name : PChar; Flags : LongWord) : PDosList; +function FindSegment(const Name : PChar;const seg : PSegment; system : LongInt) : PSegment; +function FindVar(const Name : PChar; Type_ : LongWord) : PLocalVar; +function dosFormat(const filesystem : PChar;const volumename : PChar; dostype : LongWord) : Boolean; +function FPutC(fh : LongInt; ch : LongInt) : LongInt; +function FPuts(fh : LongInt;const str : PChar) : Boolean; +function FRead(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord) : LongInt; +procedure FreeArgs(args : PRDArgs); +procedure FreeDeviceProc(dp : pDevProc); +procedure FreeDosEntry(DList : PDosList); +procedure FreeDosObject(Type_ : LongWord; ptr : Pointer); +function FWrite(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord) : LongInt; +function GetArgStr : PChar; +function GetConsoleTask : PMsgPort; +function GetCurrentDirName(buf : PChar; len : LongInt) : Boolean; +function GetDeviceProc(const Name : PChar; dp : pDevProc) : pDevProc; +function GetFileSysTask : PMsgPort; +function GetProgramDir : LongInt; +function GetProgramName(buf : PChar; len : LongInt) : Boolean; +function GetPrompt(buf : PChar; len : LongInt) : Boolean; +function GetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt) : LongInt; +function Info(Lock : LongInt; parameterBlock : PInfoData) : Boolean; +function Inhibit(const Name : PChar; onoff : LongInt) : Boolean; +function InternalLoadSeg(fh : LongInt; table : LongInt;const funcarray : pLONGINT; VAR stack : LongInt) : LongInt; +function InternalUnLoadSeg(seglist : LongInt; freefunc : tPROCEDURE) : Boolean; +function IoErr : LongInt; +function IsFileSystem(const Name : PChar) : Boolean; +function IsInteractive(file_ : LongInt) : Boolean; +function LoadSeg(const Name : PChar) : LongInt; +function Lock(const Name : PChar; Type_ : LongInt) : LongInt; +function LockDosList(Flags : LongWord) : PDosList; +function LockRecord(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord) : Boolean; +function LockRecords(recArray : PRecordLock; timeout : LongWord) : Boolean; +function MakeDosEntry(const Name : PChar; Type_ : LongInt) : PDosList; +function MakeLink(const Name : PChar; dest : LongInt; soft : LongInt) : Boolean; +procedure MatchEnd(anchor : PAnchorPath); +function MatchFirst(const pat : PChar; anchor : PAnchorPath) : LongInt; +function MatchNext(anchor : PAnchorPath) : LongInt; +function MatchPattern(const pat : PChar; str : PChar) : Boolean; +function MatchPatternNoCase(const pat : PChar; str : PChar) : Boolean; +function MaxCli : LongWord; +function NameFromFH(fh : LongInt; buffer : PChar; len : LongInt) : Boolean; +function NameFromLock(Lock : LongInt; buffer : PChar; len : LongInt) : Boolean; +function NewLoadSeg(const file_ : PChar;const Tags : PTagItem) : LongInt; +//function NewLoadSegTagList(const file_ : PChar;const Tags : PTagItem) : LongInt; +function NextDosEntry(const DList : PDosList; Flags : LongWord) : PDosList; +function OpenFromLock(Lock : LongInt) : LongInt; +function ParentDir(Lock : LongInt) : LongInt; +function ParentOfFH(fh : LongInt) : LongInt; +function ParsePattern(const pat : PChar; buf : PChar; buflen : LongInt) : LongInt; +function ParsePatternNoCase(const pat : PChar; buf : PChar; buflen : LongInt) : LongInt; +function PathPart(const Path : PChar) : PChar; +function PrintFault(code : LongInt;const header : PChar) : Boolean; +function PutStr(const str : PChar) : Boolean; +function ReadArgs(const arg_template : PChar; arra : pLONGINT; args : PRDArgs) : PRDArgs; +function ReadItem(const Name : PChar; maxchars : LongInt; cSource : PCSource) : LongInt; +function ReadLink(Port : PMsgPort; Lock : LongInt;const Path : PChar; buffer : PChar; size : LongWord) : Boolean; +function Relabel(const drive : PChar;const newname : PChar) : Boolean; +function RemAssignList(const Name : PChar; Lock : LongInt) : Boolean; +function RemDosEntry(DList : PDosList) : Boolean; +function RemSegment(seg : PSegment) : Boolean; +procedure ReplyPkt(dp : PDosPacket; res1 : LongInt; res2 : LongInt); +function RunCommand(seg : LongInt; stack : LongInt;const paramptr : PChar; paramlen : LongInt) : LongInt; +function SameDevice(lock1 : LongInt; lock2 : LongInt) : Boolean; +function SameLock(lock1 : LongInt; lock2 : LongInt) : LongInt; +function SelectInput(fh : LongInt) : LongInt; +function SelectOutput(fh : LongInt) : LongInt; +procedure SendPkt(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort); +function SetArgStr(const string_ : PChar) : Boolean; +function SetComment(const Name : PChar;const comment : PChar) : Boolean; +function SetConsoleTask(const task : PMsgPort) : PMsgPort; +function SetCurrentDirName(const Name : PChar) : Boolean; +function SetFileDate(const Name : PChar; date : pDateStamp) : Boolean; +function SetFileSize(fh : LongInt; pos : LongInt; mode : LongInt) : Boolean; +function SetFileSysTask(const task : PMsgPort) : PMsgPort; +function SetIoErr(result : LongInt) : LongInt; +function SetMode(fh : LongInt; mode : LongInt) : Boolean; +function SetOwner(const Name : PChar; owner_info : LongInt) : Boolean; +function SetProgramDir(Lock : LongInt) : LongInt; +function SetProgramName(const Name : PChar) : Boolean; +function SetPrompt(const Name : PChar) : Boolean; +function SetProtection(const Name : PChar; protect : LongInt) : Boolean; +function SetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt) : Boolean; +function SetVBuf(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt) : Boolean; +function SplitName(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt) : SmallInt; +function StartNotify(notify : PNotifyRequest) : Boolean; +function StrToDate(datetime : PDateTime) : Boolean; +function StrToLong(const string_ : PChar; VAR value : LongInt) : LongInt; +function SystemTagList(const command : PChar;const Tags : PTagItem) : LongInt; +//function DOSSystem(const command : PChar;const Tags : PTagItem) : LongInt; //* Real: SystemTagList ??? +function UnGetC(fh : LongInt; character : LongInt) : LongInt; +procedure UnLoadSeg(seglist : LongInt); +procedure UnLock(Lock : LongInt); +procedure UnLockDosList(Flags : LongWord); +function UnLockRecord(fh : LongInt; offset : LongWord; length : LongWord) : Boolean; +function UnLockRecords(recArray : PRecordLock) : Boolean; +function VFPrintf(fh : LongInt;const format : PChar;const argarray : Pointer) : LongInt; +procedure VFWritef(fh : LongInt;const format : PChar;const argarray : pLONGINT); +function VPrintf(const format : PChar; const argarray : Pointer) : LongInt; +function WaitForChar(file_ : LongInt; timeout : LongInt) : Boolean; +function WaitPkt : PDosPacket; +function WriteChars(const buf : PChar; buflen : LongWord) : LongInt; +{ +function BADDR(bval :BPTR): Pointer; +function MKBADDR(adr: Pointer): BPTR; +} + +{OVERLOADS} + +function AddBuffers(Name : string; Number : LongInt) : Boolean; +function AddPart(dirname : string;const filename : PChar; size : LongWord) : Boolean; +function AddPart(dirname : PChar;filename : string; size : LongWord) : Boolean; +function AddPart(dirname : string;filename : string; size : LongWord) : Boolean; +function AssignAdd(Name : string; Lock : LongInt) : Boolean; +function AssignLate(Name : string;const Path : PChar) : Boolean; +function AssignLate(const Name : PChar;Path : string) : Boolean; +function AssignLate(Name : string;Path : string) : Boolean; +function AssignLock(Name : string; Lock : LongInt) : Boolean; +function AssignPath(Name : string; const Path : PChar) : Boolean; +function AssignPath(const Name : PChar;Path : string) : Boolean; +function AssignPath(Name : string;Path : string) : Boolean; +function CreateDir(Name : string) : LongInt; +function CreateProc(Name : string; pri : LongInt; segList : LongInt; stackSize : LongInt) : PMsgPort; +function DeleteFile(Name : string) : Boolean; +function DeleteVar(Name : string; Flags : LongWord) : Boolean; +function DeviceProc(Name : string) : PMsgPort; +function DOSOpen(Name : string; accessMode : LongInt) : LongInt; +function DOSRename(oldName : string;const newName : PChar) : boolean; +function DOSRename(const oldName : PChar;newName : string) : Boolean; +function DOSRename(oldName : string;newName : string) : Boolean; +function Execute(string_ : string; file_ : LongInt; file2 : LongInt) : Boolean; +function Fault(code : LongInt; header : string; buffer : PChar; len : LongInt) : Boolean; +function FilePart(Path : string) : PChar; +function FindArg(keyword : string;const arg_template : PChar) : LongInt; +function FindArg(const keyword : PChar; arg_template : string) : LongInt; +function FindArg(keyword : string; arg_template : string) : LongInt; +function FindDosEntry(const DList : PDosList; Name : string; Flags : LongWord) : PDosList; +function FindSegment(Name : string;const seg : PSegment; system : LongInt) : PSegment; +function FindVar(Name : string; Type_ : LongWord) : PLocalVar; +function dosFormat(filesystem : string;const volumename : PChar; dostype : LongWord) : Boolean; +function dosFormat(const filesystem : PChar; volumename : string; dostype : LongWord) : Boolean; +function dosFormat(filesystem : string; volumename : string; dostype : LongWord) : Boolean; +function FPuts(fh : LongInt; str : string) : Boolean; +function GetDeviceProc(Name : string; dp : pDevProc) : pDevProc; +function GetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt) : LongInt; +function Inhibit(Name : string; onoff : LongInt) : Boolean; +function IsFileSystem(Name : string) : Boolean; +function LoadSeg(Name : string) : LongInt; +function Lock(Name : string; Type_ : LongInt) : LongInt; +function MakeDosEntry(Name : string; Type_ : LongInt) : PDosList; +function MakeLink(Name : string; dest : LongInt; soft : LongInt) : Boolean; +function MatchFirst(pat : string; anchor : PAnchorPath) : LongInt; +function MatchPattern(pat : string; str : PChar) : Boolean; +function MatchPattern(const pat : PChar; str : string) : Boolean; +function MatchPattern(pat : string; str : string) : Boolean; +function MatchPatternNoCase(pat : string; str : PChar) : Boolean; +function MatchPatternNoCase(const pat : PChar; str : string) : Boolean; +function MatchPatternNoCase(pat : string; str : string) : Boolean; +function NewLoadSeg(file_ : string;const Tags : PTagItem) : LongInt; +//function NewLoadSegTagList(const file_ : string;const Tags : PTagItem) : LongInt; +function PathPart(Path : string) : PChar; +function PrintFault(code : LongInt; header : string) : Boolean; +function PutStr(str : string) : Boolean; +function ReadArgs(arg_template : string; arra : pLONGINT; args : PRDArgs) : PRDArgs; +function ReadItem(Name : string; maxchars : LongInt; cSource : PCSource) : LongInt; +function ReadLink(Port : PMsgPort; Lock : LongInt; Path : string; buffer : PChar; size : LongWord) : Boolean; +function Relabel(drive : string;const newname : PChar) : Boolean; +function Relabel(const drive : PChar; newname : string) : Boolean; +function Relabel(drive : string; newname : string) : Boolean; +function RemAssignList(Name : string; Lock : LongInt) : Boolean; +function RunCommand(seg : LongInt; stack : LongInt; paramptr : string; paramlen : LongInt) : LongInt; +function SetArgStr(string_ : string) : Boolean; +function SetComment(Name : string;const comment : PChar) : Boolean; +function SetComment(const Name : PChar; comment : string) : Boolean; +function SetComment(Name : string; comment : string) : Boolean; +function SetCurrentDirName(Name : string) : Boolean; +function SetFileDate(Name : string; date : pDateStamp) : Boolean; +function SetOwner(Name : string; owner_info : LongInt) : Boolean; +function SetProgramName(Name : string) : Boolean; +function SetPrompt(Name : string) : Boolean; +function SetProtection(Name : string; protect : LongInt) : Boolean; +function SetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt) : Boolean; +function SplitName(Name : string; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt) : SmallInt; +function StrToLong(string_ : string; VAR value : LongInt) : LongInt; +function SystemTagList(command : string;const Tags : PTagItem) : LongInt; +// function DOSSystem(const command : string;const Tags : PTagItem) : LongInt; + + +IMPLEMENTATION + +uses pastoc; + + +procedure AbortPkt(Port : PMsgPort; Pkt : PDosPacket); +type + TLocalCall = procedure(Port : PMsgPort; Pkt : PDosPacket; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,44)); + Call( Port, Pkt, AOS_DOSBase); +End; + + +function AddBuffers(const Name : PChar; Number : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Number : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,122)); + AddBuffers:= Call( Name, Number, AOS_DOSBase); +End; + + +function AddDosEntry(DList : PDosList):Boolean; +type + TLocalCall = function(DList : PDosList; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,113)); + AddDosEntry:= Call( DList, AOS_DOSBase); +End; + + +function AddPart(dirname : PChar; const filename : PChar; size : LongWord):Boolean; +type + TLocalCall = function(dirname : PChar; const filename : PChar; size : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,147)); + AddPart:= Call( dirname, filename, size, AOS_DOSBase); +End; + + +function AddSegment(const Name : PChar; seg : LongInt; system : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; seg : LongInt; system : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,129)); + AddSegment:= Call( Name, seg, system, AOS_DOSBase); +End; + + +function AllocDosObject(Type_ : LongWord; const Tags : PTagItem):Pointer; +type + TLocalCall = function(Type_ : LongWord; const Tags : PTagItem; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,38)); + AllocDosObject:= Call( Type_, Tags, AOS_DOSBase); +End; + +{ +function AllocDosObjectTagList(Type_ : LongWord; const Tags : PTagItem):Pointer; +type + TLocalCall = function(Type_ : LongWord; const Tags : PTagItem; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + AllocDosObjectTagList:= Call( Type_, Tags, AOS_DOSBase); +End; +} + +function AssignAdd(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,105)); + AssignAdd:= Call( Name, Lock, AOS_DOSBase); +End; + + +function AssignLate(const Name : PChar; const Path : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const Path : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,103)); + AssignLate:= Call( Name, Path, AOS_DOSBase); +End; + + +function AssignLock(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,102)); + AssignLock:= Call( Name, Lock, AOS_DOSBase); +End; + + +function AssignPath(const Name : PChar; const Path : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const Path : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,104)); + AssignPath:= Call( Name, Path, AOS_DOSBase); +End; + + +function AttemptLockDosList(Flags : LongWord):PDosList; +type + TLocalCall = function(Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,111)); + AttemptLockDosList:= Call( Flags, AOS_DOSBase); +End; + + +function ChangeMode(Type_ : LongInt; fh : LongInt; NewMode : LongInt):Boolean; +type + TLocalCall = function(Type_ : LongInt; fh : LongInt; NewMode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,75)); + ChangeMode:= Call( Type_, fh, NewMode, AOS_DOSBase); +End; + + +function CheckSignal(Mask : LongInt):LongInt; +type + TLocalCall = function(Mask : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,132)); + CheckSignal:= Call( Mask, AOS_DOSBase); +End; + + +function Cli():PCommandLineInterface; +type + TLocalCall = function(LibBase: Pointer):PCommandLineInterface; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,82)); + Cli:= Call(AOS_DOSBase); +End; + + +function CliInitNewcli(dp : PDosPacket):LongInt; +type + TLocalCall = function(dp : PDosPacket; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,155)); + CliInitNewcli:= Call( dp, AOS_DOSBase); +End; + + +function CliInitRun(dp : PDosPacket):LongInt; +type + TLocalCall = function(dp : PDosPacket; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,156)); + CliInitRun:= Call( dp, AOS_DOSBase); +End; + + +function CompareDates(const date1 : pDateStamp; const date2 : pDateStamp):LongInt; +type + TLocalCall = function(const date1 : pDateStamp; const date2 : pDateStamp; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,123)); + CompareDates:= Call( date1, date2, AOS_DOSBase); +End; + + +function CreateDir(const Name : PChar):LongInt; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,20)); + CreateDir:= Call( Name, AOS_DOSBase); +End; + + +function CreateNewProc(const Tags : PTagItem):pProcess; +type + TLocalCall = function(const Tags : PTagItem; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,83)); + CreateNewProc:= Call( Tags, AOS_DOSBase); +End; + +{ +function CreateNewProcTagList(const Tags : PTagItem):pProcess; +type + TLocalCall = function(const Tags : PTagItem; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + CreateNewProcTagList:= Call( Tags, AOS_DOSBase); +End; +} + +function CreateProc(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt):PMsgPort; +type + TLocalCall = function(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,23)); + CreateProc:= Call( Name, pri, segList, stackSize, AOS_DOSBase); +End; + + +function CurrentDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,21)); + CurrentDir:= Call( Lock, AOS_DOSBase); +End; + + +procedure DateStamp(date : pDateStamp); +type + TLocalCall = procedure(date : pDateStamp; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,32)); + Call( date, AOS_DOSBase); +End; + + +function DateToStr(datetime : PDateTime):Boolean; +type + TLocalCall = function(datetime : PDateTime; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,124)); + DateToStr:= Call( datetime, AOS_DOSBase); +End; + + +function DeleteFile(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,12)); + DeleteFile:= Call( Name, AOS_DOSBase); +End; + + +function DeleteVar(const Name : PChar; Flags : LongWord):Boolean; +type + TLocalCall = function(const Name : PChar; Flags : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,152)); + DeleteVar:= Call( Name, Flags, AOS_DOSBase); +End; + + +function DeviceProc(const Name : PChar):PMsgPort; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,29)); + DeviceProc:= Call( Name, AOS_DOSBase); +End; + + +function DoPkt(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,40)); + DoPkt:= Call( Port, action, arg1, arg2, arg3, arg4, arg5, AOS_DOSBase); +End; + +{ +function DoPkt0(Port : PMsgPort; action : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt0:= Call( Port, action, AOS_DOSBase); +End; + + +function DoPkt1(Port : PMsgPort; action : LongInt; arg1 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt1:= Call( Port, action, arg1, AOS_DOSBase); +End; + + +function DoPkt2(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt2:= Call( Port, action, arg1, arg2, AOS_DOSBase); +End; + + +function DoPkt3(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt3:= Call( Port, action, arg1, arg2, arg3, AOS_DOSBase); +End; + + +function DoPkt4(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt4:= Call( Port, action, arg1, arg2, arg3, arg4, AOS_DOSBase); +End; +} + +procedure DOSClose(file_ : LongInt); +type + TLocalCall = procedure(file_ : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,15)); + Call( file_, AOS_DOSBase); +End; + + +procedure DOSDelay(timeout : LongInt); +type + TLocalCall = procedure(timeout : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,33)); + Call( timeout, AOS_DOSBase); +End; + + +procedure DOSExit(returnCode : LongInt); +type + TLocalCall = procedure(returnCode : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,24)); + Call( returnCode, AOS_DOSBase); +End; + + +function DOSFlush(fh : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,60)); + DOSFlush:= Call( fh, AOS_DOSBase); +End; + + +function DOSInput():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,9)); + DOSInput:= Call(AOS_DOSBase); +End; + + +function DOSOpen(const Name : PChar; accessMode : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; accessMode : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,5)); + DOSOpen:= Call( Name, accessMode, AOS_DOSBase); +End; + + +function DOSOutput():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,10)); + DOSOutput:= Call(AOS_DOSBase); +End; + + +function DOSRead(file_ : LongInt; buffer : Pointer; length : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; buffer : Pointer; length : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,7)); + DOSRead:= Call( file_, buffer, length, AOS_DOSBase); +End; + + +function DOSRename(const oldName : PChar; const newName : PChar):Boolean; +type + TLocalCall = function(const oldName : PChar; const newName : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,13)); + DOSRename:= Call( oldName, newName, AOS_DOSBase); +End; + + +function DOSSeek(file_ : LongInt; position : LongInt; offset : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; position : LongInt; offset : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,11)); + DOSSeek:= Call( file_, position, offset, AOS_DOSBase); +End; + + +function DOSWrite(file_ : LongInt; buffer : Pointer; length : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; buffer : Pointer; length : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,8)); + DOSWrite:= Call( file_, buffer, length, AOS_DOSBase); +End; + + +function DupLock(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,62)); + DupLock:= Call( Lock, AOS_DOSBase); +End; + + +function DupLockFromFH(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,62)); + DupLockFromFH:= Call( fh, AOS_DOSBase); +End; + + +procedure EndNotify(notify : PNotifyRequest); +type + TLocalCall = procedure(notify : PNotifyRequest; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,149)); + Call( notify, AOS_DOSBase); +End; + + +function ErrorReport(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort):Boolean; +type + TLocalCall = function(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,80)); + ErrorReport:= Call( code, Type_, arg1, device, AOS_DOSBase); +End; + + +function ExAll(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl):Boolean; +type + TLocalCall = function(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,72)); + ExAll:= Call( Lock, buffer, size, data, control, AOS_DOSBase); +End; + + +procedure ExAllEnd(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl); +type + TLocalCall = procedure(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,165)); + Call( Lock, buffer, size, data, control, AOS_DOSBase); +End; + + +function Examine(Lock : LongInt; fileInfoBlock : PFileInfoBlock):Boolean; +type + TLocalCall = function(Lock : LongInt; fileInfoBlock : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,65)); + Examine:= Call( Lock, fileInfoBlock, AOS_DOSBase); +End; + + +function ExamineFH(fh : LongInt; fib : PFileInfoBlock):Boolean; +type + TLocalCall = function(fh : LongInt; fib : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,65)); + ExamineFH:= Call( fh, fib, AOS_DOSBase); +End; + + +function Execute(const string_ : PChar; file_ : LongInt; file2 : LongInt):Boolean; +type + TLocalCall = function(const string_ : PChar; file_ : LongInt; file2 : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,37)); + Execute:= Call( string_, file_, file2, AOS_DOSBase); +End; + + +function ExNext(Lock : LongInt; fileInfoBlock : PFileInfoBlock):Boolean; +type + TLocalCall = function(Lock : LongInt; fileInfoBlock : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,18)); + ExNext:= Call( Lock, fileInfoBlock, AOS_DOSBase); +End; + + +function Fault(code : LongInt; header : PChar; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(code : LongInt; header : PChar; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,78)); + Fault:= Call( code, header, buffer, len, AOS_DOSBase); +End; + + +function FGetC(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,51)); + FGetC:= Call( fh, AOS_DOSBase); +End; + + +function FGets(fh : LongInt; buf : PChar; buflen : LongWord):PChar; +type + TLocalCall = function(fh : LongInt; buf : PChar; buflen : LongWord; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,56)); + FGets:= Call( fh, buf, buflen, AOS_DOSBase); +End; + + +function FilePart(const Path : PChar):PChar; +type + TLocalCall = function(const Path : PChar; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,145)); + FilePart:= Call( Path, AOS_DOSBase); +End; + + +function FindArg(const keyword : PChar; const arg_template : PChar):LongInt; +type + TLocalCall = function(const keyword : PChar; const arg_template : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,134)); + FindArg:= Call( keyword, arg_template, AOS_DOSBase); +End; + + +function FindCliProc(num : LongWord):pProcess; +type + TLocalCall = function(num : LongWord; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,91)); + FindCliProc:= Call( num, AOS_DOSBase); +End; + + +function FindDosEntry(const DList : PDosList; const Name : PChar; Flags : LongWord):PDosList; +type + TLocalCall = function(const DList : PDosList; const Name : PChar; Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,114)); + FindDosEntry:= Call( DList, Name, Flags, AOS_DOSBase); +End; + + +function FindSegment(const Name : PChar; const seg : PSegment; system : LongInt):PSegment; +type + TLocalCall = function(const Name : PChar; const seg : PSegment; system : LongInt; LibBase: Pointer):PSegment; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,130)); + FindSegment:= Call( Name, seg, system, AOS_DOSBase); +End; + + +function FindVar(const Name : PChar; Type_ : LongWord):PLocalVar; +type + TLocalCall = function(const Name : PChar; Type_ : LongWord; LibBase: Pointer):PLocalVar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,153)); + FindVar:= Call( Name, Type_, AOS_DOSBase); +End; + + +function dosFormat(const filesystem : PChar; const volumename : PChar; dostype : LongWord):Boolean; +type + TLocalCall = function(const filesystem : PChar; const volumename : PChar; dostype : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,119)); + dosFormat:= Call( filesystem, volumename, dostype, AOS_DOSBase); +End; + + +function FPutC(fh : LongInt; ch : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; ch : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,52)); + FPutC:= Call( fh, ch, AOS_DOSBase); +End; + + +function FPuts(fh : LongInt; const str : PChar):Boolean; +type + TLocalCall = function(fh : LongInt; const str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,57)); + FPuts:= Call( fh, str, AOS_DOSBase); +End; + + +function FRead(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord):LongInt; +type + TLocalCall = function(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,54)); + FRead:= Call( fh, block, blocklen, Number, AOS_DOSBase); +End; + + +procedure FreeArgs(args : PRDArgs); +type + TLocalCall = procedure(args : PRDArgs; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,143)); + Call( args, AOS_DOSBase); +End; + + +procedure FreeDeviceProc(dp : pDevProc); +type + TLocalCall = procedure(dp : pDevProc; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,108)); + Call( dp, AOS_DOSBase); +End; + + +procedure FreeDosEntry(DList : PDosList); +type + TLocalCall = procedure(DList : PDosList; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,117)); + Call( DList, AOS_DOSBase); +End; + + +procedure FreeDosObject(Type_ : LongWord; ptr : Pointer); +type + TLocalCall = procedure(Type_ : LongWord; ptr : Pointer; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,39)); + Call( Type_, ptr, AOS_DOSBase); +End; + + +function FWrite(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord):LongInt; +type + TLocalCall = function(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,55)); + FWrite:= Call( fh, block, blocklen, Number, AOS_DOSBase); +End; + + +function GetArgStr():PChar; +type + TLocalCall = function(LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,89)); + GetArgStr:= Call(AOS_DOSBase); +End; + + +function GetConsoleTask():PMsgPort; +type + TLocalCall = function(LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,85)); + GetConsoleTask:= Call(AOS_DOSBase); +End; + + +function GetCurrentDirName(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,94)); + GetCurrentDirName:= Call( buf, len, AOS_DOSBase); +End; + + +function GetDeviceProc(const Name : PChar; dp : pDevProc):pDevProc; +type + TLocalCall = function(const Name : PChar; dp : pDevProc; LibBase: Pointer):pDevProc; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,107)); + GetDeviceProc:= Call( Name, dp, AOS_DOSBase); +End; + + +function GetFileSysTask():PMsgPort; +type + TLocalCall = function(LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,87)); + GetFileSysTask:= Call(AOS_DOSBase); +End; + + +function GetProgramDir():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,100)); + GetProgramDir:= Call(AOS_DOSBase); +End; + + +function GetProgramName(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,96)); + GetProgramName:= Call( buf, len, AOS_DOSBase); +End; + + +function GetPrompt(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,98)); + GetPrompt:= Call( buf, len, AOS_DOSBase); +End; + + +function GetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,151)); + GetVar:= Call( Name, buffer, size, Flags, AOS_DOSBase); +End; + + +function Info(Lock : LongInt; parameterBlock : PInfoData):Boolean; +type + TLocalCall = function(Lock : LongInt; parameterBlock : PInfoData; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,19)); + Info:= Call( Lock, parameterBlock, AOS_DOSBase); +End; + + +function Inhibit(const Name : PChar; onoff : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; onoff : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,121)); + Inhibit:= Call( Name, onoff, AOS_DOSBase); +End; + + +function InternalLoadSeg(fh : LongInt; table : LongInt; const funcarray : pLONGINT; VAR stack : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; table : LongInt; const funcarray : pLONGINT; VAR stack : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,126)); + InternalLoadSeg:= Call( fh, table, funcarray, stack, AOS_DOSBase); +End; + + +function InternalUnLoadSeg(seglist : LongInt; freefunc : tPROCEDURE):Boolean; +type + TLocalCall = function(seglist : LongInt; freefunc : tPROCEDURE; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,127)); + InternalUnLoadSeg:= Call( seglist, freefunc, AOS_DOSBase); +End; + + +function IoErr():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,22)); + IoErr:= Call(AOS_DOSBase); +End; + + +function IsFileSystem(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,118)); + IsFileSystem:= Call( Name, AOS_DOSBase); +End; + + +function IsInteractive(file_ : LongInt):Boolean; +type + TLocalCall = function(file_ : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,36)); + IsInteractive:= Call( file_, AOS_DOSBase); +End; + + +function LoadSeg(const Name : PChar):LongInt; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,25)); + LoadSeg:= Call( Name, AOS_DOSBase); +End; + + +function Lock(const Name : PChar; Type_ : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; Type_ : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,14)); + Lock:= Call( Name, Type_, AOS_DOSBase); +End; + + +function LockDosList(Flags : LongWord):PDosList; +type + TLocalCall = function(Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,109)); + LockDosList:= Call( Flags, AOS_DOSBase); +End; + + +function LockRecord(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord):Boolean; +type + TLocalCall = function(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,45)); + LockRecord:= Call( fh, offset, length, mode, timeout, AOS_DOSBase); +End; + + +function LockRecords(recArray : PRecordLock; timeout : LongWord):Boolean; +type + TLocalCall = function(recArray : PRecordLock; timeout : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,46)); + LockRecords:= Call( recArray, timeout, AOS_DOSBase); +End; + + +function MakeDosEntry(const Name : PChar; Type_ : LongInt):PDosList; +type + TLocalCall = function(const Name : PChar; Type_ : LongInt; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,116)); + MakeDosEntry:= Call( Name, Type_, AOS_DOSBase); +End; + + +function MakeLink(const Name : PChar; dest : LongInt; soft : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; dest : LongInt; soft : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,74)); + MakeLink:= Call( Name, dest, soft, AOS_DOSBase); +End; + + +procedure MatchEnd(anchor : PAnchorPath); +type + TLocalCall = procedure(anchor : PAnchorPath; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,139)); + Call( anchor, AOS_DOSBase); +End; + + +function MatchFirst(const pat : PChar; anchor : PAnchorPath):LongInt; +type + TLocalCall = function(const pat : PChar; anchor : PAnchorPath; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,137)); + MatchFirst:= Call( pat, anchor, AOS_DOSBase); +End; + + +function MatchNext(anchor : PAnchorPath):LongInt; +type + TLocalCall = function(anchor : PAnchorPath; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,138)); + MatchNext:= Call( anchor, AOS_DOSBase); +End; + + +function MatchPattern(const pat : PChar; str : PChar):Boolean; +type + TLocalCall = function(const pat : PChar; str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,141)); + MatchPattern:= Call( pat, str, AOS_DOSBase); +End; + + +function MatchPatternNoCase(const pat : PChar; str : PChar):Boolean; +type + TLocalCall = function(const pat : PChar; str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,162)); + MatchPatternNoCase:= Call( pat, str, AOS_DOSBase); +End; + + +function MaxCli():LongWord; +type + TLocalCall = function(LibBase: Pointer):LongWord; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,92)); + MaxCli:= Call(AOS_DOSBase); +End; + + +function NameFromFH(fh : LongInt; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,68)); + NameFromFH:= Call( fh, buffer, len, AOS_DOSBase); +End; + + +function NameFromLock(Lock : LongInt; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(Lock : LongInt; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,68)); + NameFromLock:= Call( Lock, buffer, len, AOS_DOSBase); +End; + + +function NewLoadSeg(const file_ : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,128)); + NewLoadSeg:= Call( file_, Tags, AOS_DOSBase); +End; + +{ +function NewLoadSegTagList(const file_ : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + NewLoadSegTagList:= Call( file_, Tags, AOS_DOSBase); +End; +} + +function NextDosEntry(const DList : PDosList; Flags : LongWord):PDosList; +type + TLocalCall = function(const DList : PDosList; Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,115)); + NextDosEntry:= Call( DList, Flags, AOS_DOSBase); +End; + + +function OpenFromLock(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,63)); + OpenFromLock:= Call( Lock, AOS_DOSBase); +End; + + +function ParentDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,35)); + ParentDir:= Call( Lock, AOS_DOSBase); +End; + + +function ParentOfFH(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,64)); + ParentOfFH:= Call( fh, AOS_DOSBase); +End; + + +function ParsePattern(const pat : PChar; buf : PChar; buflen : LongInt):LongInt; +type + TLocalCall = function(const pat : PChar; buf : PChar; buflen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,140)); + ParsePattern:= Call( pat, buf, buflen, AOS_DOSBase); +End; + + +function ParsePatternNoCase(const pat : PChar; buf : PChar; buflen : LongInt):LongInt; +type + TLocalCall = function(const pat : PChar; buf : PChar; buflen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,161)); + ParsePatternNoCase:= Call( pat, buf, buflen, AOS_DOSBase); +End; + + +function PathPart(const Path : PChar):PChar; +type + TLocalCall = function(const Path : PChar; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,146)); + PathPart:= Call( Path, AOS_DOSBase); +End; + + +function PrintFault(code : LongInt; const header : PChar):Boolean; +type + TLocalCall = function(code : LongInt; const header : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,79)); + PrintFault:= Call( code, header, AOS_DOSBase); +End; + + +function PutStr(const str : PChar):Boolean; +type + TLocalCall = function(const str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,158)); + PutStr:= Call( str, AOS_DOSBase); +End; + + +function ReadArgs(const arg_template : PChar; arra : pLONGINT; args : PRDArgs):PRDArgs; +type + TLocalCall = function(const arg_template : PChar; arra : pLONGINT; args : PRDArgs; LibBase: Pointer):PRDArgs; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,133)); + ReadArgs:= Call( arg_template, arra, args, AOS_DOSBase); +End; + + +function ReadItem(const Name : PChar; maxchars : LongInt; cSource : PCSource):LongInt; +type + TLocalCall = function(const Name : PChar; maxchars : LongInt; cSource : PCSource; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,135)); + ReadItem:= Call( Name, maxchars, cSource, AOS_DOSBase); +End; + + +function ReadLink(Port : PMsgPort; Lock : LongInt; const Path : PChar; buffer : PChar; size : LongWord):Boolean; +type + TLocalCall = function(Port : PMsgPort; Lock : LongInt; const Path : PChar; buffer : PChar; size : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,73)); + ReadLink:= Call( Port, Lock, Path, buffer, size, AOS_DOSBase); +End; + + +function Relabel(const drive : PChar; const newname : PChar):Boolean; +type + TLocalCall = function(const drive : PChar; const newname : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,120)); + Relabel:= Call( drive, newname, AOS_DOSBase); +End; + + +function RemAssignList(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,106)); + RemAssignList:= Call( Name, Lock, AOS_DOSBase); +End; + + +function RemDosEntry(DList : PDosList):Boolean; +type + TLocalCall = function(DList : PDosList; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,112)); + RemDosEntry:= Call( DList, AOS_DOSBase); +End; + + +function RemSegment(seg : PSegment):Boolean; +type + TLocalCall = function(seg : PSegment; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,131)); + RemSegment:= Call( seg, AOS_DOSBase); +End; + + +procedure ReplyPkt(dp : PDosPacket; res1 : LongInt; res2 : LongInt); +type + TLocalCall = procedure(dp : PDosPacket; res1 : LongInt; res2 : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,43)); + Call( dp, res1, res2, AOS_DOSBase); +End; + + +function RunCommand(seg : LongInt; stack : LongInt; const paramptr : PChar; paramlen : LongInt):LongInt; +type + TLocalCall = function(seg : LongInt; stack : LongInt; const paramptr : PChar; paramlen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,84)); + RunCommand:= Call( seg, stack, paramptr, paramlen, AOS_DOSBase); +End; + + +function SameDevice(lock1 : LongInt; lock2 : LongInt):Boolean; +type + TLocalCall = function(lock1 : LongInt; lock2 : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,164)); + SameDevice:= Call( lock1, lock2, AOS_DOSBase); +End; + + +function SameLock(lock1 : LongInt; lock2 : LongInt):LongInt; +type + TLocalCall = function(lock1 : LongInt; lock2 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,70)); + SameLock:= Call( lock1, lock2, AOS_DOSBase); +End; + + +function SelectInput(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,49)); + SelectInput:= Call( fh, AOS_DOSBase); +End; + + +function SelectOutput(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,50)); + SelectOutput:= Call( fh, AOS_DOSBase); +End; + + +procedure SendPkt(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort); +type + TLocalCall = procedure(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,41)); + Call( dp, Port, replyport, AOS_DOSBase); +End; + + +function SetArgStr(const string_ : PChar):Boolean; +type + TLocalCall = function(const string_ : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,90)); + SetArgStr:= Call( string_, AOS_DOSBase); +End; + + +function SetComment(const Name : PChar; const comment : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const comment : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,30)); + SetComment:= Call( Name, comment, AOS_DOSBase); +End; + + +function SetConsoleTask(const task : PMsgPort):PMsgPort; +type + TLocalCall = function(const task : PMsgPort; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,86)); + SetConsoleTask:= Call( task, AOS_DOSBase); +End; + + +function SetCurrentDirName(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,93)); + SetCurrentDirName:= Call( Name, AOS_DOSBase); +End; + + +function SetFileDate(const Name : PChar; date : pDateStamp):Boolean; +type + TLocalCall = function(const Name : PChar; date : pDateStamp; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,66)); + SetFileDate:= Call( Name, date, AOS_DOSBase); +End; + + +function SetFileSize(fh : LongInt; pos : LongInt; mode : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; pos : LongInt; mode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,76)); + SetFileSize:= Call( fh, pos, mode, AOS_DOSBase); +End; + + +function SetFileSysTask(const task : PMsgPort):PMsgPort; +type + TLocalCall = function(const task : PMsgPort; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,88)); + SetFileSysTask:= Call( task, AOS_DOSBase); +End; + + +function SetIoErr(result : LongInt):LongInt; +type + TLocalCall = function(result : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,77)); + SetIoErr:= Call( result, AOS_DOSBase); +End; + + +function SetMode(fh : LongInt; mode : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; mode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,71)); + SetMode:= Call( fh, mode, AOS_DOSBase); +End; + + +function SetOwner(const Name : PChar; owner_info : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; owner_info : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,166)); + SetOwner:= Call( Name, owner_info, AOS_DOSBase); +End; + + +function SetProgramDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,99)); + SetProgramDir:= Call( Lock, AOS_DOSBase); +End; + + +function SetProgramName(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,95)); + SetProgramName:= Call( Name, AOS_DOSBase); +End; + + +function SetPrompt(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,97)); + SetPrompt:= Call( Name, AOS_DOSBase); +End; + + +function SetProtection(const Name : PChar; protect : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; protect : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,31)); + SetProtection:= Call( Name, protect, AOS_DOSBase); +End; + + +function SetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,150)); + SetVar:= Call( Name, buffer, size, Flags, AOS_DOSBase); +End; + + +function SetVBuf(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,61)); + SetVBuf:= Call( fh, buff, Type_, size, AOS_DOSBase); +End; + + +function SplitName(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt):SmallInt; +type + TLocalCall = function(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt; LibBase: Pointer):SmallInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,69)); + SplitName:= Call( Name, seperator, buf, oldpos, size, AOS_DOSBase); +End; + + +function StartNotify(notify : PNotifyRequest):Boolean; +type + TLocalCall = function(notify : PNotifyRequest; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,148)); + StartNotify:= Call( notify, AOS_DOSBase); +End; + + +function StrToDate(datetime : PDateTime):Boolean; +type + TLocalCall = function(datetime : PDateTime; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,125)); + StrToDate:= Call( datetime, AOS_DOSBase); +End; + + +function StrToLong(const string_ : PChar; VAR value : LongInt):LongInt; +type + TLocalCall = function(const string_ : PChar; VAR value : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,136)); + StrToLong:= Call( string_, value, AOS_DOSBase); +End; + + +function SystemTagList(const command : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,101)); + SystemTagList:= Call( command, Tags, AOS_DOSBase); +End; + +{ +function DOSSystem(const command : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DOSSystem:= Call( command, Tags, AOS_DOSBase); +End; +} + +function UnGetC(fh : LongInt; character : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; character : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,53)); + UnGetC:= Call( fh, character, AOS_DOSBase); +End; + + +procedure UnLoadSeg(seglist : LongInt); +type + TLocalCall = procedure(seglist : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,26)); + Call( seglist, AOS_DOSBase); +End; + + +procedure UnLock(Lock : LongInt); +type + TLocalCall = procedure(Lock : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,15)); + Call( Lock, AOS_DOSBase); +End; + + +procedure UnLockDosList(Flags : LongWord); +type + TLocalCall = procedure(Flags : LongWord; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,110)); + Call( Flags, AOS_DOSBase); +End; + + +function UnLockRecord(fh : LongInt; offset : LongWord; length : LongWord):Boolean; +type + TLocalCall = function(fh : LongInt; offset : LongWord; length : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,47)); + UnLockRecord:= Call( fh, offset, length, AOS_DOSBase); +End; + + +function UnLockRecords(recArray : PRecordLock):Boolean; +type + TLocalCall = function(recArray : PRecordLock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,48)); + UnLockRecords:= Call( recArray, AOS_DOSBase); +End; + + +function VFPrintf(fh : LongInt; const format : PChar; const argarray : Pointer):LongInt; +type + TLocalCall = function(fh : LongInt; const format : PChar; const argarray : Pointer; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,59)); + VFPrintf:= Call( fh, format, argarray, AOS_DOSBase); +End; + + +procedure VFWritef(fh : LongInt; const format : PChar; const argarray : pLONGINT); +type + TLocalCall = procedure(fh : LongInt; const format : PChar; const argarray : pLONGINT; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,58)); + Call( fh, format, argarray, AOS_DOSBase); +End; + + +function VPrintf(const format : PChar; const argarray : Pointer):LongInt; +type + TLocalCall = function(const format : PChar; const argarray : Pointer; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,159)); + VPrintf:= Call( format, argarray, AOS_DOSBase); +End; + + +function WaitForChar(file_ : LongInt; timeout : LongInt):Boolean; +type + TLocalCall = function(file_ : LongInt; timeout : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,34)); + WaitForChar:= Call( file_, timeout, AOS_DOSBase); +End; + + +function WaitPkt():PDosPacket; +type + TLocalCall = function(LibBase: Pointer):PDosPacket; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,42)); + WaitPkt:= Call(AOS_DOSBase); +End; + + +function WriteChars(const buf : PChar; buflen : LongWord):LongInt; +type + TLocalCall = function(const buf : PChar; buflen : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,157)); + WriteChars:= Call( buf, buflen, AOS_DOSBase); +End; + +{ +function BADDR(bval :BPTR):Pointer; +type + TLocalCall = function(bval :BPTR; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + BADDR:= Call( bval, AOS_DOSBase); +End; + + +function MKBADDR(adr: Pointer):BPTR; +type + TLocalCall = function(adr: Pointer; LibBase: Pointer):BPTR; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + MKBADDR:= Call( adr, AOS_DOSBase); +End; +} + +{OVERLOADS} + +function AddBuffers(Name : string; Number : LongInt):Boolean; +Begin + AddBuffers := AddBuffers( pas2c(Name), Number); +End; + + +function AddPart(dirname : string; const filename : PChar; size : LongWord):Boolean; +Begin + AddPart:= AddPart( pas2c(dirname), filename, size); +End; + + +function AddPart(dirname : PChar; filename : string; size : LongWord):Boolean; +Begin + AddPart:= AddPart( dirname, pas2c(filename), size); +End; + + +function AddPart(dirname : string; filename : string; size : LongWord):Boolean; +Begin + AddPart:= AddPart( pas2c(dirname), pas2c(filename), size); +End; + + +function AssignAdd(Name : string; Lock : LongInt):Boolean; +Begin + AssignAdd:= AssignAdd( pas2c(Name), Lock); +End; + + +function AssignLate(Name : string; const Path : PChar):Boolean; +Begin + AssignLate:= AssignLate( pas2c(Name), Path); +End; + + +function AssignLate(const Name : PChar; Path : string):Boolean; +Begin + AssignLate:= AssignLate( Name, pas2c(Path)); +End; + + +function AssignLate(Name : string; Path : string):Boolean; +Begin + AssignLate:= AssignLate( pas2c(Name), pas2c(Path)); +End; + + +function AssignLock(Name : string; Lock : LongInt):Boolean; +Begin + AssignLock:= AssignLock( pas2c(Name), Lock); +End; + + +function AssignPath(Name : string; const Path : PChar):Boolean; +Begin + AssignPath:= AssignPath( pas2c(Name), Path); +End; + + +function AssignPath(const Name : PChar; Path : string):Boolean; +Begin + AssignPath:= AssignPath( Name, pas2c(Path)); +End; + + +function AssignPath(Name : string; Path : string):Boolean; +Begin + AssignPath:= AssignPath( pas2c(Name), pas2c(Path)); +End; + + +function CreateDir(Name : string):LongInt; +Begin + CreateDir:= CreateDir( pas2c(Name)); +End; + + +function CreateProc(Name : string; pri : LongInt; segList : LongInt; stackSize : LongInt):PMsgPort; +Begin + CreateProc:= CreateProc( pas2c(Name), pri, segList, stackSize); +End; + + +function DeleteFile(Name : string):Boolean; +Begin + DeleteFile:= DeleteFile( pas2c(Name)); +End; + + +function DeleteVar(Name : string; Flags : LongWord):Boolean; +Begin + DeleteVar:= DeleteVar( pas2c(Name), Flags); +End; + + +function DeviceProc(Name : string):PMsgPort; +Begin + DeviceProc:= DeviceProc( pas2c(Name)); +End; + + +function DOSOpen(Name : string; accessMode : LongInt):LongInt; +Begin + DOSOpen:= DOSOpen( pas2c(Name), accessMode); +End; + + +function DOSRename(oldName : string; const newName : PChar):boolean; +Begin + DOSRename:= DOSRename( pas2c(oldName), newName); +End; + + +function DOSRename(const oldName : PChar; newName : string):Boolean; +Begin + DOSRename:= DOSRename( oldName, pas2c(newName)); +End; + + +function DOSRename(oldName : string; newName : string):Boolean; +Begin + DOSRename:= DOSRename( pas2c(oldName), pas2c(newName)); +End; + + +function Execute(string_ : string; file_ : LongInt; file2 : LongInt):Boolean; +Begin + Execute:= Execute( pas2c(string_), file_, file2); +End; + + +function Fault(code : LongInt; header : string; buffer : PChar; len : LongInt):Boolean; +Begin + Fault:= Fault( code, pas2c(header), buffer, len); +End; + + +function FilePart(Path : string):PChar; +Begin + FilePart:= FilePart( pas2c(Path)); +End; + + +function FindArg(keyword : string; const arg_template : PChar):LongInt; +Begin + FindArg:= FindArg( pas2c(keyword), arg_template); +End; + + +function FindArg(const keyword : PChar; arg_template : string):LongInt; +Begin + FindArg:= FindArg( keyword, pas2c(arg_template)); +End; + + +function FindArg(keyword : string; arg_template : string):LongInt; +Begin + FindArg:= FindArg( pas2c(keyword), pas2c(arg_template)); +End; + + +function FindDosEntry(const DList : PDosList; Name : string; Flags : LongWord):PDosList; +Begin + FindDosEntry:= FindDosEntry( DList, pas2c(Name), Flags); +End; + + +function FindSegment(Name : string; const seg : PSegment; system : LongInt):PSegment; +Begin + FindSegment:= FindSegment( pas2c(Name), seg, system); +End; + + +function FindVar(Name : string; Type_ : LongWord):PLocalVar; +Begin + FindVar:= FindVar( pas2c(Name), Type_); +End; + + +function dosFormat(filesystem : string; const volumename : PChar; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( pas2c(filesystem), volumename, dostype); +End; + + +function dosFormat(const filesystem : PChar; volumename : string; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( filesystem, pas2c(volumename), dostype); +End; + + +function dosFormat(filesystem : string; volumename : string; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( pas2c(filesystem), pas2c(volumename), dostype); +End; + + +function FPuts(fh : LongInt; str : string):Boolean; +Begin + FPuts:= FPuts( fh, pas2c(str)); +End; + + +function GetDeviceProc(Name : string; dp : pDevProc):pDevProc; +Begin + GetDeviceProc:= GetDeviceProc( pas2c(Name), dp); +End; + + +function GetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt):LongInt; +Begin + GetVar:= GetVar( pas2c(Name), buffer, size, Flags); +End; + + +function Inhibit(Name : string; onoff : LongInt):Boolean; +Begin + Inhibit:= Inhibit( pas2c(Name), onoff); +End; + + +function IsFileSystem(Name : string):Boolean; +Begin + IsFileSystem:= IsFileSystem( pas2c(Name)); +End; + + +function LoadSeg(Name : string):LongInt; +Begin + LoadSeg:= LoadSeg( pas2c(Name)); +End; + + +function Lock(Name : string; Type_ : LongInt):LongInt; +Begin + Lock:= Lock( pas2c(Name), Type_); +End; + + +function MakeDosEntry(Name : string; Type_ : LongInt):PDosList; +Begin + MakeDosEntry:= MakeDosEntry( pas2c(Name), Type_); +End; + + +function MakeLink(Name : string; dest : LongInt; soft : LongInt):Boolean; +Begin + MakeLink:= MakeLink( pas2c(Name), dest, soft); +End; + + +function MatchFirst(pat : string; anchor : PAnchorPath):LongInt; +Begin + MatchFirst:= MatchFirst( pas2c(pat), anchor); +End; + + +function MatchPattern(pat : string; str : PChar):Boolean; +Begin + MatchPattern:= MatchPattern( pas2c(pat), str); +End; + + +function MatchPattern(const pat : PChar; str : string):Boolean; +Begin + MatchPattern:= MatchPattern( pat, pas2c(str)); +End; + + +function MatchPattern(pat : string; str : string):Boolean; +Begin + MatchPattern:= MatchPattern( pas2c(pat), pas2c(str)); +End; + + +function MatchPatternNoCase(pat : string; str : PChar):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pas2c(pat), str); +End; + + +function MatchPatternNoCase(const pat : PChar; str : string):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pat, pas2c(str)); +End; + + +function MatchPatternNoCase(pat : string; str : string):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pas2c(pat), pas2c(str)); +End; + + +function NewLoadSeg(file_ : string; const Tags : PTagItem):LongInt; +Begin + NewLoadSeg:= NewLoadSeg( pas2c(file_), Tags); +End; + +{ +function NewLoadSegTagList(const file_ : string; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : string; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + NewLoadSegTagList:= Call( file_, Tags, AOS_DOSBase); +End; +} + +function PathPart(Path : string):PChar; +Begin + PathPart:= PathPart( pas2c(Path)); +End; + + +function PrintFault(code : LongInt; header : string):Boolean; +Begin + PrintFault:= PrintFault( code, pas2c(header)); +End; + + +function PutStr(str : string):Boolean; +Begin + PutStr:= PutStr( pas2c(str)); +End; + + +function ReadArgs(arg_template : string; arra : pLONGINT; args : PRDArgs):PRDArgs; +Begin + ReadArgs:= ReadArgs( pas2c(arg_template), arra, args); +End; + + +function ReadItem(Name : string; maxchars : LongInt; cSource : PCSource):LongInt; +Begin + ReadItem:= ReadItem( pas2c(Name), maxchars, cSource); +End; + + +function ReadLink(Port : PMsgPort; Lock : LongInt; Path : string; buffer : PChar; size : LongWord):Boolean; +Begin + ReadLink:= ReadLink( Port, Lock, pas2c(Path), buffer, size); +End; + + +function Relabel(drive : string; const newname : PChar):Boolean; +Begin + Relabel:= Relabel( pas2c(drive), newname); +End; + + +function Relabel(const drive : PChar; newname : string):Boolean; +Begin + Relabel:= Relabel( drive, pas2c(newname)); +End; + + +function Relabel(drive : string; newname : string):Boolean; +Begin + Relabel:= Relabel( pas2c(drive), pas2c(newname)); +End; + + +function RemAssignList(Name : string; Lock : LongInt):Boolean; +Begin + RemAssignList:= RemAssignList( pas2c(Name), Lock); +End; + + +function RunCommand(seg : LongInt; stack : LongInt; paramptr : string; paramlen : LongInt):LongInt; +Begin + RunCommand:= RunCommand( seg, stack, pas2c(paramptr), paramlen); +End; + + +function SetArgStr(string_ : string):Boolean; +Begin + SetArgStr:= SetArgStr( pas2c(string_)); +End; + + +function SetComment(Name : string; const comment : PChar):Boolean; +Begin + SetComment:= SetComment( pas2c(Name), comment); +End; + + +function SetComment(const Name : PChar; comment : string):Boolean; +Begin + SetComment:= SetComment( Name, pas2c(comment)); +End; + + +function SetComment(Name : string; comment : string):Boolean; +Begin + SetComment:= SetComment( pas2c(Name), pas2c(comment)); +End; + + +function SetCurrentDirName(Name : string):Boolean; +Begin + SetCurrentDirName:= SetCurrentDirName( pas2c(Name)); +End; + + +function SetFileDate(Name : string; date : pDateStamp):Boolean; +Begin + SetFileDate:= SetFileDate( pas2c(Name), date); +End; + + +function SetOwner(Name : string; owner_info : LongInt):Boolean; +Begin + SetOwner:= SetOwner( pas2c(Name), owner_info); +End; + + +function SetProgramName(Name : string):Boolean; +Begin + SetProgramName:= SetProgramName( pas2c(Name)); +End; + + +function SetPrompt(Name : string):Boolean; +Begin + SetPrompt:= SetPrompt( pas2c(Name)); +End; + + +function SetProtection(Name : string; protect : LongInt):Boolean; +Begin + SetProtection:= SetProtection( pas2c(Name), protect); +End; + + +function SetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt):Boolean; +Begin + SetVar:= SetVar( pas2c(Name), buffer, size, Flags); +End; + + +function SplitName(Name : string; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt):SmallInt; +Begin + SplitName:= SplitName( pas2c(Name), seperator, buf, oldpos, size); +End; + + +function StrToLong(string_ : string; VAR value : LongInt):LongInt; +Begin + StrToLong:= StrToLong( pas2c(string_), value); +End; + + +function SystemTagList(command : string; const Tags : PTagItem):LongInt; +Begin + SystemTagList:= SystemTagList( pas2c(command), Tags); +End; + +{ +function DOSSystem(const command : string; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : string; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DOSSystem:= Call( command, Tags, AOS_DOSBase); +End; +} + +END. (* UNIT DOS *) + + diff --git a/rtl/aros/dos.pp b/rtl/aros/dos.pp index 5a9d96142d..e512a5e83e 100644 --- a/rtl/aros/dos.pp +++ b/rtl/aros/dos.pp @@ -919,24 +919,73 @@ begin GetPathString := Temp; end; -function EnvCount: Longint; -{ HOW TO GET THIS VALUE: } -{ Each time this function is called, we look at the } -{ local variables in the Process structure (2.0+) } -{ And we also read all files in the ENV: directory } +var + EnvList: array of record + Name: string; + Value: string; + end; + +procedure InitEnvironmentStrings; +Const + BUFFER_SIZE = 254; +Var + ThisProcess: PProcess; + LocalVars_List: PMinList; // Local Var structure in struct process (pr_LocalVarsis is actually a minlist + LocalVar_Node: PLocalVar; + Buffer: array[0..BUFFER_SIZE] of Char; // Buffer to hold a value for GetVar() + TempLen: LongInt; // hold returnlength of GetVar() +begin + SetLength(EnvList, 0); + ThisProcess := PProcess(FindTask(nil)); //Get the pointer to our process + LocalVars_List := @(ThisProcess^.pr_LocalVars); //get the list of pr_LocalVars as pointer + LocalVar_Node := pLocalVar(LocalVars_List^.mlh_head); //get the headnode of the LocalVars list + + // loop through the localvar list + while ( Pointer(LocalVar_Node^.lv_node.ln_Succ) <> Pointer(LocalVars_List^.mlh_Tail)) do + begin + // make sure the active node is valid instead of empty + If not(LocalVar_Node <> nil) then + break; + + { - process the current node - } + If (LocalVar_Node^.lv_node.ln_Type = LV_Var) then + begin + FillChar(Buffer[0], Length(Buffer), #0); // clear Buffer + + // get active node's name environment variable value ino buffer and make sure it's local + TempLen := GetVar(LocalVar_Node^.lv_Node.ln_Name, @Buffer[0], BUFFER_SIZE, GVF_LOCAL_ONLY); + If TempLen <> -1 then + begin + SetLength(EnvList, Length(EnvList) + 1); + EnvList[High(EnvList)].Name := LocalVar_Node^.lv_Node.ln_Name; + EnvList[High(EnvList)].Value := string(PChar(@Buffer[0])); + end; + end; + LocalVar_Node := pLocalVar(LocalVar_Node^.lv_node.ln_Succ); //we need to get the next node + end; +end; + +function EnvCount: LongInt; begin - EnvCount := 0; + InitEnvironmentStrings; + EnvCount := Length(EnvList); end; -function EnvStr(Index: LongInt): String; +function EnvStr(Index: LongInt): string; begin - EnvStr:=''; + Result := ''; + if Length(EnvList) = 0 then + InitEnvironmentStrings; + if (Index >= 0) and (Index <= High(EnvList)) then + begin + Result := EnvList[Index].Name + '=' + EnvList[Index].Value; + end; end; -function GetEnv(envvar : String): String; +function GetEnv(EnvVar : string): string; var BufArr : array[0..255] of char; StrBuffer: array of char; diff --git a/packages/arosunits/src/exec.pas b/rtl/aros/exec.pas index 7b8c83b18b..2601438126 100644 --- a/packages/arosunits/src/exec.pas +++ b/rtl/aros/exec.pas @@ -1354,7 +1354,7 @@ end; function AbortIO(ioRequest: pIORequest): LongInt; type - TLocalCall = function(ioRequest : pIORequest; Base: Pointer): LongInt; stdcall; + TLocalCall = function(ioRequest : pIORequest; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -1364,7 +1364,7 @@ end; procedure AddDevice(device: pDevice); type - TLocalCall = procedure(device: pDevice; Base: Pointer); stdcall; + TLocalCall = procedure(device: pDevice; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -1374,7 +1374,7 @@ end; procedure AddHead(list: pList; node: pNode); type - TLocalCall = procedure(list : pList; node : pNode; Base: Pointer); stdcall; + TLocalCall = procedure(list : pList; node : pNode; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -1384,7 +1384,7 @@ end; procedure AddIntServer(intNumber: LONGINT; interrupt_: pInterrupt); type - TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; Base: Pointer); stdcall; + TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -1394,7 +1394,7 @@ end; procedure AddLibrary(lib: pLibrary); type - TLocalCall = procedure(lib: pLibrary; Base: Pointer); stdcall; + TLocalCall = procedure(lib: pLibrary; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -1404,7 +1404,7 @@ end; procedure AddMemHandler(memhand: pInterrupt); type - TLocalCall = procedure(memhand: pInterrupt; Base: Pointer); stdcall; + TLocalCall = procedure(memhand: pInterrupt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -1414,7 +1414,7 @@ end; procedure AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR); type - TLocalCall = procedure(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR; LibBase: Pointer); stdcall; + TLocalCall = procedure(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1424,7 +1424,7 @@ end; PROCEDURE AddPort(port : pMsgPort); type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1434,7 +1434,7 @@ end; PROCEDURE AddResource(resource : POINTER); type - TLocalCall = procedure(resource : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(resource : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1444,7 +1444,7 @@ end; PROCEDURE AddSemaphore(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1454,7 +1454,7 @@ end; PROCEDURE AddTail(list : pList; node : pNode); type - TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); stdcall; + TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1464,7 +1464,7 @@ end; FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER; type - TLocalCall = function(task : pTask;const initPC : POINTER;const finalPC : POINTER; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(task : pTask;const initPC : POINTER;const finalPC : POINTER; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1474,7 +1474,7 @@ end; PROCEDURE Alert(alertNum : ULONG); type - TLocalCall = procedure(alertNum : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(alertNum : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1484,7 +1484,7 @@ end; FUNCTION AllocAbs(byteSize : ULONG; location : POINTER) : POINTER; type - TLocalCall = FUNCTION(byteSize : ULONG; location : POINTER; LibBase: Pointer): POINTER; stdcall; + TLocalCall = FUNCTION(byteSize : ULONG; location : POINTER; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1494,7 +1494,7 @@ end; FUNCTION Allocate(freeList : pMemHeader; byteSize : ULONG) : POINTER; type - TLocalCall = function(freeList : pMemHeader; byteSize : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(freeList : pMemHeader; byteSize : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1504,7 +1504,7 @@ end; FUNCTION AllocEntry(entry : pMemList) : pMemList; type - TLocalCall = function(entry : pMemList; LibBase: Pointer): pMemList; stdcall; + TLocalCall = function(entry : pMemList; LibBase: Pointer): pMemList; cdecl; var Call: TLocalCall; begin @@ -1514,7 +1514,7 @@ end; FUNCTION AllocMem(byteSize : ULONG; requirements : ULONG) : POINTER; type - TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1524,7 +1524,7 @@ end; FUNCTION AllocPooled(poolHeader : POINTER; memSize : ULONG) : POINTER; type - TLocalCall = function(poolHeader : POINTER; memSize : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(poolHeader : POINTER; memSize : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1534,7 +1534,7 @@ end; FUNCTION AllocSignal(signalNum : LONGINT) : shortint; type - TLocalCall = function(signalNum : LONGINT; LibBase: Pointer): shortint; stdcall; + TLocalCall = function(signalNum : LONGINT; LibBase: Pointer): shortint; cdecl; var Call: TLocalCall; begin @@ -1544,7 +1544,7 @@ end; FUNCTION AllocTrap(trapNum : LONGINT) : LONGINT; type - TLocalCall = function(trapNum : LONGINT; LibBase: Pointer): LONGINT; stdcall; + TLocalCall = function(trapNum : LONGINT; LibBase: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -1554,7 +1554,7 @@ end; FUNCTION AllocVec(byteSize : ULONG; requirements : ULONG) : POINTER; type - TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1564,7 +1564,7 @@ end; FUNCTION AttemptSemaphore(sigSem : pSignalSemaphore) : BOOLEAN; type - TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): BOOLEAN; stdcall; + TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -1574,7 +1574,7 @@ end; FUNCTION AttemptSemaphoreShared(sigSem : pSignalSemaphore) : ULONG; type - TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -1584,7 +1584,7 @@ end; FUNCTION AvailMem(requirements : ULONG) : ULONG; type - TLocalCall = function(requirements : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(requirements : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -1594,7 +1594,7 @@ end; PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG); type - TLocalCall = procedure(address : POINTER; length : ULONG; caches : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(address : POINTER; length : ULONG; caches : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1604,7 +1604,7 @@ end; PROCEDURE CacheClearU; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1614,7 +1614,7 @@ end; FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG; type - TLocalCall = function(cacheBits : ULONG; cacheMask : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(cacheBits : ULONG; cacheMask : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -1624,7 +1624,7 @@ end; PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG); type - TLocalCall = procedure(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1634,7 +1634,7 @@ end; FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER; type - TLocalCall = function(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1644,7 +1644,7 @@ end; PROCEDURE Cause(interrupt_ : pInterrupt); type - TLocalCall = procedure(interrupt_ : pInterrupt; LibBase: Pointer); stdcall; + TLocalCall = procedure(interrupt_ : pInterrupt; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1654,7 +1654,7 @@ end; FUNCTION CheckIO(ioRequest : pIORequest) : pIORequest; type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): pIORequest; stdcall; + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): pIORequest; cdecl; var Call: TLocalCall; begin @@ -1664,7 +1664,7 @@ end; PROCEDURE ChildFree(tid : POINTER); type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1674,7 +1674,7 @@ end; PROCEDURE ChildOrphan(tid : POINTER); type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1684,7 +1684,7 @@ end; PROCEDURE ChildStatus(tid : POINTER); type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1694,7 +1694,7 @@ end; PROCEDURE ChildWait(tid : POINTER); type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1704,7 +1704,7 @@ end; PROCEDURE CloseDevice(ioRequest : pIORequest); type - TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); stdcall; + TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1714,7 +1714,7 @@ end; PROCEDURE CloseLibrary(lib : pLibrary); type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1724,7 +1724,7 @@ end; PROCEDURE ColdReboot; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1734,7 +1734,7 @@ end; PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG); type - TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1744,7 +1744,7 @@ end; PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG); type - TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1754,7 +1754,7 @@ end; FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER; type - TLocalCall = function(const port : pMsgPort; size : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(const port : pMsgPort; size : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1764,7 +1764,7 @@ end; FUNCTION CreateMsgPort : pMsgPort; type - TLocalCall = function(LibBase: Pointer): pMsgPort; stdcall; + TLocalCall = function(LibBase: Pointer): pMsgPort; cdecl; var Call: TLocalCall; begin @@ -1775,7 +1775,7 @@ end; FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : POINTER; type - TLocalCall = function(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -1785,7 +1785,7 @@ end; PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG); type - TLocalCall = procedure(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1795,7 +1795,7 @@ end; PROCEDURE Debug(flags : ULONG); type - TLocalCall = procedure(flags : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(flags : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1805,7 +1805,7 @@ end; PROCEDURE DeleteIORequest(iorequest : POINTER); type - TLocalCall = procedure(iorequest : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(iorequest : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1815,7 +1815,7 @@ end; PROCEDURE DeleteMsgPort(port : pMsgPort); type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1825,7 +1825,7 @@ end; PROCEDURE DeletePool(poolHeader : POINTER); type - TLocalCall = procedure(poolHeader : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(poolHeader : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1835,7 +1835,7 @@ end; PROCEDURE Disable; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1845,7 +1845,7 @@ end; FUNCTION DoIO(ioRequest : pIORequest) : shortint; type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; stdcall; + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; cdecl; var Call: TLocalCall; begin @@ -1855,7 +1855,7 @@ end; PROCEDURE Enable; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1865,7 +1865,7 @@ end; PROCEDURE Enqueue(list : pList; node : pNode); type - TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); stdcall; + TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1875,7 +1875,7 @@ end; PROCEDURE ExecFreeMem(memoryBlock : POINTER; byteSize : ULONG); type - TLocalCall = procedure(memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1885,7 +1885,7 @@ end; PROCEDURE ExecInsert(list : pList; node : pNode; pred : pNode); type - TLocalCall = procedure(list : pList; node : pNode; pred : pNode; LibBase: Pointer); stdcall; + TLocalCall = procedure(list : pList; node : pNode; pred : pNode; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1895,7 +1895,7 @@ end; FUNCTION FindName(list : pList; const name : pCHAR) : pNode; type - TLocalCall = function(list : pList; const name : pCHAR; LibBase: Pointer): pNode; stdcall; + TLocalCall = function(list : pList; const name : pCHAR; LibBase: Pointer): pNode; cdecl; var Call: TLocalCall; begin @@ -1905,7 +1905,7 @@ end; FUNCTION FindPort(const name : pCHAR) : pMsgPort; type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pMsgPort; stdcall; + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pMsgPort; cdecl; var Call: TLocalCall; begin @@ -1915,7 +1915,7 @@ end; FUNCTION FindResident(const name : pCHAR) : pResident; type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pResident; stdcall; + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pResident; cdecl; var Call: TLocalCall; begin @@ -1925,7 +1925,7 @@ end; FUNCTION FindSemaphore(const sigSem : pCHAR) : pSignalSemaphore; type - TLocalCall = function(const sigSem : pCHAR; LibBase: Pointer): pSignalSemaphore; stdcall; + TLocalCall = function(const sigSem : pCHAR; LibBase: Pointer): pSignalSemaphore; cdecl; var Call: TLocalCall; begin @@ -1935,7 +1935,7 @@ end; FUNCTION FindTask(const name : pCHAR) : pTask; type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pTask; stdcall; + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pTask; cdecl; var Call: TLocalCall; begin @@ -1945,7 +1945,7 @@ end; PROCEDURE Forbid; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1955,7 +1955,7 @@ end; PROCEDURE FreeEntry(entry : pMemList); type - TLocalCall = procedure(entry : pMemList; LibBase: Pointer); stdcall; + TLocalCall = procedure(entry : pMemList; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1965,7 +1965,7 @@ end; PROCEDURE FreePooled(poolHeader : POINTER; memory : POINTER; memSize : ULONG); type - TLocalCall = procedure(poolHeader : POINTER; memory : POINTER; memSize : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(poolHeader : POINTER; memory : POINTER; memSize : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1975,7 +1975,7 @@ end; PROCEDURE FreeSignal(signalNum : LONGINT); type - TLocalCall = procedure(signalNum : LONGINT; LibBase: Pointer); stdcall; + TLocalCall = procedure(signalNum : LONGINT; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1985,7 +1985,7 @@ end; PROCEDURE FreeTrap(trapNum : LONGINT); type - TLocalCall = procedure(trapNum : LONGINT; LibBase: Pointer); stdcall; + TLocalCall = procedure(trapNum : LONGINT; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -1995,7 +1995,7 @@ end; PROCEDURE FreeVec(memoryBlock : POINTER); type - TLocalCall = procedure(memoryBlock : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(memoryBlock : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2005,7 +2005,7 @@ end; FUNCTION GetCC : ULONG; type - TLocalCall = function(LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2015,7 +2015,7 @@ end; FUNCTION GetMsg(port : pMsgPort) : pMessage; type - TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; stdcall; + TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; cdecl; var Call: TLocalCall; begin @@ -2025,7 +2025,7 @@ end; PROCEDURE InitCode(startClass : ULONG; version : ULONG); type - TLocalCall = procedure(startClass : ULONG; version : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(startClass : ULONG; version : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2035,7 +2035,7 @@ end; FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER; type - TLocalCall = function(const resident_ : pResident; segList : ULONG; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(const resident_ : pResident; segList : ULONG; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -2045,7 +2045,7 @@ end; PROCEDURE InitSemaphore(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2055,7 +2055,7 @@ end; PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG); type - TLocalCall = procedure(const initTable : POINTER; memory : POINTER; size : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(const initTable : POINTER; memory : POINTER; size : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2065,7 +2065,7 @@ end; PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer); type - TLocalCall = procedure(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer; LibBase: Pointer); stdcall; + TLocalCall = procedure(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2075,7 +2075,7 @@ end; FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG) : pLibrary; type - TLocalCall = function(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG; LibBase: Pointer): pLibrary; stdcall; + TLocalCall = function(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG; LibBase: Pointer): pLibrary; cdecl; var Call: TLocalCall; begin @@ -2085,7 +2085,7 @@ end; FUNCTION ObtainQuickVector(interruptCode : POINTER) : ULONG; type - TLocalCall = function(interruptCode : POINTER; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(interruptCode : POINTER; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2095,7 +2095,7 @@ end; PROCEDURE ObtainSemaphore(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2105,7 +2105,7 @@ end; PROCEDURE ObtainSemaphoreList(sigSem : pList); type - TLocalCall = procedure(sigSem : pList; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pList; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2115,7 +2115,7 @@ end; PROCEDURE ObtainSemaphoreShared(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2125,7 +2125,7 @@ end; FUNCTION OldOpenLibrary(const libName : pCHAR) : pLibrary; type - TLocalCall = function(const libName : pCHAR; LibBase: Pointer): pLibrary; stdcall; + TLocalCall = function(const libName : pCHAR; LibBase: Pointer): pLibrary; cdecl; var Call: TLocalCall; begin @@ -2136,7 +2136,7 @@ end; FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG) : shortint; type - TLocalCall = function(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG; LibBase: Pointer): shortint; stdcall; + TLocalCall = function(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG; LibBase: Pointer): shortint; cdecl; var Call: TLocalCall; begin @@ -2146,7 +2146,7 @@ end; FUNCTION OpenLibrary(const libName : pCHAR; version : ULONG) : pLibrary; type - TLocalCall = function(const libName : pCHAR; version : ULONG; LibBase: Pointer): pLibrary; stdcall; + TLocalCall = function(const libName : pCHAR; version : ULONG; LibBase: Pointer): pLibrary; cdecl; var Call: TLocalCall; begin @@ -2156,7 +2156,7 @@ end; FUNCTION OpenResource(const resName : pCHAR) : POINTER; type - TLocalCall = function(const resName : pCHAR; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(const resName : pCHAR; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -2166,7 +2166,7 @@ end; PROCEDURE Permit; type - TLocalCall = PROCEDURE(LibBase: Pointer); stdcall; + TLocalCall = PROCEDURE(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2176,7 +2176,7 @@ end; FUNCTION Procure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage) : BOOLEAN; type - TLocalCall = function(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer): BOOLEAN; stdcall; + TLocalCall = function(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -2186,7 +2186,7 @@ end; PROCEDURE PutMsg(port : pMsgPort; message : pMessage); type - TLocalCall = PROCEDURE(port : pMsgPort; message : pMessage; LibBase: Pointer); stdcall; + TLocalCall = PROCEDURE(port : pMsgPort; message : pMessage; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2196,7 +2196,7 @@ end; function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; type - TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER; LibBase: Pointer): pointer; stdcall; + TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER; LibBase: Pointer): pointer; cdecl; var Call: TLocalCall; begin @@ -2206,7 +2206,7 @@ end; PROCEDURE ReleaseSemaphore(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2216,7 +2216,7 @@ end; PROCEDURE ReleaseSemaphoreList(sigSem : pList); type - TLocalCall = procedure(sigSem : pList; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pList; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2226,7 +2226,7 @@ end; PROCEDURE RemDevice(device : pDevice); type - TLocalCall = PROCEDURE(device : pDevice; LibBase: Pointer); stdcall; + TLocalCall = PROCEDURE(device : pDevice; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2236,7 +2236,7 @@ end; FUNCTION RemHead(list : pList) : pNode; type - TLocalCall = function(list : pList; LibBase: Pointer): pNode; stdcall; + TLocalCall = function(list : pList; LibBase: Pointer): pNode; cdecl; var Call: TLocalCall; begin @@ -2246,7 +2246,7 @@ end; PROCEDURE RemIntServer(intNumber : LONGINT; interrupt_ : pInterrupt); type - TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; LibBase: Pointer); stdcall; + TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2256,7 +2256,7 @@ end; PROCEDURE RemLibrary(lib : pLibrary); type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2266,7 +2266,7 @@ end; PROCEDURE RemMemHandler(memhand : pInterrupt); type - TLocalCall = procedure(memhand : pInterrupt; LibBase: Pointer); stdcall; + TLocalCall = procedure(memhand : pInterrupt; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2276,7 +2276,7 @@ end; PROCEDURE Remove(node : pNode); type - TLocalCall = procedure(node : pNode; LibBase: Pointer); stdcall; + TLocalCall = procedure(node : pNode; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2286,7 +2286,7 @@ end; PROCEDURE RemPort(port : pMsgPort); type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2296,7 +2296,7 @@ end; PROCEDURE RemResource(resource : POINTER); type - TLocalCall = procedure(resource : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(resource : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2306,7 +2306,7 @@ end; PROCEDURE RemSemaphore(sigSem : pSignalSemaphore); type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2316,7 +2316,7 @@ end; FUNCTION RemTail(list : pList) : pNode; type - TLocalCall = function(list : pList; LibBase: Pointer): pNode; stdcall; + TLocalCall = function(list : pList; LibBase: Pointer): pNode; cdecl; var Call: TLocalCall; begin @@ -2326,7 +2326,7 @@ end; PROCEDURE RemTask(task : pTask); type - TLocalCall = procedure(task : pTask; LibBase: Pointer); stdcall; + TLocalCall = procedure(task : pTask; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2336,7 +2336,7 @@ end; PROCEDURE ReplyMsg(message : pMessage); type - TLocalCall = procedure(message : pMessage; LibBase: Pointer); stdcall; + TLocalCall = procedure(message : pMessage; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2346,7 +2346,7 @@ end; PROCEDURE SendIO(ioRequest : pIORequest); type - TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); stdcall; + TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2356,7 +2356,7 @@ end; FUNCTION SetExcept(newSignals : ULONG; signalSet : ULONG) : ULONG; type - TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2366,7 +2366,7 @@ end; FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : POINTER; type - TLocalCall = function(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE; LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE; LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -2376,7 +2376,7 @@ end; FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt; type - TLocalCall = function(intNumber : LONGINT;const interrupt_ : pInterrupt; LibBase: Pointer): pInterrupt; stdcall; + TLocalCall = function(intNumber : LONGINT;const interrupt_ : pInterrupt; LibBase: Pointer): pInterrupt; cdecl; var Call: TLocalCall; begin @@ -2386,7 +2386,7 @@ end; FUNCTION SetSignal(newSignals : ULONG; signalSet : ULONG) : ULONG; type - TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2396,7 +2396,7 @@ end; FUNCTION SetSR(newSR : ULONG; mask : ULONG) : ULONG; type - TLocalCall = function(newSR : ULONG; mask : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(newSR : ULONG; mask : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2406,7 +2406,7 @@ end; FUNCTION SetTaskPri(task : pTask; priority : LONGINT) : shortint; type - TLocalCall = function(task : pTask; priority : LONGINT; LibBase: Pointer): shortint; stdcall; + TLocalCall = function(task : pTask; priority : LONGINT; LibBase: Pointer): shortint; cdecl; var Call: TLocalCall; begin @@ -2416,7 +2416,7 @@ end; PROCEDURE Signal(task : pTask; signalSet : ULONG); type - TLocalCall = procedure(task : pTask; signalSet : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(task : pTask; signalSet : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2426,7 +2426,7 @@ end; PROCEDURE StackSwap(newStack : pStackSwapStruct); type - TLocalCall = procedure(newStack : pStackSwapStruct; LibBase: Pointer); stdcall; + TLocalCall = procedure(newStack : pStackSwapStruct; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2436,7 +2436,7 @@ end; PROCEDURE SumKickData; type - TLocalCall = procedure(LibBase: Pointer); stdcall; + TLocalCall = procedure(LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2446,7 +2446,7 @@ end; PROCEDURE SumLibrary(lib : pLibrary); type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2456,7 +2456,7 @@ end; FUNCTION SuperState : POINTER; type - TLocalCall = function(LibBase: Pointer): POINTER; stdcall; + TLocalCall = function(LibBase: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -2466,7 +2466,7 @@ end; FUNCTION Supervisor(userFunction : tPROCEDURE) : ULONG; type - TLocalCall = function(userFunction : tPROCEDURE; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(userFunction : tPROCEDURE; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2476,7 +2476,7 @@ end; FUNCTION TypeOfMem(const address : POINTER) : ULONG; type - TLocalCall = function(const address : POINTER; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(const address : POINTER; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2486,7 +2486,7 @@ end; PROCEDURE UserState(sysStack : POINTER); type - TLocalCall = procedure(sysStack : POINTER; LibBase: Pointer); stdcall; + TLocalCall = procedure(sysStack : POINTER; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2496,7 +2496,7 @@ end; PROCEDURE Vacate(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage); type - TLocalCall = procedure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer); stdcall; + TLocalCall = procedure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2506,7 +2506,7 @@ end; FUNCTION Wait(signalSet : ULONG) : ULONG; type - TLocalCall = function(signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -2516,7 +2516,7 @@ end; FUNCTION WaitIO(ioRequest : pIORequest) : shortint; type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; stdcall; + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; cdecl; var Call: TLocalCall; begin @@ -2526,7 +2526,7 @@ end; FUNCTION WaitPort(port : pMsgPort) : pMessage; type - TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; stdcall; + TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; cdecl; var Call: TLocalCall; begin @@ -2536,7 +2536,7 @@ end; { PROCEDURE NewMinList(minlist : pMinList); type - TLocalCall = procedure(; LibBase: Pointer); stdcall; + TLocalCall = procedure(; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -2546,7 +2546,7 @@ end; FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2556,7 +2556,7 @@ end; FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2566,7 +2566,7 @@ end; FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2576,7 +2576,7 @@ end; FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2586,7 +2586,7 @@ end; FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2596,7 +2596,7 @@ end; FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2606,7 +2606,7 @@ end; FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2616,7 +2616,7 @@ end; FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2626,7 +2626,7 @@ end; FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin @@ -2636,7 +2636,7 @@ end; FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode; type - TLocalCall = function(; LibBase: Pointer): ; stdcall; + TLocalCall = function(; LibBase: Pointer): ; cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/i386/doslibf.inc b/rtl/aros/i386/doslibf.inc index c8d4c3294e..0602e3da09 100644 --- a/rtl/aros/i386/doslibf.inc +++ b/rtl/aros/i386/doslibf.inc @@ -15,7 +15,7 @@ function Open(name: PChar; accessMode: longint): Cardinal; type - TOpen = function(name: PChar; accessMode: longint; Base: Pointer): Cardinal; stdcall; + TOpen = function(name: PChar; accessMode: longint; Base: Pointer): Cardinal; cdecl; var Call: TOpen; begin @@ -25,7 +25,7 @@ end; function dosClose(_file: Cardinal): boolean; type - TdosClose = function(_file: Cardinal; Base: Pointer): boolean; stdcall; + TdosClose = function(_file: Cardinal; Base: Pointer): boolean; cdecl; var Call: TdosClose; begin @@ -35,7 +35,7 @@ end; function dosRead(_file: Cardinal; buffer: Pointer; length: longint): longint; type - TdosRead = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; stdcall; + TdosRead = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; cdecl; var Call: TdosRead; begin @@ -45,7 +45,7 @@ end; function dosWrite(_file: Cardinal; buffer: Pointer; length: longint): longint; type - TdosWrite = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; stdcall; + TdosWrite = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; cdecl; var Call: TdosWrite; begin @@ -55,7 +55,7 @@ end; function dosInput: Cardinal; type - TdosInput = function(Base: Pointer): Cardinal; stdcall; + TdosInput = function(Base: Pointer): Cardinal; cdecl; var Call: TdosInput; begin @@ -65,7 +65,7 @@ end; function dosOutput: Cardinal; type - TdosOutput = function(Base: Pointer): Cardinal; stdcall; + TdosOutput = function(Base: Pointer): Cardinal; cdecl; var Call: TdosOutput; begin @@ -75,7 +75,7 @@ end; function dosSeek(_file: longint;position: longint;offset: longint): longint; type - TdosSeek = function(_file: longint;position: longint;offset: longint; Base: Pointer): longint; stdcall; + TdosSeek = function(_file: longint;position: longint;offset: longint; Base: Pointer): longint; cdecl; var Call: TdosSeek; begin @@ -85,7 +85,7 @@ end; function dosDeleteFile(name: PChar): boolean; type - TdosDeleteFile = function(name: PChar; Base: Pointer): boolean; stdcall; + TdosDeleteFile = function(name: PChar; Base: Pointer): boolean; cdecl; var Call: TdosDeleteFile; begin @@ -95,7 +95,7 @@ end; function dosRename(oldName: PChar;newName: PChar): boolean; type - TdosRename = function(oldName: PChar;newName: PChar; Base: Pointer): boolean; stdcall; + TdosRename = function(oldName: PChar;newName: PChar; Base: Pointer): boolean; cdecl; var Call: TdosRename; begin @@ -105,7 +105,7 @@ end; function Lock(name: PChar;_type: longint): longint; type - TLock = function(name: PChar;_type: longint; Base: Pointer): longint; stdcall; + TLock = function(name: PChar;_type: longint; Base: Pointer): longint; cdecl; var Call: TLock; begin @@ -115,7 +115,7 @@ end; function UnLock(lock: longint): longint; type - TUnLock = function(lock: longint; Base: Pointer): longint; stdcall; + TUnLock = function(lock: longint; Base: Pointer): longint; cdecl; var Call: TUnLock; begin @@ -126,7 +126,7 @@ end; function Examine(lock: longint; fileInfoBlock: PFileInfoBlock): boolean; type - TExamine = function(lock: longint; fileInfoBlock: PFileInfoBlock; Base: Pointer): boolean; stdcall; + TExamine = function(lock: longint; fileInfoBlock: PFileInfoBlock; Base: Pointer): boolean; cdecl; var Call: TExamine; begin @@ -136,7 +136,7 @@ end; function Info(lock: longint; parameterBlock: PInfoData): boolean; type - TInfo = function(lock: longint; parameterBlock: PInfoData; Base: Pointer): boolean; stdcall; + TInfo = function(lock: longint; parameterBlock: PInfoData; Base: Pointer): boolean; cdecl; var Call: TInfo; begin @@ -146,7 +146,7 @@ end; function dosCreateDir(name: PChar): longint; type - TdosCreateDir = function(name: PChar; Base: Pointer): longint; stdcall; + TdosCreateDir = function(name: PChar; Base: Pointer): longint; cdecl; var Call: TdosCreateDir; begin @@ -156,7 +156,7 @@ end; function CurrentDir(lock: longint): longint; type - TCurrentDir = function(lock: longint; Base: Pointer): longint; stdcall; + TCurrentDir = function(lock: longint; Base: Pointer): longint; cdecl; var Call: TCurrentDir; begin @@ -166,7 +166,7 @@ end; function IoErr: longint; type - TIoErr = function(Base: Pointer): longint; stdcall; + TIoErr = function(Base: Pointer): longint; cdecl; var Call: TIoErr; begin @@ -176,7 +176,7 @@ end; procedure dosExit(ErrCode: longint); type - TExit = procedure(ErrCode: longint; Base: Pointer); stdcall; + TExit = procedure(ErrCode: longint; Base: Pointer); cdecl; var Call: TExit; begin @@ -186,7 +186,7 @@ end; function SetProtection(name: PChar; protect: longword): boolean; type - TSetProtection = function(name: PChar; protect: longword; Base: Pointer): boolean; stdcall; + TSetProtection = function(name: PChar; protect: longword; Base: Pointer): boolean; cdecl; var Call: TSetProtection; begin @@ -196,7 +196,7 @@ end; function DateStamp(date: PDateStamp): PDateStamp; type - TDateStamp = function(date: PDateStamp; Base: Pointer): PDateStamp; stdcall; + TDateStamp = function(date: PDateStamp; Base: Pointer): PDateStamp; cdecl; var Call: TDateStamp; begin @@ -206,7 +206,7 @@ end; procedure Delay(ticks: LongWord); type - TDelay = procedure(ticks: LongWord; Base: Pointer); stdcall; + TDelay = procedure(ticks: LongWord; Base: Pointer); cdecl; var Call: TDelay; begin @@ -216,7 +216,7 @@ end; function SetFileDate(name: PChar; date: PDateStamp): boolean; type - TSetFileDate = function(name: PChar; date: PDateStamp; Base: Pointer): boolean; stdcall; + TSetFileDate = function(name: PChar; date: PDateStamp; Base: Pointer): boolean; cdecl; var Call: TSetFileDate; begin @@ -226,7 +226,7 @@ end; function NameFromLock(lock: longint; buffer: PChar; len: longint): boolean; type - TNameFromLock = function(lock: longint; buffer: PChar; len: longint; Base: Pointer): boolean; stdcall; + TNameFromLock = function(lock: longint; buffer: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TNameFromLock; begin @@ -236,7 +236,7 @@ end; function SetFileSize(fh: longint; pos: longint; mode: longint): longint; type - TSetFileSize = function(fh: longint; pos: longint; mode: longint; Base: Pointer): longint; stdcall; + TSetFileSize = function(fh: longint; pos: longint; mode: longint; Base: Pointer): longint; cdecl; var Call: TSetFileSize; begin @@ -246,7 +246,7 @@ end; function Cli : pCommandLineInterface; type - TLocalCall = function(LibBase: Pointer): pCommandLineInterface; stdcall; + TLocalCall = function(LibBase: Pointer): pCommandLineInterface; cdecl; var Call: TLocalCall; begin @@ -256,7 +256,7 @@ end; function GetArgStr: PChar; type - TGetArgStr = function(Base: Pointer): PChar; stdcall; + TGetArgStr = function(Base: Pointer): PChar; cdecl; var Call: TGetArgStr; begin @@ -266,7 +266,7 @@ end; function GetCurrentDirName(buf: PChar; len: longint): boolean; type - TGetCurrentDirName = function(buf: PChar; len: longint; Base: Pointer): boolean; stdcall; + TGetCurrentDirName = function(buf: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TGetCurrentDirName; begin @@ -276,7 +276,7 @@ end; function GetProgramName(buf: PChar; len: longint): boolean; type - TGetProgramName = function(buf: PChar; len: longint; Base: Pointer): boolean; stdcall; + TGetProgramName = function(buf: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TGetProgramName; begin @@ -286,7 +286,7 @@ end; function GetProgramDir: longint; type - TGetProgramDir = function(Base: Pointer): longint; stdcall; + TGetProgramDir = function(Base: Pointer): longint; cdecl; var Call: TGetProgramDir; begin @@ -296,7 +296,7 @@ end; function SystemTagList(command: PChar; tags: PTagItem): longint; type - TSystemTagList = function(command: PChar; tags: PTagItem; Base: Pointer): longint; stdcall; + TSystemTagList = function(command: PChar; tags: PTagItem; Base: Pointer): longint; cdecl; var Call: TSystemTagList; begin @@ -306,7 +306,7 @@ end; function LockDosList(flags: longword): PDosList; type - TLockDosList = function(flags: longword; Base: Pointer): PDosList; stdcall; + TLockDosList = function(flags: longword; Base: Pointer): PDosList; cdecl; var Call: TLockDosList; begin @@ -316,7 +316,7 @@ end; procedure UnLockDosList(flags: longword); type - TUnLockDosList = procedure(flags: longword; Base: Pointer); stdcall; + TUnLockDosList = procedure(flags: longword; Base: Pointer); cdecl; var Call: TUnLockDosList; begin @@ -326,7 +326,7 @@ end; function NextDosEntry(dlist: PDosList; flags: longword): PDosList; type - TNextDosEntry = function(dlist: PDosList; flags: longword; Base: Pointer): PDosList; stdcall; + TNextDosEntry = function(dlist: PDosList; flags: longword; Base: Pointer): PDosList; cdecl; var Call: TNextDosEntry; begin @@ -336,7 +336,7 @@ end; function MatchFirst(pat: PChar; anchor: PAnchorPath): longint; type - TMatchFirst = function(pat: PChar; anchor: PAnchorPath; Base: Pointer): longint; stdcall; + TMatchFirst = function(pat: PChar; anchor: PAnchorPath; Base: Pointer): longint; cdecl; var Call: TMatchFirst; begin @@ -346,7 +346,7 @@ end; function MatchNext(anchor: PAnchorPath): longint; type - TMatchNext = function(anchor: PAnchorPath; Base: Pointer): longint; stdcall; + TMatchNext = function(anchor: PAnchorPath; Base: Pointer): longint; cdecl; var Call: TMatchNext; begin @@ -357,7 +357,7 @@ end; procedure MatchEnd(anchor: PAnchorPath); type - TMatchEnd = procedure(anchor: PAnchorPath; Base: Pointer); stdcall; + TMatchEnd = procedure(anchor: PAnchorPath; Base: Pointer); cdecl; var Call: TMatchEnd; begin @@ -368,7 +368,7 @@ end; function GetVar(name: PChar; buffer: PChar; size: longint; flags: longword): longint; type - TGetVar = function(name: PChar; buffer: PChar; size: longint; flags: longword; Base: Pointer): longint; stdcall; + TGetVar = function(name: PChar; buffer: PChar; size: longint; flags: longword; Base: Pointer): longint; cdecl; var Call: TGetVar; begin diff --git a/rtl/aros/i386/execd.inc b/rtl/aros/i386/execd.inc index 9740ab23f9..1444cae508 100644 --- a/rtl/aros/i386/execd.inc +++ b/rtl/aros/i386/execd.inc @@ -1777,7 +1777,6 @@ const SAL_Priority = (SAL_Dummy + 2); SAL_Name = (SAL_Dummy + 3); - {$include utild2.inc} diff --git a/rtl/aros/i386/execf.inc b/rtl/aros/i386/execf.inc index a12700f6d9..429cefc052 100644 --- a/rtl/aros/i386/execf.inc +++ b/rtl/aros/i386/execf.inc @@ -25,7 +25,7 @@ end; function execAllocMem(byteSize: Cardinal; requirements: Cardinal): Pointer; type - TAllocMem = function(byteSize: Cardinal; requirements: Cardinal; Base: Pointer): Pointer; stdcall; + TAllocMem = function(byteSize: Cardinal; requirements: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TAllocMem; begin @@ -35,7 +35,7 @@ end; procedure execFreeMem(memoryBlock: Pointer; byteSize: Cardinal); type - TFreeMem = function(memoryBlock: Pointer; byteSize: Cardinal; Base: Pointer): Pointer; stdcall; + TFreeMem = function(memoryBlock: Pointer; byteSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TFreeMem; begin @@ -45,7 +45,7 @@ end; function FindTask(name: PChar): PTask; type - TFindTask = function(name: PChar; Base: Pointer): PTask; stdcall; + TFindTask = function(name: PChar; Base: Pointer): PTask; cdecl; var Call: TFindTask; begin @@ -55,7 +55,7 @@ end; function SetSignal(newSignals: Cardinal; signalSet : Cardinal): Cardinal; type - TSetSignal = function(newSignals: Cardinal; signalSet : Cardinal; Base: Pointer): Cardinal; stdcall; + TSetSignal = function(newSignals: Cardinal; signalSet : Cardinal; Base: Pointer): Cardinal; cdecl; var Call: TSetSignal; begin @@ -65,7 +65,7 @@ end; function AllocSignal(signalNum: LongInt): ShortInt; type - TAllocSignal = function(signalNum: LongInt; Base: Pointer): ShortInt; stdcall; + TAllocSignal = function(signalNum: LongInt; Base: Pointer): ShortInt; cdecl; var Call: TAllocSignal; begin @@ -75,7 +75,7 @@ end; procedure FreeSignal(signalNum: LongInt); type - TFreeSignal = procedure(signalNum: LongInt; Base: Pointer); stdcall; + TFreeSignal = procedure(signalNum: LongInt; Base: Pointer); cdecl; var Call: TFreeSignal; begin @@ -85,7 +85,7 @@ end; procedure AddPort(port: PMsgPort); type - TAddPort = procedure(port: PMsgPort; Base: Pointer); stdcall; + TAddPort = procedure(port: PMsgPort; Base: Pointer); cdecl; var Call: TAddPort; begin @@ -95,7 +95,7 @@ end; procedure RemPort(port: PMsgPort); type - TRemPort = procedure(port: PMsgPort; Base: Pointer); stdcall; + TRemPort = procedure(port: PMsgPort; Base: Pointer); cdecl; var Call: TRemPort; begin @@ -105,7 +105,7 @@ end; function GetMsg(port: PMsgPort): PMessage; type - TGetMsg = function(port: PMsgPort; Base: Pointer): PMessage; stdcall; + TGetMsg = function(port: PMsgPort; Base: Pointer): PMessage; cdecl; var Call: TGetMsg; begin @@ -115,7 +115,7 @@ end; procedure ReplyMsg(message : pMessage); type - TLocalCall = procedure(message : pMessage; LibBase: Pointer); stdcall; + TLocalCall = procedure(message : pMessage; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -125,7 +125,7 @@ end; function WaitPort(port: PMsgPort): PMessage; type - TWaitPort = function(port: PMsgPort; Base: Pointer): PMessage; stdcall; + TWaitPort = function(port: PMsgPort; Base: Pointer): PMessage; cdecl; var Call: TWaitPort; begin @@ -135,7 +135,7 @@ end; procedure CloseLibrary(libHandle: PLibrary); type - TCloseLibrary = procedure(libHandle: PLibrary; Base: Pointer); stdcall; + TCloseLibrary = procedure(libHandle: PLibrary; Base: Pointer); cdecl; var Call: TCloseLibrary; begin @@ -145,7 +145,7 @@ end; function OpenDevice(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal): ShortInt; type - TOpenDevice = function(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal; Base: Pointer): ShortInt; stdcall; + TOpenDevice = function(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal; Base: Pointer): ShortInt; cdecl; var Call: TOpenDevice; begin @@ -155,7 +155,7 @@ end; procedure CloseDevice(ioRequest: PIORequest); type - TCloseDevice = procedure(ioRequest: PIORequest; Base: Pointer); stdcall; + TCloseDevice = procedure(ioRequest: PIORequest; Base: Pointer); cdecl; var Call: TCloseDevice; begin @@ -165,7 +165,7 @@ end; function DoIO(ioRequest: PIORequest): ShortInt; type - TDoIO = function(ioRequest: PIORequest; Base: Pointer): ShortInt; stdcall; + TDoIO = function(ioRequest: PIORequest; Base: Pointer): ShortInt; cdecl; var Call: TDoIO; begin @@ -175,7 +175,7 @@ end; function OpenLibrary(libname: PChar; libver : Cardinal): Pointer; type - TOpenLibrary = function(libname: PChar; libver : Cardinal; Base: Pointer): Pointer; stdcall; + TOpenLibrary = function(libname: PChar; libver : Cardinal; Base: Pointer): Pointer; cdecl; var Call: TOpenLibrary; begin @@ -185,7 +185,7 @@ end; function CreatePool(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal): Pointer; type - TCreatePool = function(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal; Base: Pointer): Pointer; stdcall; + TCreatePool = function(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TCreatePool; begin @@ -195,7 +195,7 @@ end; procedure DeletePool(poolHeader: Pointer); type - TDeletePool = procedure(poolHeader: Pointer; Base: Pointer); stdcall; + TDeletePool = procedure(poolHeader: Pointer; Base: Pointer); cdecl; var Call: TDeletePool; begin @@ -205,7 +205,7 @@ end; function AllocPooled(poolHeader: Pointer; memSize: Cardinal): Pointer; type - TAllocPooled = function (poolHeader: Pointer; memSize: Cardinal; Base: Pointer): Pointer; stdcall; + TAllocPooled = function (poolHeader: Pointer; memSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TAllocPooled; begin @@ -215,7 +215,7 @@ end; function FreePooled(poolHeader: Pointer; memory: Pointer; memSize: Cardinal): Pointer; type - TFreePooled = function (poolHeader: Pointer; memory: Pointer; memSize: Cardinal; Base: Pointer): Pointer; stdcall; + TFreePooled = function (poolHeader: Pointer; memory: Pointer; memSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TFreePooled; begin @@ -223,3 +223,14 @@ begin FreePooled := Call(poolHeader, memory, memSize, LocalExecBase); end; +//function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; +function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : POINTER; putChData : POINTER): pointer; +type + TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : Pointer; putChData : POINTER; LibBase: Pointer): pointer; stdcall; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LocalExecBase, 87)); + RawDoFmt := Call(formatString, dataStream, putChProc, putChData, AOS_ExecBase); +end; + diff --git a/rtl/aros/i386/prt0.as b/rtl/aros/i386/prt0.as index 6587979786..a53b8d886d 100644 --- a/rtl/aros/i386/prt0.as +++ b/rtl/aros/i386/prt0.as @@ -10,64 +10,65 @@ _start: start: - /* Save stack pointer for exit() routine */ - movl %esp,STKPTR - /* Save the exec library base */ movl 12(%esp), %ecx movl %ecx, _ExecBase /* Save the command line pointer length to CommandLineLen */ - #movl 8(%esp),%ecx - #movl %ecx,CommandLineLen + movl 8(%esp),%ecx + movl %ecx,CommandLineLen /* Save the command line pointer to CommandLine */ - #movl 4(%esp),%eax - #movl %eax,CommandLine - #movl (%esp),%eax - #movl %eax,__ARGS - #test %eax,%eax - #jz .Ldont_nullit - - - /* Remove $0a character from end of string */ - #cmpb #0x0a,-1(%eax+%ecx:w) - #jne .Lcontt - - /* Decrement count by one to remove the $0a character */ - #subl #1,%ecx - -#.Lcontt: -# movb #0,0(%eax+%ecx:w) /* null terminate it */ -# movw %ecx,__ARGC - -.Ldont_nullit: - call PASCALMAIN + movl 4(%esp),%eax + movl %eax,CommandLine + + /* save all register */ + pushal + + /* Save stack pointer for exit() routine */ + movl %esp,STKPTR + + call PASCALMAIN + /* if returns from here set an empty returncode */ + xorl %eax, %eax + pushl %eax + pushl %eax + + + /* entry for stop the program*/ _haltproc: haltproc: + + /* get retun code from stack */ + movl 4(%esp),%eax + + /* save for later use */ + movl %eax,_returncode + + /* get back my stack */ movl STKPTR,%esp - movl _returncode,%eax + + /* get back all registers */ + popal + + /* reset returncode */ + movl _returncode, %eax + + /* bye bye */ ret /*----------------------------------------------------*/ .data - .global _returncode # return code to set on exit - .global __ARGS # pointer to the arguments - .global __ARGC # number of arguments .global CommandLineLen # byte length of command line - .global CommandLine # + .global CommandLine # comandline as PChar .global STKPTR # Used to terminate the program, initial SP .global _ExecBase # exec library base - .align 4 - _returncode: .long 0 - __ARGS: .long 0 - __ARGC: .word 0 +_returncode: .long 0 CommandLine: .long 0 CommandLineLen: .long 0 STKPTR: .long 0 _ExecBase: .long 0 - diff --git a/rtl/aros/i386/utilf.inc b/rtl/aros/i386/utilf.inc index 2d8851fabc..d151ffa413 100644 --- a/rtl/aros/i386/utilf.inc +++ b/rtl/aros/i386/utilf.inc @@ -15,7 +15,7 @@ procedure Amiga2Date(date_amiga: longword; cd: PClockData); type - TAmiga2Date = procedure(date_amiga: longword; cd: PClockData; Base: Pointer); stdcall; + TAmiga2Date = procedure(date_amiga: longword; cd: PClockData; Base: Pointer); cdecl; var Call: TAmiga2Date; begin @@ -25,7 +25,7 @@ end; function Date2Amiga(date: PClockData): longword; type - TDate2Amiga = function(date: PClockData; Base: Pointer): longword; stdcall; + TDate2Amiga = function(date: PClockData; Base: Pointer): longword; cdecl; var Call: TDate2Amiga; begin diff --git a/packages/arosunits/src/inputevent.pas b/rtl/aros/inputevent.pas index 4334950e05..4334950e05 100644 --- a/packages/arosunits/src/inputevent.pas +++ b/rtl/aros/inputevent.pas diff --git a/packages/arosunits/src/intuition.pas b/rtl/aros/intuition.pas index ac0b92f820..f0986ced48 100644 --- a/packages/arosunits/src/intuition.pas +++ b/rtl/aros/intuition.pas @@ -4552,7 +4552,7 @@ var function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; type TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; - Base: Pointer): Word; stdcall; + Base: Pointer): Word; cdecl; var Call: TLocalCall; begin @@ -4562,7 +4562,7 @@ end; function ClearDMRequest(Window: PWindow): Boolean; type - TLocalCall = function(Window: PWindow; Base: Pointer): Boolean; stdcall; + TLocalCall = function(Window: PWindow; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4572,7 +4572,7 @@ end; procedure ClearMenuStrip(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4582,7 +4582,7 @@ end; procedure ClearPointer(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4592,7 +4592,7 @@ end; procedure CloseScreen(Screen: PScreen); type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4602,7 +4602,7 @@ end; procedure CloseWindow(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4612,7 +4612,7 @@ end; function CloseWorkBench: Boolean; type - TLocalCall = function(Base: Pointer): Boolean; stdcall; + TLocalCall = function(Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4623,7 +4623,7 @@ end; procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); type TLocalCall = procedure(var Seconds: LongWord; var Micros: LongWord; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4635,7 +4635,7 @@ function DisplayAlert(AlertNumber: LongWord; const String_: PChar; Height: LongWord): Boolean; type TLocalCall = function(AlertNumber: LongWord; - const String_: PChar; Height: LongWord; Base: Pointer): Boolean; stdcall; + const String_: PChar; Height: LongWord; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4645,7 +4645,7 @@ end; procedure DisplayBeep(Screen: PScreen); type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4657,7 +4657,7 @@ function DoubleClick(SSeconds: LongWord; SMicros: LongWord; CSeconds: LongWord; CMicros: LongWord): Boolean; type TLocalCall = function(SSeconds: LongWord; SMicros: LongWord; - CSeconds: LongWord; CMicros: LongWord; Base: Pointer): Boolean; stdcall; + CSeconds: LongWord; CMicros: LongWord; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4670,7 +4670,7 @@ procedure DrawBorder(Rp: PRastPort; type TLocalCall = procedure(Rp: PRastPort; const Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4682,7 +4682,7 @@ procedure DrawImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); type TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; - TopOffset: LongInt; Base: Pointer); stdcall; + TopOffset: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4693,7 +4693,7 @@ end; procedure EndRequest(Requester: PRequester; Window: PWindow); type TLocalCall = procedure(Requester: PRequester; Window: PWindow; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4704,7 +4704,7 @@ end; function GetDefPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; type TLocalCall = function(Preferences: PPreferences; Size: LongInt; - Base: Pointer): PPreferences; stdcall; + Base: Pointer): PPreferences; cdecl; var Call: TLocalCall; begin @@ -4715,7 +4715,7 @@ end; function GetPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; type TLocalCall = function(Preferences: PPreferences; Size: LongInt; - Base: Pointer): PPreferences; stdcall; + Base: Pointer): PPreferences; cdecl; var Call: TLocalCall; begin @@ -4725,7 +4725,7 @@ end; procedure InitRequester(Requester: PRequester); type - TLocalCall = procedure(Requester: PRequester; Base: Pointer); stdcall; + TLocalCall = procedure(Requester: PRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4736,7 +4736,7 @@ end; function ItemAddress(const MenuStrip: PMenu; MenuNumber: LongWord): PMenuItem; type TLocalCall = function(const MenuStrip: PMenu; MenuNumber: LongWord; - Base: Pointer): PMenuItem; stdcall; + Base: Pointer): PMenuItem; cdecl; var Call: TLocalCall; begin @@ -4747,7 +4747,7 @@ end; function ModifyIDCMP(Window: PWindow; Flags: LongWord): Boolean; type TLocalCall = function(Window: PWindow; Flags: LongWord; Base: Pointer): Boolean; - stdcall; + cdecl; var Call: TLocalCall; begin @@ -4761,7 +4761,7 @@ procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; type TLocalCall = procedure(Gadget: PGadget; Window: PWindow; Requester: PRequester; Flags: LongWord; HorizPot: LongWord; - VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; Base: Pointer); stdcall; + VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4773,7 +4773,7 @@ end; procedure MoveScreen(Screen: PScreen; Dx: LongInt; Dy: LongInt); type TLocalCall = procedure(Screen: PScreen; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4784,7 +4784,7 @@ end; procedure MoveWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); type TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4795,7 +4795,7 @@ end; procedure OffGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); type TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; + Requester: PRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4806,7 +4806,7 @@ end; procedure OffMenu(Window: PWindow; MenuNumber: LongWord); type TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4817,7 +4817,7 @@ end; procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); type TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; + Requester: PRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4828,7 +4828,7 @@ end; procedure OnMenu(Window: PWindow; MenuNumber: LongWord); type TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4838,7 +4838,7 @@ end; function OpenScreen(const NewScreen: PNewScreen): PScreen; type - TLocalCall = function(const NewScreen: PNewScreen; Base: Pointer): PScreen; stdcall; + TLocalCall = function(const NewScreen: PNewScreen; Base: Pointer): PScreen; cdecl; var Call: TLocalCall; begin @@ -4848,7 +4848,7 @@ end; function OpenWindow(const NewWindow: PNewWindow): PWindow; type - TLocalCall = function(const NewWindow: PNewWindow; Base: Pointer): PWindow; stdcall; + TLocalCall = function(const NewWindow: PNewWindow; Base: Pointer): PWindow; cdecl; var Call: TLocalCall; begin @@ -4858,7 +4858,7 @@ end; function OpenWorkBench: LongWord; type - TLocalCall = function(Base: Pointer): LongWord; stdcall; + TLocalCall = function(Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -4870,7 +4870,7 @@ procedure PrintIText(Rp: PRastPort; const IText: PIntuiText; Left: LongInt; Top: LongInt); type TLocalCall = procedure(Rp: PRastPort; - const IText: PIntuiText; Left: LongInt; Top: LongInt; Base: Pointer); stdcall; + const IText: PIntuiText; Left: LongInt; Top: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4881,7 +4881,7 @@ end; procedure RefreshGadgets(gadgets: PGadget; Window: PWindow; Requester: PRequester); type TLocalCall = procedure(gadgets: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; + Requester: PRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4892,7 +4892,7 @@ end; function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; type TLocalCall = function(Window: PWindow; Gadget: PGadget; Base: Pointer): Word; - stdcall; + cdecl; var Call: TLocalCall; begin @@ -4902,7 +4902,7 @@ end; procedure ReportMouse(flag: LongInt; Window: PWindow); type - TLocalCall = procedure(flag: LongInt; Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(flag: LongInt; Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4913,7 +4913,7 @@ end; function Request(Requester: PRequester; Window: PWindow): Boolean; type TLocalCall = function(Requester: PRequester; Window: PWindow; - Base: Pointer): Boolean; stdcall; + Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4923,7 +4923,7 @@ end; procedure ScreenToBack(Screen: PScreen); type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4933,7 +4933,7 @@ end; procedure ScreenToFront(Screen: PScreen); type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4944,7 +4944,7 @@ end; function SetDMRequest(Window: PWindow; Requester: PRequester): Boolean; type TLocalCall = function(Window: PWindow; Requester: PRequester; - Base: Pointer): Boolean; stdcall; + Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4954,7 +4954,7 @@ end; function SetMenuStrip(Window: PWindow; Menu: pMenu): Boolean; type - TLocalCall = function(Window: PWindow; Menu: pMenu; Base: Pointer): Boolean; stdcall; + TLocalCall = function(Window: PWindow; Menu: pMenu; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -4966,7 +4966,7 @@ procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; Width: LongInt; XOffset: LongInt; YOffset: LongInt); type TLocalCall = procedure(Window: PWindow; Pointer_: PWord; Height: LongInt; - Width: LongInt; XOffset: LongInt; YOffset: LongInt; Base: Pointer); stdcall; + Width: LongInt; XOffset: LongInt; YOffset: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4978,7 +4978,7 @@ procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; const ScreenTitle: PChar); type TLocalCall = procedure(Window: PWindow; const WindowTitle: PChar; - const ScreenTitle: PChar; Base: Pointer); stdcall; + const ScreenTitle: PChar; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4988,7 +4988,7 @@ end; procedure ShowTitle(Screen: PScreen; showIt: LongInt); type - TLocalCall = procedure(Screen: PScreen; showIt: LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; showIt: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4999,7 +4999,7 @@ end; procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); type TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5009,7 +5009,7 @@ end; function ViewAddress: PView; type - TLocalCall = function(Base: Pointer): PView; stdcall; + TLocalCall = function(Base: Pointer): PView; cdecl; var Call: TLocalCall; begin @@ -5019,7 +5019,7 @@ end; function ViewPortAddress(const Window: PWindow): PViewPort; type - TLocalCall = function(Window: PWindow; Base: Pointer): PViewPort; stdcall; + TLocalCall = function(Window: PWindow; Base: Pointer): PViewPort; cdecl; var Call: TLocalCall; begin @@ -5029,7 +5029,7 @@ end; procedure WindowToBack(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5039,7 +5039,7 @@ end; procedure WindowToFront(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5052,7 +5052,7 @@ function WindowLimits(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; type TLocalCall = function(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; WidthMax: LongWord; HeightMax: LongWord; - Base: Pointer): Boolean; stdcall; + Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5064,7 +5064,7 @@ function SetPrefs(const Preferences: PPreferences; Size: LongInt; Inform: LongInt): PPreferences; type TLocalCall = function(const Preferences: PPreferences; Size: LongInt; - Inform: LongInt; Base: Pointer): PPreferences; stdcall; + Inform: LongInt; Base: Pointer): PPreferences; cdecl; var Call: TLocalCall; begin @@ -5074,7 +5074,7 @@ end; function IntuiTextLength(const IText: PIntuiText): LongInt; type - TLocalCall = function(const IText: PIntuiText; Base: Pointer): LongInt; stdcall; + TLocalCall = function(const IText: PIntuiText; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5084,7 +5084,7 @@ end; function WBenchToBack: Boolean; type - TLocalCall = function(Base: Pointer): Boolean; stdcall; + TLocalCall = function(Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5094,7 +5094,7 @@ end; function WBenchToFront: Boolean; type - TLocalCall = function(Base: Pointer): Boolean; stdcall; + TLocalCall = function(Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5108,7 +5108,7 @@ function AutoRequest(Window: PWindow; const Body: PIntuiText; type TLocalCall = function(Window: PWindow; const Body: PIntuiText; const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; - NFlag: LongWord; Width: LongWord; Height: LongWord; Base: Pointer): Boolean; stdcall; + NFlag: LongWord; Width: LongWord; Height: LongWord; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5119,7 +5119,7 @@ end; procedure BeginRefresh(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5133,7 +5133,7 @@ function BuildSysRequest(Window: PWindow; const Body: PIntuiText; type TLocalCall = function(Window: PWindow; const Body: PIntuiText; const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; - Width: LongWord; Height: LongWord; Base: Pointer): PWindow; stdcall; + Width: LongWord; Height: LongWord; Base: Pointer): PWindow; cdecl; var Call: TLocalCall; begin @@ -5143,7 +5143,7 @@ end; procedure EndRefresh(Window: PWindow; Complete: Boolean); type - TLocalCall = procedure(Window: PWindow; Complete: Boolean; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Complete: Boolean; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5153,7 +5153,7 @@ end; procedure FreeSysRequest(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5163,7 +5163,7 @@ end; function MakeScreen(Screen: PScreen): LongInt; type - TLocalCall = function(Screen: PScreen; Base: Pointer): LongInt; stdcall; + TLocalCall = function(Screen: PScreen; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5173,7 +5173,7 @@ end; function RemakeDisplay: LongInt; type - TLocalCall = function(Base: Pointer): LongInt; stdcall; + TLocalCall = function(Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5183,7 +5183,7 @@ end; function RethinkDisplay: LongInt; type - TLocalCall = function(Base: Pointer): LongInt; stdcall; + TLocalCall = function(Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5195,7 +5195,7 @@ function AllocRemember(var RememberKey: PRemember; Size: LongWord; Flags: LongWord): Pointer; type TLocalCall = function(var RememberKey: PRemember; Size: LongWord; - Flags: LongWord; Base: Pointer): Pointer; stdcall; + Flags: LongWord; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -5205,7 +5205,7 @@ end; procedure AlohaWorkbench(MsgPort: PMsgPort); type - TLocalCall = procedure(MsgPort: PMsgPort; Base: Pointer); stdcall; + TLocalCall = procedure(MsgPort: PMsgPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5216,7 +5216,7 @@ end; procedure FreeRemember(var RememberKey: PRemember; ReallyForget: LongInt); type TLocalCall = procedure(var RememberKey: PRemember; ReallyForget: LongInt; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5226,7 +5226,7 @@ end; function LockIBase(LockNumber: LongWord): LongWord; type - TLocalCall = function(LockNumber: LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(LockNumber: LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5236,7 +5236,7 @@ end; procedure UnlockIBase(LockNumber: LongWord); type - TLocalCall = procedure(LockNumber: LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(LockNumber: LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5248,7 +5248,7 @@ function GetScreenData(buffer: Pointer; Size: LongWord; type_: LongWord; const Screen: PScreen): Boolean; type TLocalCall = function(buffer: Pointer; Size: LongWord; type_: LongWord; - const Screen: PScreen; Base: Pointer): Boolean; stdcall; + const Screen: PScreen; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5260,7 +5260,7 @@ procedure RefreshGList(gadgets: PGadget; Window: PWindow; Requester: PRequester; NumGad: LongInt); type TLocalCall = procedure(gadgets: PGadget; Window: PWindow; - Requester: PRequester; NumGad: LongInt; Base: Pointer); stdcall; + Requester: PRequester; NumGad: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5272,7 +5272,7 @@ function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; NumGad: LongInt; Requester: PRequester): Word; type TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; - NumGad: LongInt; Requester: PRequester; Base: Pointer): Word; stdcall; + NumGad: LongInt; Requester: PRequester; Base: Pointer): Word; cdecl; var Call: TLocalCall; begin @@ -5283,7 +5283,7 @@ end; function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; type TLocalCall = function(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt; - Base: Pointer): Word; stdcall; + Base: Pointer): Word; cdecl; var Call: TLocalCall; begin @@ -5293,7 +5293,7 @@ end; procedure ActivateWindow(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5303,7 +5303,7 @@ end; procedure RefreshWindowFrame(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5315,7 +5315,7 @@ function ActivateGadget(gadgets: PGadget; Window: PWindow; Requester: PRequester): Boolean; type TLocalCall = function(gadgets: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer): Boolean; stdcall; + Requester: PRequester; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5330,7 +5330,7 @@ type TLocalCall = procedure(Gadget: PGadget; Window: PWindow; Requester: PRequester; Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; - NumGad: LongInt; Base: Pointer); stdcall; + NumGad: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5343,7 +5343,7 @@ function QueryOverscan(DisplayID: LongWord; Rect: pRectangle; OScanType: LongInt): LongInt; type TLocalCall = function(DisplayID: LongWord; Rect: pRectangle; - OScanType: LongInt; Base: Pointer): LongInt; stdcall; + OScanType: LongInt; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5354,7 +5354,7 @@ end; procedure MoveWindowInFrontOf(Window: PWindow; BehindWindow: PWindow); type TLocalCall = procedure(Window: PWindow; BehindWindow: PWindow; - Base: Pointer); stdcall; + Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5366,7 +5366,7 @@ procedure ChangeWindowBox(Window: PWindow; Left: LongInt; Top: LongInt; Width: LongInt; Height: LongInt); type TLocalCall = procedure(Window: PWindow; Left: LongInt; Top: LongInt; - Width: LongInt; Height: LongInt; Base: Pointer); stdcall; + Width: LongInt; Height: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5376,7 +5376,7 @@ end; function SetEditHook(hook: PHook): PHook; type - TLocalCall = function(hook: PHook; Base: Pointer): PHook; stdcall; + TLocalCall = function(hook: PHook; Base: Pointer): PHook; cdecl; var Call: TLocalCall; begin @@ -5387,7 +5387,7 @@ end; function SetMouseQueue(Window: PWindow; queueLength: LongWord): LongInt; type TLocalCall = function(Window: PWindow; queueLength: LongWord; - Base: Pointer): LongInt; stdcall; + Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5397,7 +5397,7 @@ end; procedure ZipWindow(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5407,7 +5407,7 @@ end; function LockPubScreen(const Name: PChar): PScreen; type - TLocalCall = function(const Name: PChar; Base: Pointer): PScreen; stdcall; + TLocalCall = function(const Name: PChar; Base: Pointer): PScreen; cdecl; var Call: TLocalCall; begin @@ -5417,7 +5417,7 @@ end; procedure UnlockPubScreen(const Name: PChar; Screen: PScreen); type - TLocalCall = procedure(const Name: PChar; Screen: PScreen; Base: Pointer); stdcall; + TLocalCall = procedure(const Name: PChar; Screen: PScreen; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5427,7 +5427,7 @@ end; function LockPubScreenList: pList; type - TLocalCall = function(Base: Pointer): pList; stdcall; + TLocalCall = function(Base: Pointer): pList; cdecl; var Call: TLocalCall; begin @@ -5437,7 +5437,7 @@ end; procedure UnlockPubScreenList; type - TLocalCall = procedure(Base: Pointer); stdcall; + TLocalCall = procedure(Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5448,7 +5448,7 @@ end; function NextPubScreen(const Screen: PScreen; Namebuf: PChar): PChar; type TLocalCall = function(const Screen: PScreen; Namebuf: PChar; - Base: Pointer): PChar; stdcall; + Base: Pointer): PChar; cdecl; var Call: TLocalCall; begin @@ -5458,7 +5458,7 @@ end; procedure SetDefaultPubScreen(const Name: PChar); type - TLocalCall = procedure(const Name: PChar; Base: Pointer); stdcall; + TLocalCall = procedure(const Name: PChar; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5468,7 +5468,7 @@ end; function SetPubScreenModes(modes: LongWord): Word; type - TLocalCall = function(modes: LongWord; Base: Pointer): Word; stdcall; + TLocalCall = function(modes: LongWord; Base: Pointer): Word; cdecl; var Call: TLocalCall; begin @@ -5479,7 +5479,7 @@ end; function PubScreenStatus(Screen: PScreen; StatusFlags: LongWord): Word; type TLocalCall = function(Screen: PScreen; StatusFlags: LongWord; - Base: Pointer): Word; stdcall; + Base: Pointer): Word; cdecl; var Call: TLocalCall; begin @@ -5489,7 +5489,7 @@ end; function ObtainGIRPort(GInfo: PGadgetInfo): PRastPort; type - TLocalCall = function(GInfo: PGadgetInfo; Base: Pointer): PRastPort; stdcall; + TLocalCall = function(GInfo: PGadgetInfo; Base: Pointer): PRastPort; cdecl; var Call: TLocalCall; begin @@ -5499,7 +5499,7 @@ end; procedure ReleaseGIRPort(Rp: PRastPort); type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5510,7 +5510,7 @@ end; procedure GadgetMouse(Gadget: PGadget; GInfo: PGadgetInfo; mousePoint: psmallint); type TLocalCall = procedure(Gadget: PGadget; GInfo: PGadgetInfo; - mousePoint: psmallint; Base: Pointer); stdcall; + mousePoint: psmallint; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5520,7 +5520,7 @@ end; function SetIPrefs(Data: Pointer; Length: LongWord; Typ: LongWord): LongWord; type - TLocalCall = function(Data: Pointer; Length: LongWord; Typ: LongWord; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Data: Pointer; Length: LongWord; Typ: LongWord; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5530,7 +5530,7 @@ end; procedure GetDefaultPubScreen(NameBuffer: PChar); type - TLocalCall = procedure(NameBuffer: PChar; Base: Pointer); stdcall; + TLocalCall = procedure(NameBuffer: PChar; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5543,7 +5543,7 @@ function EasyRequestArgs(Window: PWindow; type TLocalCall = function(Window: PWindow; const easyStruct: PEasyStruct; IdcmpPtr: PLongWord; - const args: Pointer; Base: Pointer): LongInt; stdcall; + const args: Pointer; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -5553,7 +5553,7 @@ end; function BuildEasyRequestArgs(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer): PWindow; type - TLocalCall = function(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer; Base: Pointer): PWindow; stdcall; + TLocalCall = function(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer; Base: Pointer): PWindow; cdecl; var Call: TLocalCall; begin @@ -5563,7 +5563,7 @@ end; function SysReqHandler(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt): LongInt; type - TLocalCall = function(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5575,7 +5575,7 @@ function OpenWindowTagList(const NewWindow: PNewWindow; const TagList: PTagItem): PWindow; type TOpenWindowTagList = function(const NewWindow: PNewWindow; - const TagList: PTagItem; Base: Pointer): PWindow; stdcall; + const TagList: PTagItem; Base: Pointer): PWindow; cdecl; var Call: TOpenWindowTagList; begin @@ -5585,7 +5585,7 @@ end; function OpenScreenTagList(const NewScreen: PNewScreen;const tagList: PTagItem): PScreen; type - TLocalCall = function(const NewScreen: PNewScreen;const tagList: PTagItem; Base: Pointer): PScreen; stdcall; + TLocalCall = function(const NewScreen: PNewScreen;const tagList: PTagItem; Base: Pointer): PScreen; cdecl; var Call: TLocalCall; begin @@ -5595,7 +5595,7 @@ end; procedure DrawImageState(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo); type - TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo; Base: Pointer); stdcall; + TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5605,7 +5605,7 @@ end; function PointInImage(Point: LongWord; Image: PImage): Boolean; type - TLocalCall = function(Point: LongWord; Image: PImage; Base: Pointer): Boolean; stdcall; + TLocalCall = function(Point: LongWord; Image: PImage; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5615,7 +5615,7 @@ end; procedure EraseImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); type - TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5625,7 +5625,7 @@ end; function NewObjectA(ClassPtr: PIClass;const ClassID: PChar;const TagList: PTagItem): Pointer; type - TLocalCall = function(ClassPtr: PIClass;const ClassID: PChar; Base: Pointer): Pointer; stdcall; + TLocalCall = function(ClassPtr: PIClass;const ClassID: PChar; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -5635,7 +5635,7 @@ end; procedure DisposeObject(Obj: Pointer); type - TLocalCall = procedure(Obj: Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(Obj: Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5646,7 +5646,7 @@ end; function SetAttrsA(Obj: Pointer; const TagList: PTagItem): LongWord; type TLocalCall = function(Obj: Pointer; - const TagList: PTagItem; Base: Pointer): LongWord; stdcall; + const TagList: PTagItem; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5657,7 +5657,7 @@ end; function GetAttr(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord): LongWord; type TLocalCall = function(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord; - Base: Pointer): LongWord; stdcall; + Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5667,7 +5667,7 @@ end; function SetGadgetAttrsA(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem): LongWord; type - TLocalCall = function(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5677,7 +5677,7 @@ end; function NextObject(ObjectPtrPtr: Pointer): PIClass; type - TLocalCall = function(ObjectPtrPtr: Pointer; Base: Pointer): PIClass; stdcall; + TLocalCall = function(ObjectPtrPtr: Pointer; Base: Pointer): PIClass; cdecl; var Call: TLocalCall; begin @@ -5687,7 +5687,7 @@ end; function FindClass(ClassID: PChar): PIClass; type - TLocalCall = function(ClassID: PChar; Base: Pointer): PIClass; stdcall; + TLocalCall = function(ClassID: PChar; Base: Pointer): PIClass; cdecl; var Call: TLocalCall; begin @@ -5697,7 +5697,7 @@ end; function MakeClass(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord): PIClass; type - TLocalCall = function(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord; Base: Pointer): PIClass; stdcall; + TLocalCall = function(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord; Base: Pointer): PIClass; cdecl; var Call: TLocalCall; begin @@ -5707,7 +5707,7 @@ end; procedure AddClass(ClassPtr: PIClass); type - TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); stdcall; + TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5717,7 +5717,7 @@ end; function GetScreenDrawInfo(Screen : PScreen) : PDrawInfo; type - TLocalCall = function(Screen: PScreen; Base: Pointer): PDrawInfo; stdcall; + TLocalCall = function(Screen: PScreen; Base: Pointer): PDrawInfo; cdecl; var Call: TLocalCall; begin @@ -5727,7 +5727,7 @@ end; procedure FreeScreenDrawInfo(Screen : PScreen; DrawInfo : PDrawInfo); type - TLocalCall = procedure(Screen : PScreen; DrawInfo : PDrawInfo; Base: Pointer); stdcall; + TLocalCall = procedure(Screen : PScreen; DrawInfo : PDrawInfo; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5737,7 +5737,7 @@ end; function ResetMenuStrip(Window: PWindow; Menu: PMenu) : Boolean; type - TLocalCall = function(Window: PWindow; Menu: PMenu; Base: Pointer): Boolean; stdcall; + TLocalCall = function(Window: PWindow; Menu: PMenu; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5747,7 +5747,7 @@ end; procedure RemoveClass(ClassPtr : PIClass); type - TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); stdcall; + TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5757,7 +5757,7 @@ end; function FreeClass(ClassPtr : PIClass) : Boolean; type - TLocalCall = function(ClassPtr : PIClass; Base: Pointer): Boolean; stdcall; + TLocalCall = function(ClassPtr : PIClass; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5767,7 +5767,7 @@ end; function AllocScreenBuffer(Sc: PScreen; Bm: PBitMap; Flags: LongWord): PScreenBuffer; type - TLocalCall = function(Sc: PScreen; Bm: PBitMap; Flags: LongWord; Base: Pointer): PScreenBuffer; stdcall; + TLocalCall = function(Sc: PScreen; Bm: PBitMap; Flags: LongWord; Base: Pointer): PScreenBuffer; cdecl; var Call: TLocalCall; begin @@ -5777,7 +5777,7 @@ end; procedure FreeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer); type - TLocalCall = procedure(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer); stdcall; + TLocalCall = procedure(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5787,7 +5787,7 @@ end; function ChangeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer): LongWord; type - TLocalCall = function(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5797,7 +5797,7 @@ end; procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: Pointer); type - TLocalCall = procedure(Screen: PScreen; Flags: LongWord; Reserved: Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Flags: LongWord; Reserved: Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5807,7 +5807,7 @@ end; procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); type - TLocalCall = procedure(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5817,7 +5817,7 @@ end; procedure ScrollWindowRaster(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt); type - TLocalCall = procedure(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt; Base: Pointer); stdcall; + TLocalCall = procedure(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5827,7 +5827,7 @@ end; procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); type - TLocalCall = procedure(FromWindow: PWindow; ToWindow: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(FromWindow: PWindow; ToWindow: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5837,7 +5837,7 @@ end; function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg): LongWord; type - TLocalCall = function(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5847,7 +5847,7 @@ end; procedure SetWindowPointerA(Win: PWindow;const Taglist: PTagItem); type - TLocalCall = procedure(Win: PWindow;const Taglist: PTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(Win: PWindow;const Taglist: PTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5857,7 +5857,7 @@ end; function TimedDisplayAlert(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord): Boolean; type - TLocalCall = function(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord; Base: Pointer): Boolean; stdcall; + TLocalCall = function(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -5867,7 +5867,7 @@ end; procedure HelpControl(Win: PWindow; Flags: LongWord); type - TLocalCall = procedure(Win: PWindow; Flags: LongWord; Base: Pointer); stdcall; + TLocalCall = procedure(Win: PWindow; Flags: LongWord; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5877,7 +5877,7 @@ end; function IsWindowVisible(Window: PWindow): LongWord; type - TLocalCall = function(Window: PWindow; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Window: PWindow; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -5887,7 +5887,7 @@ end; procedure ShowWindow(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5897,7 +5897,7 @@ end; procedure HideWindow(Window: PWindow); type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5907,7 +5907,7 @@ end; function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; type - TLocalCall = function(Window: PWindow; NewShape: PRegion; CallBack: PHook; Base: Pointer): PRegion; stdcall; + TLocalCall = function(Window: PWindow; NewShape: PRegion; CallBack: PHook; Base: Pointer): PRegion; cdecl; var Call: TLocalCall; begin @@ -5917,7 +5917,7 @@ end; procedure SetDefaultScreenFont(TextFont: PTextFont); type - TLocalCall = procedure(TextFont: PTextFont; Base: Pointer); stdcall; + TLocalCall = procedure(TextFont: PTextFont; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5927,7 +5927,7 @@ end; function DoNotify(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; type - TLocalCall = function(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate; Base: Pointer): Pointer; stdcall; + TLocalCall = function(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -5937,7 +5937,7 @@ end; procedure FreeICData(ICData: Pointer); type - TLocalCall = procedure(ICData: Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(ICData: Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5947,7 +5947,7 @@ end; function AllocIntuiMessage(Window: PWindow): PIntuiMessage; type - TLocalCall = function(Window: PWindow; Base: Pointer): PIntuiMessage; stdcall; + TLocalCall = function(Window: PWindow; Base: Pointer): PIntuiMessage; cdecl; var Call: TLocalCall; begin @@ -5957,7 +5957,7 @@ end; procedure FreeIntuiMessage(IMsg: PIntuiMessage); type - TLocalCall = procedure(IMsg: PIntuiMessage; Base: Pointer); stdcall; + TLocalCall = procedure(IMsg: PIntuiMessage; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5967,7 +5967,7 @@ end; procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); type - TLocalCall = procedure(Window: PWindow; IMsg: PIntuiMessage; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; IMsg: PIntuiMessage; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5977,7 +5977,7 @@ end; procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); type - TLocalCall = procedure(ID: LongWord; Decor: PNewDecorator; Base: Pointer); stdcall; + TLocalCall = procedure(ID: LongWord; Decor: PNewDecorator; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5987,7 +5987,7 @@ end; procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); type - TLocalCall = procedure(Window: PWindow; Action: LongWord; Tags: PTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Action: LongWord; Tags: PTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -5997,7 +5997,7 @@ end; procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); type - TLocalCall = procedure(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word; Base: Pointer); stdcall; + TLocalCall = procedure(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -6007,7 +6007,7 @@ end; function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; type - TLocalCall = function(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem; Base: Pointer): LongWord; stdcall; + TLocalCall = function(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem; Base: Pointer): LongWord; cdecl; var Call: TLocalCall; begin @@ -6017,7 +6017,7 @@ end; function StartScreenNotifyTagList(Tags: PTagItem): Pointer; type - TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; stdcall; + TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -6027,7 +6027,7 @@ end; function EndScreenNotify(Notify: Pointer): Boolean; type - TLocalCall = function(Notify: Pointer; Base: Pointer): Boolean; stdcall; + TLocalCall = function(Notify: Pointer; Base: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -6037,7 +6037,7 @@ end; function GetMonitorList(Tags: PTagItem): Pointer; type - TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; stdcall; + TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; cdecl; var Call: TLocalCall; begin @@ -6047,7 +6047,7 @@ end; procedure FreeMonitorList(Obj: Pointer); type - TLocalCall = procedure(Obj: Pointer; Base: Pointer); stdcall; + TLocalCall = procedure(Obj: Pointer; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/keyboard.pp b/rtl/aros/keyboard.pp new file mode 100644 index 0000000000..16e714f4e5 --- /dev/null +++ b/rtl/aros/keyboard.pp @@ -0,0 +1,469 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 by Karoly Balogh + + Keyboard unit for MorphOS and Amiga and AROS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +unit Keyboard; +interface + +{$i keybrdh.inc} + +implementation + +uses + video, exec,intuition, inputevent, mouse, sysutils, keymap; + +{$i keyboard.inc} +{$i keyscan.inc} +var + LastShiftState : Byte; {set by handler for PollShiftStateEvent} + OldMouseX : LongInt; + OldmouseY : LongInt; + OldButtons: Word; + +procedure SysInitKeyboard; +begin +// writeln('sysinitkeyboard'); + LastShiftState := 0; + OldMouseX := -1; + OldmouseY := -1; + OldButtons := 0; +end; + +procedure SysDoneKeyboard; +begin + +end; + +function IsMsgPortEmpty(Port: PMsgPort): Boolean; inline; +begin + IsMsgPortEmpty := (Port^.mp_MsgList.lh_TailPred = @(Port^.mp_MsgList)); +end; + +var + KeyQueue: TKeyEvent; + +type + RawCodeEntry = record + rc,n,s,c,a : Word; { raw code, normal, shift, ctrl, alt } + end; + +const + RCTABLE_MAXIDX = 24; + RawCodeTable : array[0..RCTABLE_MAXIDX] of RawCodeEntry = + ( + (rc: 66; n: $0F09; s: $0F00; c: $9400; a: $A500; ), // TAB + (rc: 68; n: $1C0D; s: $1C0D; c: $1C0A; a: $1C0D; ), // Enter // shift, alt? + (rc: 69; n: $011B; s: $011B; c: $011B; a: $0100; ), // ESC // shift? + (rc: 70; n: $5300; s: $0700; c: $A300; a: $A200; ), // Delete + (rc: 71; n: $5200; s: $0500; c: $0400; a: $A200; ), // Insert + (rc: 72; n: $4900; s: $4900; c: $8400; a: $9900; ), // PgUP // shift? + (rc: 73; n: $5100; s: $5100; c: $7600; a: $A100; ), // PgDOWN // shift? + + (rc: 76; n: $4800; s: $4800; c: $8D00; a: $9800; ), // UP // shift? + (rc: 77; n: $5000; s: $5000; c: $9100; a: $A000; ), // DOWN // shift? + (rc: 78; n: $4D00; s: $4D00; c: $7400; a: $9D00; ), // RIGHT // shift? + (rc: 79; n: $4B00; s: $4B00; c: $7300; a: $9B00; ), // LEFT // shift? + + (rc: 80; n: $3B00; s: $5400; c: $5E00; a: $6800; ), // F1 + (rc: 81; n: $3C00; s: $5500; c: $5F00; a: $6900; ), // F2 + (rc: 82; n: $3D00; s: $5600; c: $6000; a: $6A00; ), // F3 + (rc: 83; n: $3E00; s: $5700; c: $6100; a: $6B00; ), // F4 + (rc: 84; n: $3F00; s: $5800; c: $6200; a: $6C00; ), // F5 + (rc: 85; n: $4000; s: $5900; c: $6300; a: $6D00; ), // F6 + (rc: 86; n: $4100; s: $5A00; c: $6400; a: $6E00; ), // F7 + (rc: 87; n: $4200; s: $5B00; c: $6500; a: $6F00; ), // F8 + (rc: 88; n: $4300; s: $5C00; c: $6600; a: $7000; ), // F9 + (rc: 89; n: $4400; s: $5D00; c: $6700; a: $7100; ), // F10 + (rc: 75; n: $8500; s: $8700; c: $8900; a: $8B00; ), // F11 + (rc: 76; n: $8600; s: $8800; c: $8A00; a: $8C00; ), // F12 + + (rc: 112; n: $4700; s: $4700; c: $7700; a: $9700; ),// Home // shift? + (rc: 113; n: $4F00; s: $4F00; c: $7500; a: $9F00; ) // End // shift? + ); + +function rcTableIdx(rc: LongInt): LongInt; +var + Counter: LongInt; +begin + rcTableIdx := -1; + Counter := 0; + while (RawCodeTable[Counter].rc <> rc) and (Counter <= RCTABLE_MAXIDX) do + Inc(Counter); + if (Counter <= RCTABLE_MAXIDX) then + rcTableIdx := Counter; +end; + +function HasShift(IQual: Word): Boolean; inline; +begin + HasShift := ((IQual and IEQUALIFIER_LSHIFT) <> 0) or + ((IQual and IEQUALIFIER_RSHIFT) <> 0); +end; + +function HasCtrl(IQual: Word): Boolean; inline; +begin + HasCtrl := ((IQual and IEQUALIFIER_CONTROL) <> 0); +end; + +function HasAlt(IQual: Word): Boolean; inline; +begin + HasAlt := ((IQual and IEQUALIFIER_LALT) <> 0) or + ((IQual and IEQUALIFIER_RALT) <> 0); +end; + +function rcTableCode(IQual: Word; Idx: LongInt): LongInt; +begin + if (Idx < 0) or (Idx > RCTABLE_MAXIDX) then + begin + rcTableCode := -1; + Exit; + end; + + if HasShift(IQual) then + rcTableCode:=RawCodeTable[Idx].s + else + if HasCtrl(IQual) then + rcTableCode:=RawCodeTable[Idx].c + else + if HasAlt(IQual) then + rcTableCode:=RawCodeTable[Idx].a + else + rcTableCode:=RawCodeTable[Idx].n; +end; + +procedure setShiftState(IQual: Word); +begin + LastShiftState := 0; + if ((IQual and IEQUALIFIER_LSHIFT) <> 0) then + LastShiftState := LastShiftState or $01; + if ((IQual and IEQUALIFIER_RSHIFT) <> 0) then + LastShiftState := LastShiftState or $02; + if HasCtrl(IQual) then + LastShiftState := LastShiftState or $04; + if HasAlt(IQual) then + LastShiftState := LastShiftState or $08; + if ((IQual and IEQUALIFIER_NUMERICPAD) <> 0) then + LastShiftState := LastShiftState or $20; + if ((IQual and IEQUALIFIER_CAPSLOCK) <> 0) then + LastShiftState := LastShiftState or $40; +end; + +function SysPollKeyEvent: TKeyEvent; +var + MouseEvent: Boolean; // got a mouseevent -> do not leave cycle + SendMouse: Boolean; // we got a (or many) mouse move send the last one + mes: TMouseEvent; // save mouse message send after cycle -> prevent mouse move stacking + me: TMouseEvent; + KeyCode: LongInt; + OldKeyCode: LongInt; + KeySet: ^TKeyRecord; // points to result to set fields directly + Ret: LongInt; + // + iMsg: PIntuiMessage; + ICode: Word; // save items from Message + IQual: Word; + IClass: Longword; + MouseX: Integer; + MouseY: Integer; + KeyUp: Boolean; // Event is a key up event + Buff: array[0..19] of Char; + ie: TInputEvent; // for mapchar +begin + KeyCode := 0; + SysPollKeyEvent := 0; + KeySet := @SysPollKeyEvent; + FillChar(me, SizeOf(TMouseEvent), 0); + + if KeyQueue <> 0 then + begin + SysPollKeyEvent := KeyQueue; + Exit; + end; + SendMouse := False; + repeat + MouseEvent := False; + if VideoWindow <> nil then + begin + if IsMsgPortEmpty(videoWindow^.UserPort) then + Break; + end else + Exit; + PMessage(iMsg) := GetMsg(VideoWindow^.UserPort); + if (iMsg <> nil) then + begin + ICode := iMsg^.Code; + IQual := iMsg^.Qualifier; + IClass := iMsg^.iClass; + MouseX := iMsg^.MouseX; + MouseY := iMsg^.MouseY; + ReplyMsg(PMessage(iMsg)); // fast reply to system + SetShiftState(IQual); // set Shift state qualifiers. do this for all messages we get. + // main event case + case (IClass) of + IDCMP_CLOSEWINDOW: begin + GotCloseWindow; + end; + IDCMP_CHANGEWINDOW: begin + GotResizeWindow; + end; + IDCMP_MOUSEBUTTONS: begin + MouseEvent := True; + me.x := (MouseX - videoWindow^.BorderLeft) div 8; // calculate char position + me.y := (MouseY - videoWindow^.BorderTop) div 16; + case ICode of + SELECTDOWN: begin + //writeln('left down!'); + me.Action := MouseActionDown; + OldButtons := OldButtons or MouseLeftButton; + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + SELECTUP: begin + //writeln('left up!'); + me.Action := MouseActionUp; + OldButtons := OldButtons and (not MouseLeftButton); + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + MENUDOWN: begin + //writeln('right down!'); + me.Action := MouseActionDown; + OldButtons := OldButtons or MouseRightButton; + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + MENUUP: begin + //writeln('right up!'); + me.Action := MouseActionUp; + OldButtons := OldButtons and (not MouseRightButton); + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + end; + //writeln('Buttons: ' , me.Buttons); + end; + IDCMP_MOUSEMOVE: begin + MouseX := (MouseX - VideoWindow^.BorderLeft) div 8; + MouseY := (MouseY - VideoWindow^.BorderTop) div 16; + if (MouseX >= 0) and (MouseY >= 0) and + (MouseX < Video.ScreenWidth) and (MouseY < Video.ScreenHeight) and + ((MouseX <> OldMouseX) or (MouseY <> OldmouseY)) + then begin +// //writeln('mousemove:',Mousex,'/',Mousey,' oldbutt:',OldButtons); + // Drawing is very slow so when moving window it will drag behind + // because the mouse events stack in the messageport + // -> so we override move until messageport is empty or keyevent is fired + SendMouse := True; + MouseEvent := True; + mes.Action := MouseActionMove; + mes.Buttons := OldButtons; + mes.X := MouseX; + mes.Y := MouseY; + //PutMouseEvent(me); + end; + end; + IDCMP_RAWKEY: begin + // mouse wheel up or down -> pgup and pgdown + if ICode = 122 then + ICode := 72; + if ICode = 123 then + ICode := 73; + // get char from rawkey + KeyUp := (ICode and IECODE_UP_PREFIX) <> 0; // is key up + ICode := ICode and not IECODE_UP_PREFIX; // remove key up from ICode + ie.ie_Class := IECLASS_RAWKEY; + ie.ie_SubClass := 0; + ie.ie_Code := ICode; + ie.ie_Qualifier := IQual; + ie.ie_NextEvent := nil; + Buff[0] := #0; + Ret := MapRawKey(@ie, @Buff[0], 1, nil); + KeyCode := Ord(Buff[0]); + KeySet^.KeyCode := Ord(Buff[0]); // if maprawkey does not work it still is 0 + KeySet^.ShiftState := LastShiftState; // shift state set before the case + KeySet^.Flags := 0; + if keyup then // we do not need key up events up to now + begin + KeySet^.Flags := KeySet^.Flags or kbReleased; // kbReleased does work but make strange effects + SysPollKeyEvent := 0; + Exit; + end; + // check our hard coed list if there is an entry -> leave it must be right ;) + // F-keys, cursor, esc, del, ins, del, pgup, pgdown, pos, end, enter, tab + if rcTableCode(IQual,rcTableIdx(ICode)) >= 0 then + begin + KeyCode := rcTableCode(IQual,rcTableIdx(ICode)); + KeySet^.KeyCode := KeyCode; + KeySet^.Flags := kbPhys; + end else + begin + // left alt or ctrl is pressed -> check for alternative Scancode -> commando + if ((IQual and IEQUALIFIER_LALT) <> 0) or HasCtrl(IQual) then + begin + OldKeyCode := KeyCode; // save keycode if nothing found + KeyCode := 0; + ie.ie_Class := IECLASS_RAWKEY; // get keycode without qualifier easier case + ie.ie_SubClass := 0; + ie.ie_Code := ICode; + ie.ie_Qualifier := 0; + ie.ie_NextEvent := nil; + Buff[0] := #0; + Ret := MapRawKey(@ie, @Buff[0], 1, nil); + if Ret > 0 then + begin + if ((IQual and IEQUALIFIER_LALT) <> 0) then // check left alt keycodes + begin + case Buff[0] of // Alt - keys already defined + 'a': KeyCode := kbAltA shl 8; + 'b': KeyCode := kbAltB shl 8; + 'c': KeyCode := kbAltC shl 8; + 'd': KeyCode := kbAltD shl 8; + 'e': KeyCode := kbAltE shl 8; + 'f': KeyCode := kbAltF shl 8; + 'g': KeyCode := kbAltG shl 8; + 'h': KeyCode := kbAltH shl 8; + 'i': KeyCode := kbAltI shl 8; + 'j': KeyCode := kbAltJ shl 8; + 'k': KeyCode := kbAltK shl 8; + 'l': KeyCode := kbAltL shl 8; + 'm': KeyCode := kbAltM shl 8; + 'n': KeyCode := kbAltN shl 8; + 'o': KeyCode := kbAltO shl 8; + 'p': KeyCode := kbAltP shl 8; + 'q': KeyCode := kbAltQ shl 8; + 'r': KeyCode := kbAltR shl 8; + 's': KeyCode := kbAltS shl 8; + 't': KeyCode := kbAltT shl 8; + 'u': KeyCode := kbAltU shl 8; + 'v': KeyCode := kbAltV shl 8; + 'w': KeyCode := kbAltW shl 8; + 'x': KeyCode := kbAltX shl 8; + 'y': KeyCode := kbAltY shl 8; + 'z': KeyCode := kbAltZ shl 8; + end; + end else + begin + case Buff[0] of // ctrl - keys defined in FreeVision/drivers.pas -> so here direct numbers + 'a': KeyCode := $1E01; + 'b': KeyCode := $3002; + 'c': KeyCode := $2E03; + 'd': KeyCode := $2004; + 'e': KeyCode := $1205; + 'f': KeyCode := $2106; + 'g': KeyCode := $2207; + 'h': KeyCode := $2308; + 'i': KeyCode := $1709; + 'j': KeyCode := $240a; + 'k': KeyCode := $250b; + 'l': KeyCode := $260c; + 'm': KeyCode := $320d; + 'n': KeyCode := $310e; + 'o': KeyCode := $180f; + 'p': KeyCode := $1910; + 'q': KeyCode := $1011; + 'r': KeyCode := $1312; + 's': KeyCode := $1F13; + 't': KeyCode := $1414; + 'u': KeyCode := $1615; + 'v': KeyCode := $2F16; + 'w': KeyCode := $1117; + 'x': KeyCode := $2D18; + 'y': KeyCode := $1519; + 'z': KeyCode := $2C1A; + end; + end; + end; + if KeyCode <= 0 then // nothing found restore keycode + KeyCode := OldKeyCode; + KeySet^.KeyCode := KeyCode; + KeySet^.Flags := kbPhys; + end; + end; + if keycode <= 0 then + begin + KeySet^.KeyCode := 0; + KeyCode := 0; + end; + //writeln('raw keycode: ',iMsg^.code, ' -> $', IntToHex(keycode,4), ' ret: ', ret); + end; + else begin + KeyCode := 0; + end; + end; + end else + Break; + until (not MouseEvent); + // + if SendMouse then + begin + PutMouseEvent(mes); + OldMouseX:=Mousex; + OldmouseY:=Mousey; + end; + if KeyCode <= 0 then // no keycode found then also delete flags and shiftstate + SysPollKeyEvent := 0 + else + KeyQueue:=SysPollKeyEvent; +end; + +function SysGetKeyEvent: TKeyEvent; +var + Res: TKeyEvent; + me: TMouseEvent; +begin + Res := 0; + if VideoWindow <> nil then + begin + if KeyQueue <> 0 then + begin + SysGetKeyEvent := KeyQueue; + KeyQueue := 0; + Exit; + end; + repeat + WaitPort(VideoWindow^.UserPort); + Res := SysPollKeyEvent; + until Res <> 0; + end else + begin + me.Action := MouseActionDown; + me.Buttons := MouseRightButton; + PutMouseEvent(me); + end; + SysGetKeyEvent := Res; +end; + +{function SysTranslateKeyEvent(KeyEvent: TKeyEvent): TKeyEvent; +begin +end;} + +function SysGetShiftState: Byte; +begin + //writeln('SysgetShiftState:',hexstr(LastShiftState,2)); + SysGetShiftState := LastShiftState; +end; + +const + SysKeyboardDriver : TKeyboardDriver = ( + InitDriver : @SysInitKeyBoard; + DoneDriver : @SysDoneKeyBoard; + GetKeyevent : @SysGetKeyEvent; + PollKeyEvent : @SysPollKeyEvent; + GetShiftState : @SysGetShiftState; +// TranslateKeyEvent : @SysTranslateKeyEvent; + TranslateKeyEvent : Nil; + TranslateKeyEventUnicode : Nil; + ); + +begin + SetKeyBoardDriver(SysKeyBoardDriver); +end. diff --git a/packages/arosunits/src/keymap.pas b/rtl/aros/keymap.pas index 16db018d6f..78ec8e3f3a 100644 --- a/packages/arosunits/src/keymap.pas +++ b/rtl/aros/keymap.pas @@ -120,7 +120,7 @@ implementation function AskKeyMapDefault : PKeyMap; type - TLocalCall = function(Base: Pointer): PKeyMap; stdcall; + TLocalCall = function(Base: Pointer): PKeyMap; cdecl; var Call: TLocalCall; begin @@ -130,7 +130,7 @@ end; function MapANSI(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap): LongInt; type - TLocalCall = function(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): LongInt; stdcall; + TLocalCall = function(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -140,7 +140,7 @@ end; function MapRawKey(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap) : SmallInt; type - TLocalCall = function(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): SmallInt; stdcall; + TLocalCall = function(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): SmallInt; cdecl; var Call: TLocalCall; begin @@ -150,7 +150,7 @@ end; procedure SetKeyMapDefault(KeyMap: PKeyMap); type - TLocalCall = procedure(KeyMap: PKeyMap; Base: Pointer); stdcall; + TLocalCall = procedure(KeyMap: PKeyMap; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/layers.pas b/rtl/aros/layers.pas new file mode 100644 index 0000000000..6a90c24adc --- /dev/null +++ b/rtl/aros/layers.pas @@ -0,0 +1,486 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{ + History: + + Added the defines use_amiga_smartlink and + use_auto_openlib. Implemented autoopening + of the library. + 14 Jan 2003. + + Update for AmigaOS 3.9. + Changed start code for unit. + 06 Feb 2003. + + Changed integer > smallint, + cardinal > longword. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se +} + +unit layers; + +interface +uses + exec, agraphics, utility; + +const + + LAYERSIMPLE = 1; + LAYERSMART = 2; + LAYERSUPER = 4; + LAYERUPDATING = $10; + LAYERBACKDROP = $40; + LAYERREFRESH = $80; + LAYER_CLIPRECTS_LOST = $100; { during BeginUpdate } + { or during layerop } + { this happens if out of memory } + LMN_REGION = -1; + +type + PLayer_Info = ^TLayer_Info; + TLayer_Info = record + top_layer : PLayer; + check_lp : PLayer; { !! Private !! } + obs : PClipRect; + FreeClipRects : PClipRect; { !! Private !! } + PrivateReserve1, { !! Private !! } + PrivateReserve2 : LongInt; { !! Private !! } + Lock : TSignalSemaphore; { !! Private !! } + gs_Head : TMinList; { !! Private !! } + PrivateReserve3 : SmallInt; { !! Private !! } + PrivateReserve4 : Pointer; { !! Private !! } + Flags : WORD; + fatten_count : Shortint; { !! Private !! } + LockLayersCount : Shortint; { !! Private !! } + PrivateReserve5 : SmallInt; { !! Private !! } + BlankHook, { !! Private !! } + LayerInfo_extra : Pointer; { !! Private !! } + end; + +const + NEWLAYERINFO_CALLED = 1; + +{ + * LAYERS_NOBACKFILL is the value needed to get no backfill hook + * LAYERS_BACKFILL is the value needed to get the default backfill hook + } + LAYERS_NOBACKFILL = 1; + LAYERS_BACKFILL = 0; + + LAYERSNAME : PChar = 'layers.library'; + +var + LayersBase : PLibrary; + +function BeginUpdate(Layer : PLayer) : LongInt; +function BehindLayer(dummy : LongInt; Layer : PLayer) : LongInt; +function CreateBehindHookLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; Hook : PHook; SuperBitmap2 : PBitMap) : PLayer; +function CreateBehindLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; SuperBitmap2 : PBitMap) : PLayer; +function CreateUpfrontHookLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; Hook : PHook; SuperBitmap2 : PBitMap) : PLayer; +function CreateUpfrontLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; SuperBitmap2 : PBitMap) : PLayer; +function DeleteLayer(dummy : LongInt; Layer : PLayer) : LongInt; +procedure DisposeLayerInfo(LayerInfo : PLayer_Info); +procedure DoHookClipRects(Hook : PHook; RPort : PRastPort;const Rect : PRectangle); +procedure EndUpdate(Layer : PLayer; Flag : LongWord); +function FattenLayerInfo(LayerInfo : PLayer_Info) : LongInt; +procedure InitLayers(LayerInfo : PLayer_Info); +function InstallClipRegion(Layer : PLayer;const Region : PRegion) : PRegion; +function InstallLayerHook(Layer : PLayer; Hook : PHook) : PHook; +function InstallLayerInfoHook(LayerInfo : PLayer_Info;const Hook : PHook) : PHook; +procedure LockLayer(dummy : LongInt; Layer : PLayer); +procedure LockLayerInfo(LayerInfo : PLayer_Info); +procedure LockLayers(LayerInfo : PLayer_Info); +function MoveLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt) : LongInt; +function MoveLayerInFrontOf(layer_to_move : PLayer; other_layer : PLayer) : LongInt; +function MoveSizeLayer(Layer : PLayer; dx : LongInt; dy : LongInt; dw : LongInt; dh : LongInt) : LongInt; +function NewLayerInfo : PLayer_Info; +procedure ScrollLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt); +function SizeLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt) : LongInt; +procedure SortLayerCR(Layer : PLayer; dx : LongInt; dy : LongInt); +procedure SwapBitsRastPortClipRect(rp : PRastPort; cr : PClipRect); +procedure ThinLayerInfo(LayerInfo : PLayer_Info); +procedure UnlockLayer(Layer : PLayer); +procedure UnlockLayerInfo(LayerInfo : PLayer_Info); +procedure UnlockLayers(LayerInfo : PLayer_Info); +function UpfrontLayer(dummy : LongInt; Layer : PLayer) : LongInt; +function WhichLayer(LayerInfo : PLayer_Info; x : LongInt; y : LongInt) : PLayer; + +implementation + + +function BeginUpdate(Layer: PLayer): LongInt; +type + TLocalCall = function(Layer: PLayer; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 13)); + BeginUpdate := Call(Layer, LayersBase); +end; + + +function BehindLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 9)); + BehindLayer:= Call(dummy, Layer, LayersBase); +end; + + +function CreateBehindHookLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 32)); + CreateBehindHookLayer:= Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, Hook, SuperBitmap2, LayersBase); +end; + + +function CreateBehindLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 7)); + CreateBehindLayer := Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, SuperBitmap2, LayersBase); +end; + + +function CreateUpfrontHookLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 31)); + CreateUpfrontHookLayer := Call( LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, Hook, SuperBitmap2, LayersBase); +end; + + +function CreateUpfrontLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 6)); + CreateUpfrontLayer := Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, SuperBitmap2, LayersBase); +end; + + +function DeleteLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 15)); + DeleteLayer := Call( dummy, Layer, LayersBase); +end; + + +procedure DisposeLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 25)); + Call(LayerInfo, LayersBase); +end; + + +procedure DoHookClipRects(Hook: PHook; RPort: PRastPort; const Rect: PRectangle); +type + TLocalCall = procedure(Hook : PHook; RPort: PRastPort; const Rect: PRectangle; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 36)); + Call(Hook, RPort, Rect, LayersBase); +end; + + +procedure EndUpdate(Layer: PLayer; Flag: LongWord); +type + TLocalCall = procedure(Layer: PLayer; Flag: LongWord; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 14)); + Call(Layer, flag, LayersBase); +end; + + +function FattenLayerInfo(LayerInfo: PLayer_Info):LongInt; +type + TLocalCall = function(LayerInfo: PLayer_Info; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 26)); + FattenLayerInfo := Call(LayerInfo, LayersBase); +end; + + +procedure InitLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase,5)); + Call(LayerInfo, LayersBase); +end; + + +function InstallClipRegion(Layer: PLayer; const Region: PRegion): PRegion; +type + TLocalCall = function(Layer: PLayer; const Region: PRegion; LibBase: Pointer): PRegion; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 29)); + InstallClipRegion := Call( Layer, Region, LayersBase); +end; + + +function InstallLayerHook(Layer: PLayer; Hook: PHook): PHook; +type + TLocalCall = function(Layer: PLayer; Hook: PHook; LibBase: Pointer): PHook; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 33)); + InstallLayerHook := Call(Layer, Hook, LayersBase); +end; + + +function InstallLayerInfoHook(LayerInfo: PLayer_Info; const Hook: PHook): PHook; +type + TLocalCall = function(LayerInfo: PLayer_Info; const Hook: PHook; LibBase: Pointer): PHook; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 34)); + InstallLayerInfoHook := Call(LayerInfo, Hook, LayersBase); +end; + + +procedure LockLayer(dummy: LongInt; Layer: PLayer); +type + TLocalCall = procedure(dummy: LongInt; Layer: PLayer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 16)); + Call(dummy, Layer, LayersBase); +end; + + +procedure LockLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 20)); + Call(LayerInfo, LayersBase); +end; + + +procedure LockLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 18)); + Call(LayerInfo, LayersBase); +end; + + +function MoveLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt): LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 10)); + MoveLayer := Call(dummy, Layer, dx, dy, LayersBase); +end; + + +function MoveLayerInFrontOf(layer_to_move: PLayer; other_layer: PLayer):LongInt; +type + TLocalCall = function(layer_to_move: PLayer; other_layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 28)); + MoveLayerInFrontOf := Call(layer_to_move, other_layer, LayersBase); +end; + + +function MoveSizeLayer(Layer: PLayer; dx: LongInt; dy: LongInt; dw: LongInt; dh: LongInt): LongInt; +type + TLocalCall = function(Layer: PLayer; dx: LongInt; dy: LongInt; dw: LongInt; dh: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 30)); + MoveSizeLayer := Call(Layer, dx, dy, dw, dh, LayersBase); +end; + + +function NewLayerInfo(): PLayer_Info; +type + TLocalCall = function(LibBase: Pointer): PLayer_Info; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 24)); + NewLayerInfo := Call(LayersBase); +end; + + +procedure ScrollLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt); +type + TLocalCall = procedure(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 12)); + Call(dummy, Layer, dx, dy, LayersBase); +end; + + +function SizeLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt): LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 11)); + SizeLayer := Call(dummy, Layer, dx, dy, LayersBase); +end; + + +procedure SortLayerCR(Layer: PLayer; dx: LongInt; dy: LongInt); +type + TLocalCall = procedure(Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 35)); + Call(Layer, dx, dy, LayersBase); +end; + + +procedure SwapBitsRastPortClipRect(rp: pRastPort; cr: PClipRect); +type + TLocalCall = procedure(rp: pRastPort; cr: PClipRect; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 21)); + Call(rp, cr, LayersBase); +end; + + +procedure ThinLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 27)); + Call(LayerInfo, LayersBase); +end; + + +procedure UnlockLayer(Layer: PLayer); +type + TLocalCall = procedure(Layer: PLayer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 17)); + Call(Layer, LayersBase); +end; + + +procedure UnlockLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call:=TLocalCall(GetLibAdress(LayersBase, 23)); + Call(LayerInfo, LayersBase); +end; + + +procedure UnlockLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 19)); + Call(LayerInfo, LayersBase); +end; + + +function UpfrontLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 8)); + UpfrontLayer := Call(dummy, Layer, LayersBase); +end; + + +function WhichLayer(LayerInfo: PLayer_Info; x: LongInt; y: LongInt):PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; x: LongInt; y: LongInt; LibBase: Pointer):PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 22)); + WhichLayer := Call(LayerInfo, x, y, LayersBase); +end; + +initialization + LayersBase := OpenLibrary(LAYERSNAME, 36); + +finalization + CloseLibrary(LayersBase); + +eND. (* UNIT LAYERS *) + + + diff --git a/packages/arosunits/src/longarray.pas b/rtl/aros/longarray.pas index b3f1fe2a9e..b3f1fe2a9e 100644 --- a/packages/arosunits/src/longarray.pas +++ b/rtl/aros/longarray.pas diff --git a/rtl/aros/mouse.pp b/rtl/aros/mouse.pp new file mode 100644 index 0000000000..f081996402 --- /dev/null +++ b/rtl/aros/mouse.pp @@ -0,0 +1,61 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 Karoly Balogh + member of the Free Pascal development team + + Mouse unit for Amiga/MorphOS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +unit Mouse; +interface + +{$i mouseh.inc} + +implementation + +{$i mouse.inc} + +function SysDetectMouse:byte; +var + num : dword; +begin + // Under Amiga/MorphOS, mouse is always there, and it's unable to easily + // detect number of buttons. So lets report 3, which is common nowadays. (KB) + SysDetectMouse:=3; +end; + + + + + + + + + +const + SysMouseDriver : TMouseDriver = ( + UseDefaultQueue : True; + InitDriver : Nil; + DoneDriver : Nil; + DetectMouse : @SysDetectMouse; + ShowMouse : Nil; + HideMouse : Nil; + GetMouseX : Nil; + GetMouseY : Nil; + GetMouseButtons : Nil; + SetMouseXY : Nil; + GetMouseEvent : Nil; + PollMouseEvent : Nil; + PutMouseEvent : Nil; + ); + +begin + SetMouseDriver(SysMouseDriver); +end. diff --git a/packages/arosunits/src/pastoc.pas b/rtl/aros/pastoc.pas index 1b89378749..1b89378749 100644 --- a/packages/arosunits/src/pastoc.pas +++ b/rtl/aros/pastoc.pas diff --git a/rtl/aros/sysdir.inc b/rtl/aros/sysdir.inc index d24e0c6ee4..74d36712f5 100644 --- a/rtl/aros/sysdir.inc +++ b/rtl/aros/sysdir.inc @@ -21,90 +21,99 @@ //procedure mkdir(const s : string); procedure mkdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_MKDIR']; var - tmpStr : array[0..255] of char; - tmpLock: LongInt; - s: String; + TmpStr : array[0..255] of char; + TmpLock: LongInt; + S: String; begin - s := string(a); - checkCTRLC; - if (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - tmpLock:=dosCreateDir(@tmpStr); - if tmpLock=0 then begin - dosError2InOut(IoErr); - exit; + S := string(a); + CheckCTRLC; + if (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + TmpLock := DosCreateDir(@TmpStr); + if TmpLock = 0 then begin + DosError2InOut(IoErr); + Exit; end; - UnLock(tmpLock); + UnLock(TmpLock); end; //procedure rmdir(const s : string); procedure rmdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_RMDIR']; var - tmpStr : array[0..255] of Char; - s: string; + TmpStr : array[0..255] of Char; + S: string; begin - s := string(a); - checkCTRLC; - if (s='.') then InOutRes:=16; - If (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - if not dosDeleteFile(@tmpStr) then - dosError2InOut(IoErr); + S := string(a); + CheckCTRLC; + if (S = '.') then + InOutRes := 16; + If (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + if not DosDeleteFile(@TmpStr) then + DosError2InOut(IoErr); end; //procedure chdir(const s : string); procedure chdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_CHDIR']; var - tmpStr : array[0..255] of Char; - tmpLock: LongInt; + TmpStr : array[0..255] of Char; + TmpLock: LongInt; FIB : PFileInfoBlock; - s: String; + S: String; begin - s := string(a); - checkCTRLC; - If (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - tmpLock:=0; + S := string(a); + CheckCTRLC; + If (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + TmpLock := 0; { Changing the directory is a pretty complicated affair } { 1) Obtain a lock on the directory } { 2) CurrentDir the lock } - tmpLock:=Lock(@tmpStr,SHARED_LOCK); - if tmpLock=0 then begin - dosError2InOut(IoErr); - exit; + TmpLock := Lock(@TmpStr, SHARED_LOCK); + if TmpLock=0 then + begin + DosError2InOut(IoErr); + Exit; end; - FIB:=nil; - new(FIB); + FIB := nil; + New(FIB); - if (Examine(tmpLock,FIB)=True) and (FIB^.fib_DirEntryType>0) then begin - tmpLock:=CurrentDir(tmpLock); - if AOS_OrigDir=0 then begin - AOS_OrigDir:=tmpLock; - tmpLock:=0; + if (Examine(TmpLock, FIB) = True) and (FIB^.fib_DirEntryType > 0) then + begin + TmpLock := CurrentDir(TmpLock); + if AOS_OrigDir = 0 then + begin + AOS_OrigDir := TmpLock; + TmpLock := 0; end; end; - if tmpLock<>0 then Unlock(tmpLock); - if assigned(FIB) then dispose(FIB); + if TmpLock <> 0 then + Unlock(TmpLock); + if Assigned(FIB) then + Dispose(FIB); end; -procedure GetDir (DriveNr: byte; var Dir: ShortString); +procedure GetDir(DriveNr: Byte; var Dir: ShortString); var - tmpbuf: array[0..255] of char; + TmpBuf: array[0..255] of Char; LockDir: LongInt; begin - checkCTRLC; + CheckCTRLC; Dir:=''; LockDir := CurrentDir(0); CurrentDir(LockDir); - NameFromLock(LockDir, tmpbuf, 256); - Dir := strpas(tmpbuf); + NameFromLock(LockDir, TmpBuf, 256); + Dir := StrPas(TmpBuf); // followinf dos not work when called from WB or by make {if not GetCurrentDirName(tmpbuf,256) then - dosError2InOut(IoErr) + DosError2InOut(IoErr) else Dir:=strpas(tmpbuf); } diff --git a/rtl/aros/sysfile.inc b/rtl/aros/sysfile.inc index 0521a13efe..eed6f75b94 100644 --- a/rtl/aros/sysfile.inc +++ b/rtl/aros/sysfile.inc @@ -19,15 +19,17 @@ {***************************************************************************** AROS File-handling Support Functions *****************************************************************************} + type { AmigaOS does not automatically close opened files on exit back to } { the operating system, therefore as a precuation we close all files } { manually on exit. } PFileList = ^TFileList; TFileList = record { no packed, must be correctly aligned } - handle : THandle; { Handle to file } - next : PFileList; { Next file in list } - buffered : boolean; { used buffered I/O? } + Handle : THandle; { Handle to file } + FName : array of Char; + Next : PFileList; { Next file in list } + Buffered : Boolean; { used Buffered I/O? } end; var @@ -36,57 +38,70 @@ var { Function to be called at program shutdown, to close all opened files } procedure CloseList(l: PFileList); var - tmpNext : PFileList; - tmpHandle : THandle; + TmpNext: PFileList; + TmpHandle: THandle; begin - if l=nil then exit; + if l = nil then + Exit; { First, close all tracked files } - tmpNext:=l^.next; - while tmpNext<>nil do begin - tmpHandle:=tmpNext^.handle; - if (tmpHandle<>StdInputHandle) and (tmpHandle<>StdOutputHandle) - and (tmpHandle<>StdErrorHandle) then begin - dosClose(tmpHandle); + TmpNext := l^.Next; + while TmpNext <> nil do + begin + TmpHandle := TmpNext^.Handle; + if (TmpHandle <> StdInputHandle) and (TmpHandle <> StdOutputHandle) + and (TmpHandle <> StdErrorHandle) then + begin + DosClose(TmpHandle); end; - tmpNext:=tmpNext^.next; + TmpNext := TmpNext^.Next; end; { Next, erase the linked list } - while l<>nil do begin - tmpNext:=l; - l:=l^.next; - dispose(tmpNext); + while l <> nil do + begin + TmpNext := l; + l := l^.Next; + Dispose(TmpNext); end; end; { Function to be called to add a file to the opened file list } -procedure AddToList(var l: PFileList; h: THandle); alias: 'ADDTOLIST'; [public]; +procedure AddToList(var l: PFileList; h: THandle; const AName: PChar); alias: 'ADDTOLIST'; [public]; var - p : PFileList; - inList: Boolean; + p: PFileList; + InList: Boolean; + LocalName: string; begin - inList:=False; - if l<>nil then begin + InList := False; + if l <> nil then + begin { if there is a valid filelist, search for the value } { in the list to avoid double additions } - p:=l; - while (p^.next<>nil) and (not inList) do - if p^.next^.handle=h then inList:=True - else p:=p^.next; - p:=nil; - end else begin + p := l; + while (p^.Next <> nil) and (not InList) do + if p^.Next^.Handle = h then + inList := True + else + p := p^.Next; + p := nil; + end else + begin { if the list is not yet allocated, allocate it. } New(l); - l^.next:=nil; + l^.Next := nil; end; - if not inList then begin + if not inList then + begin New(p); - p^.handle:=h; - p^.buffered:=False; - p^.next:=l^.next; - l^.next:=p; + p^.Handle := h; + localname := AName + #0; + SetLength(p^.FName, Length(LocalName)); + Move(LocalName[1], p^.FName[0], Length(LocalName)); + p^.Buffered := False; + p^.Next := l^.Next; + l^.Next := p; end {$IFDEF MOSFPC_FILEDEBUG} else @@ -96,27 +111,31 @@ begin end; { Function to be called to remove a file from the list } -function RemoveFromList(var l: PFileList; h: THandle): boolean; alias: 'REMOVEFROMLIST'; [public]; +function RemoveFromList(var l: PFileList; h: THandle): Boolean; alias: 'REMOVEFROMLIST'; [public]; var - p : PFileList; - inList : Boolean; - tmpList: PFileList; + p: PFileList; + InList: Boolean; + TmpList: PFileList; begin - inList:=False; - if l=nil then begin - RemoveFromList:=inList; - exit; + InList := False; + if l = nil then + begin + RemoveFromList := InList; + Exit; end; - p:=l; - while (p^.next<>nil) and (not inList) do - if p^.next^.handle=h then inList:=True - else p:=p^.next; + p := l; + while (p^.Next <> nil) and (not InList) do + if p^.Next^.Handle = h then + InList := True + else + p := p^.Next; - if inList then begin - tmpList:=p^.next^.next; - dispose(p^.next); - p^.next:=tmpList; + if InList then + begin + TmpList := p^.Next^.Next; + Dispose(p^.Next); + p^.Next := TmpList; end {$IFDEF MOSFPC_FILEDEBUG} else @@ -124,33 +143,60 @@ begin {$ENDIF} ; - RemoveFromList:=inList; + RemoveFromList := inList; end; { Function to check if file is in the list } function CheckInList(var l: PFileList; h: THandle): pointer; alias: 'CHECKINLIST'; [public]; var - p : PFileList; - inList : Pointer; - + p: PFileList; + InList: Pointer; begin - inList:=nil; - if l=nil then begin - CheckInList:=inList; - exit; + InList := nil; + if l = nil then + begin + CheckInList := InList; + Exit; end; - p:=l; - while (p^.next<>nil) and (inList=nil) do - if p^.next^.handle=h then inList:=p^.next - else p:=p^.next; + p := l; + while (p^.Next <> nil) and (InList = nil) do + if p^.Next^.Handle = h then + InList := p^.Next + else + p := p^.Next; {$IFDEF MOSFPC_FILEDEBUG} - if inList=nil then + if InList = nil then RawDoFmt('FPC_FILE_DEBUG: Warning! Check for not existing filehandle: $%lx !'+#10,@h,pointer(1),nil); {$ENDIF} - CheckInList:=inList; + CheckInList := InList; +end; + +function GetNameFromList(var l: PFileList; h: THandle): PChar; alias: 'GETNAMEFROMLIST'; [public]; +var + p: PFileList; + InList: PChar; +begin + InList := ''; + if l = nil then + begin + GetNameFromList := ''; + Exit; + end; + + p := l; + while (p^.Next <> nil) and (InList = '') do + begin + if p^.Next^.Handle = h then + begin + InList := PChar(@(p^.Next^.FName[0])); + Break; + end else + p := p^.Next; + end; + GetNameFromList := inList; end; @@ -159,231 +205,270 @@ end; All these functions can set InOutRes on errors ****************************************************************************} -{ close a file from the handle value } -procedure do_close(handle : THandle); +{ close a file from the Handle value } +procedure do_close(Handle: THandle); begin - if RemoveFromList(AOS_fileList,handle) then begin + if RemoveFromList(AOS_fileList,Handle) then + begin { Do _NOT_ check CTRL_C on Close, because it will conflict with System_Exit! } - if not dosClose(handle) then + if not dosClose(Handle) then dosError2InOut(IoErr); end; end; -procedure do_erase(p : pchar); +procedure do_erase(p: PChar); var - tmpStr: array[0..255] of Char; + TmpStr: array[0..255] of Char; begin - tmpStr:=PathConv(strpas(p))+#0; - checkCTRLC; - if not dosDeleteFile(@tmpStr) then - dosError2InOut(IoErr); + TmpStr := PathConv(StrPas(p))+#0; + CheckCTRLC; + if not dosDeleteFile(@TmpStr) then + DosError2InOut(IoErr); end; -procedure do_rename(p1,p2 : pchar); +procedure do_rename(p1,p2 : PChar); { quite stack-effective code, huh? :) damn path conversions... (KB) } var - tmpStr1: array[0..255] of Char; - tmpStr2: array[0..255] of Char; + TmpStr1: array[0..255] of Char; + TmpStr2: array[0..255] of Char; begin - tmpStr1:=PathConv(strpas(p1))+#0; - tmpStr2:=PathConv(strpas(p2))+#0; - checkCTRLC; - if not dosRename(@tmpStr1,@tmpStr2) then - dosError2InOut(IoErr); + TmpStr1 := PathConv(StrPas(p1)) + #0; + TmpStr2 := PathConv(StrPas(p2)) + #0; + CheckCTRLC; + if not dosRename(@TmpStr1, @TmpStr2) then + DosError2InOut(IoErr); end; -function do_write(h: THandle; addr: pointer; len: longint) : longint; -var dosResult: LongInt; +function do_write(h: THandle; addr: pointer; Len: LongInt) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_write:=0; - if (len<=0) or (h=0) then exit; - -{$IFDEF MOSFPC_FILEDEBUG} - if not ((h=StdOutputHandle) or (h=StdInputHandle) or - (h=StdErrorHandle)) then CheckInList(AOS_fileList,h); -{$ENDIF} - - dosResult:=dosWrite(h,addr,len); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_write:=dosResult; + CheckCTRLC; + do_write := 0; + if (Len <= 0) or (h = 0) then + Exit; + + DosResult := DosWrite(h, addr, Len); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_write := DosResult; + end; + {$IFDEF MOSFPC_FILEDEBUG} + if not ((h = StdOutputHandle) or (h = StdInputHandle) or + (h = StdErrorHandle)) then + begin + writeln('## write ',h,' should: ', len, ' is: ', Dosresult); + //CheckInList(AOS_fileList, h); end; + {$ENDIF} end; -function do_read(h: THandle; addr: pointer; len: longint) : longint; -var dosResult: LongInt; +function do_read(h: THandle; addr: pointer; Len: LongInt) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_read:=0; - if (len<=0) or (h=0) then exit; + CheckCTRLC; + do_read := 0; + if (Len <= 0) or (h = 0) then + Exit; {$IFDEF MOSFPC_FILEDEBUG} - if not ((h=StdOutputHandle) or (h=StdInputHandle) or - (h=StdErrorHandle)) then CheckInList(AOS_fileList,h); + if not ((h = StdOutputHandle) or (h = StdInputHandle) or + (h = StdErrorHandle)) then + CheckInList(AOS_fileList, h); {$ENDIF} - dosResult:=dosRead(h,addr,len); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_read:=dosResult; + DosResult := DosRead(h, addr, Len); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_read := DosResult; end end; -function do_filepos(handle: THandle) : longint; -var dosResult: LongInt; +function do_filepos(Handle: THandle) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_filepos:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + do_filepos := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking zero from OFFSET_CURRENT to find out where we are } - dosResult:=dosSeek(handle,0,OFFSET_CURRENT); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_filepos:=dosResult; + DosResult := DosSeek(Handle, 0, OFFSET_CURRENT); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_filepos := DosResult; end; end; end; -procedure do_seek(handle: Thandle; pos: longint); +procedure do_seek(Handle: Thandle; pos: LongInt); +var + err: Integer; begin - checkCTRLC; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking from OFFSET_BEGINNING } - if dosSeek(handle,pos,OFFSET_BEGINNING)<0 then - dosError2InOut(IoErr); + if DosSeek(Handle, pos, OFFSET_BEGINNING) < 0 then + begin + Err := ioErr; + DosError2InOut(Err); + end; end; end; -function do_seekend(handle: longint):longint; -var dosResult: LongInt; +function do_seekend(Handle: LongInt):LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_seekend:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + do_seekend := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking to OFFSET_END } - dosResult:=dosSeek(handle,0,OFFSET_END); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_seekend:=dosResult; + DosResult := dosSeek(Handle, 0, OFFSET_END); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_seekend := DosSeek(Handle, 0, OFFSET_CURRENT); // get positon end; end; end; -function do_filesize(handle : longint) : longint; -var currfilepos: longint; +function do_filesize(Handle : LongInt) : LongInt; +var + CurrFilePos: LongInt; begin - checkCTRLC; - do_filesize:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - - currfilepos:=do_filepos(handle); - { We have to do this twice, because seek returns the OLD position } - do_filesize:=do_seekend(handle); - do_filesize:=do_seekend(handle); - do_seek(handle,currfilepos); - Result := do_fileSize; + CheckCTRLC; + do_filesize := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin + CurrFilePos := do_filepos(Handle); + do_filesize := do_seekend(Handle); + do_seek(Handle, CurrFilePos); end; end; { truncate at a given position } -procedure do_truncate(handle, pos: longint); +procedure do_truncate(Handle, pos: LongInt); begin - checkCTRLC; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking from OFFSET_BEGINNING } - if SetFileSize(handle,pos,OFFSET_BEGINNING)<0 then - dosError2InOut(IoErr); + if SetFileSize(Handle, pos, OFFSET_BEGINNING) < 0 then + DosError2InOut(IoErr); end; end; -procedure do_open(var f;p:pchar;flags:longint); +procedure do_open(var f; p: PChar; flags: LongInt); { - filerec and textrec have both handle and mode as the first items so + filerec and textrec have both Handle and mode as the first items so they could use the same routine for opening/creating. when (flags and $10) the file will be append when (flags and $100) the file will be truncate/rewritten when (flags and $1000) there is no check for close (needed for textfiles) } var - handle : THandle; - openflags: LongInt; - tmpStr : array[0..255] of Char; + Handle : THandle; + OpenFlags: LongInt; + TmpStr : array[0..255] of Char; begin - tmpStr:=PathConv(strpas(p))+#0; - + TmpStr:=PathConv(StrPas(p))+#0; + { close first if opened } - if ((flags and $10000)=0) then begin + if ((flags and $10000) = 0) then + begin case filerec(f).mode of - fminput,fmoutput,fminout : Do_Close(filerec(f).handle); - fmclosed : ; - else begin - inoutres:=102; {not assigned} - exit; + fminput, + fmoutput, + fminout: Do_Close(filerec(f).Handle); + fmclosed: ; + else + begin + InOutRes := 102; {not assigned} + Exit; end; end; end; - { reset file handle } - filerec(f).handle:=UnusedHandle; + { reset file Handle } + filerec(f).Handle := UnusedHandle; { convert filemode to filerec modes } { READ/WRITE on existing file } { RESET/APPEND } - openflags:=MODE_OLDFILE; + OpenFlags := MODE_OLDFILE; case (flags and 3) of - 0 : filerec(f).mode:=fminput; - 1 : filerec(f).mode:=fmoutput; - 2 : filerec(f).mode:=fminout; + 0 : filerec(f).mode := fminput; + 1 : filerec(f).mode := fmoutput; + 2 : filerec(f).mode := fminout; end; { rewrite (create a new file) } - if (flags and $1000)<>0 then openflags:=MODE_NEWFILE; + if (flags and $1000) <> 0 then + openflags:=MODE_NEWFILE; { empty name is special } - if p[0]=#0 then begin + if p[0] = #0 then + begin case filerec(f).mode of - fminput : - filerec(f).handle:=StdInputHandle; + fminput: + filerec(f).Handle := StdInputHandle; fmappend, - fmoutput : begin - filerec(f).handle:=StdOutputHandle; - filerec(f).mode:=fmoutput; {fool fmappend} + fmoutput: begin + filerec(f).Handle := StdOutputHandle; + filerec(f).mode := fmOutput; {fool fmappend} end; end; - exit; + Exit; end; - handle:=Open(@tmpStr,openflags); - if handle=0 then begin - dosError2InOut(IoErr); - end else begin - AddToList(AOS_fileList,handle); - filerec(f).handle:=handle; + Handle := Open(@TmpStr, OpenFlags); + if Handle = 0 then + begin + DosError2InOut(IoErr); + end else + begin + AddToList(AOS_fileList, Handle, PChar(@TmpStr[0])); + filerec(f).Handle := Handle; end; { append mode } - if ((Flags and $100)<>0) and - (FileRec(F).Handle<>UnusedHandle) then begin - do_seekend(filerec(f).handle); - filerec(f).mode:=fmoutput; {fool fmappend} + if ((Flags and $100) <> 0) and (FileRec(F).Handle <> UnusedHandle) then + begin + do_seekend(filerec(f).Handle); + filerec(f).mode := fmoutput; {fool fmappend} + end; + + {$IFDEF MOSFPC_FILEDEBUG} + if not ((Handle = StdOutputHandle) or (Handle = StdInputHandle) or + (Handle = StdErrorHandle)) then + begin + CheckInList(AOS_fileList, h); end; + {$ENDIF} + end; -function do_isdevice(handle: longint): boolean; +function do_isdevice(Handle: LongInt): Boolean; begin - if (handle=StdOutputHandle) or (handle=StdInputHandle) or - (handle=StdErrorHandle) then - do_isdevice:=True + if (Handle = StdOutputHandle) or (Handle = StdInputHandle) or + (Handle = StdErrorHandle) then + do_isdevice := True else - do_isdevice:=False; + do_isdevice := False; end; diff --git a/rtl/aros/sysos.inc b/rtl/aros/sysos.inc index 0b4ee75569..02a4dc9afd 100644 --- a/rtl/aros/sysos.inc +++ b/rtl/aros/sysos.inc @@ -151,4 +151,3 @@ begin end; PathConv:=path; end; - diff --git a/rtl/aros/system.pp b/rtl/aros/system.pp index 0b306dabd6..85fd642bb5 100644 --- a/rtl/aros/system.pp +++ b/rtl/aros/system.pp @@ -72,8 +72,6 @@ var envp: PPChar; killed : Boolean = False; - ExtReturnCode: LongInt; external name '_returncode'; - function GetLibAdress(Base: Pointer; Offset: LongInt): Pointer; implementation @@ -104,16 +102,7 @@ type Misc. System Dependent Functions *****************************************************************************} -procedure ExternalHalt; stdcall;external name '_haltproc'; - - -procedure haltproc(e:longint); -begin - ExtReturnCode := e; - ExternalHalt; -end; - - +procedure haltproc(e:longint); cdecl; nostackframe; external name '_haltproc'; procedure System_exit; var @@ -137,8 +126,6 @@ begin DeletePool(AOS_heapPool); AOS_UtilityBase := nil; AOS_HeapPool := nil; - // call Exit - DosExit(ExitCode); // if AOS_DOSBase<>nil then CloseLibrary(AOS_DOSBase); @@ -430,7 +417,6 @@ begin result := stklen; end; - begin IsConsole := TRUE; SysResetFPU; diff --git a/rtl/aros/sysutils.pp b/rtl/aros/sysutils.pp index 279f7d6c11..36821879f5 100644 --- a/rtl/aros/sysutils.pp +++ b/rtl/aros/sysutils.pp @@ -57,12 +57,13 @@ uses dos,sysconst; { * Followings are implemented in the system unit! * } function PathConv(path: shortstring): shortstring; external name 'PATHCONV'; -procedure AddToList(var l: Pointer; h: LongInt); external name 'ADDTOLIST'; +procedure AddToList(var l: Pointer; h: LongInt; const AName: PChar); external name 'ADDTOLIST'; function RemoveFromList(var l: Pointer; h: LongInt): boolean; external name 'REMOVEFROMLIST'; function CheckInList(var l: Pointer; h: LongInt): pointer; external name 'CHECKINLIST'; +function GetNameFromList(var l: Pointer; h: THandle): PChar; external name 'GETNAMEFROMLIST'; var - MOS_fileList: Pointer; external name 'AOS_FILELIST'; + AOS_fileList: Pointer; external name 'AOS_FILELIST'; function dosLock(const name: String; @@ -96,6 +97,28 @@ begin result:=ComposeDateTime(tmpDate,tmpTime); end; +function DateTimeToAmigaFileDate(FDate: TDateTime): TDateStamp; +var + clockData: TClockData; + msec: Word; + tmpSecs: LongWord; +begin + with clockData do + begin + DecodeDate(FDate, Year, Month, mday); + DecodeTime(FDate, hour, min, sec, msec); + end; + tmpSecs := Date2Amiga(@clockdata); + with Result do + begin + ds_Days := tmpSecs div (24 * 60 * 60); + tmpSecs := tmpSecs - (ds_Days * (24 * 60 * 60)); + ds_Minute := tmpSecs div 60; + tmpSecs := tmpSecs - (ds_Minute * 60); + ds_Tick := tmpSecs * TICKS_PER_SECOND; + end; +end; + procedure Sleep(milliseconds: Cardinal); var Ticks: Cardinal; @@ -119,30 +142,67 @@ end; function FileOpen(const FileName: string; Mode: Integer): LongInt; var dosResult: LongInt; - tmpStr : array[0..255] of char; + tmpStr : string;//array[0..255] of char; begin {$WARNING FIX ME! To do: FileOpen Access Modes} - tmpStr:=PathConv(FileName)+#0; - dosResult:=Open(@tmpStr,MODE_OLDFILE); + tmpStr:=PathConv(FileName) + #0; + dosResult:=Open(PChar(tmpStr),MODE_OLDFILE); if dosResult=0 then dosResult:=-1 else - AddToList(MOS_fileList,dosResult); + AddToList(AOS_fileList, dosResult, PChar(tmpStr)); FileOpen:=dosResult; end; function FileGetDate(Handle: LongInt) : LongInt; +var + FileName: string; + tmpLock: Longint; + tmpFIB : PFileInfoBlock; + tmpDateTime: TDateTime; + validFile: boolean; begin - Result := 0; - {$WARNING filegetdate call is dummy} + FileName := GetNameFromList(AOS_fileList, Handle); + if FileName = '' then + begin + Result := -1; + Exit; + end; + FileName := Filename + #0; + tmpLock := dosLock(PChar(Filename), SHARED_LOCK); + + if (tmpLock <> 0) then begin + new(tmpFIB); + if Examine(tmpLock,tmpFIB) then begin + tmpDateTime:=AmigaFileDateToDateTime(tmpFIB^.fib_Date,validFile); + end; + Unlock(tmpLock); + dispose(tmpFIB); + end; + + if validFile then + result:=DateTimeToFileDate(tmpDateTime) + else + result:=-1; end; function FileSetDate(Handle, Age: LongInt) : LongInt; +var + DateStamp: TDateStamp; + FileName: string; begin - // Impossible under unix from FileHandle !! + Result := 0; + FileName := GetNameFromList(AOS_fileList, Handle); + if FileName = '' then + begin + Result := -1; + Exit; + end; + DateStamp := DateTimeToAmigaFileDate(FileDateToDateTime(Age)); + SetFileDate(PChar(FileName), @DateStamp); FileSetDate:=-1; end; @@ -157,7 +217,7 @@ begin if dosResult=0 then dosResult:=-1 else - AddToList(MOS_fileList,dosResult); + AddToList(AOS_fileList,dosResult, @tmpStr); FileCreate:=dosResult; end; @@ -228,7 +288,7 @@ begin if (Handle=0) or (Handle=-1) then exit; // dosClose(Handle); - RemoveFromList(MOS_fileList,Handle); + RemoveFromList(AOS_fileList,Handle); end; diff --git a/packages/arosunits/src/tagsarray.pas b/rtl/aros/tagsarray.pas index a8cc12fee1..a8cc12fee1 100644 --- a/packages/arosunits/src/tagsarray.pas +++ b/rtl/aros/tagsarray.pas diff --git a/packages/arosunits/src/timer.pas b/rtl/aros/timer.pas index b464303d1c..c78cccfc87 100644 --- a/packages/arosunits/src/timer.pas +++ b/rtl/aros/timer.pas @@ -93,7 +93,7 @@ IMPLEMENTATION Procedure AddTime(Dest, Source: ptimeval); type - TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); stdcall; + TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -103,7 +103,7 @@ end; Function CmpTime( Dest, Source : ptimeval) : ULONG; type - TLocalCall = function(Dest, Source : ptimeval; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(Dest, Source : ptimeval; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -113,7 +113,7 @@ end; Procedure SubTime( Dest, Source : ptimeval); type - TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); stdcall; + TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -123,7 +123,7 @@ end; function ReadEClock(Dest : pEClockVal): longint; type - TLocalCall = function(Dest : pEClockVal; LibBase: Pointer): longint; stdcall; + TLocalCall = function(Dest : pEClockVal; LibBase: Pointer): longint; cdecl; var Call: TLocalCall; begin @@ -133,7 +133,7 @@ end; procedure GetSysTime(Dest: ptimeval); type - TLocalCall = procedure(Dest: ptimeval; LibBase: Pointer); stdcall; + TLocalCall = procedure(Dest: ptimeval; LibBase: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/utility.pas b/rtl/aros/utility.pas index 68c2a7e1fb..a399ec6f47 100644 --- a/packages/arosunits/src/utility.pas +++ b/rtl/aros/utility.pas @@ -386,7 +386,7 @@ uses function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean; type - TLocalCall = function(nameSpace,obj : pNamedObject; LibBase: Pointer): Boolean; stdcall; + TLocalCall = function(nameSpace,obj : pNamedObject; LibBase: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -396,7 +396,7 @@ end; function AllocateTagItems(num : ULONG) : pTagItem; type - TLocalCall = function(num : ULONG; LibBase: Pointer): pTagItem; stdcall; + TLocalCall = function(num : ULONG; LibBase: Pointer): pTagItem; cdecl; var Call: TLocalCall; begin @@ -406,7 +406,7 @@ end; function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject; type - TLocalCall = function(const name : STRPTR;const TagList : pTagItem; LibBase: Pointer): pNamedObject; stdcall; + TLocalCall = function(const name : STRPTR;const TagList : pTagItem; LibBase: Pointer): pNamedObject; cdecl; var Call: TLocalCall; begin @@ -416,7 +416,7 @@ end; procedure Amiga2Date(amigatime : ULONG;resultat : pClockData); type - TLocalCall = procedure(amigatime : ULONG;resultat : pClockData; LibBase: Pointer); stdcall; + TLocalCall = procedure(amigatime : ULONG;resultat : pClockData; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -426,7 +426,7 @@ end; procedure ApplyTagChanges(TagList : pTagItem;const ChangeList : pTagItem); type - TLocalCall = procedure(TagList : pTagItem;const ChangeList : pTagItem; LibBase: Pointer); stdcall; + TLocalCall = procedure(TagList : pTagItem;const ChangeList : pTagItem; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -436,7 +436,7 @@ end; function AttemptRemNamedObject(obj : pNamedObject) : LongInt; type - TLocalCall = function(obj : pNamedObject; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(obj : pNamedObject; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -446,7 +446,7 @@ end; function CallHookPktA(h : pHook;obj, paramPkt : APTR) : ULONG; type - TLocalCall = function(h : pHook;obj, paramPkt : APTR; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(h : pHook;obj, paramPkt : APTR; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -461,7 +461,7 @@ end; function CheckDate(const date : pClockData) : ULONG; type - TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -471,7 +471,7 @@ end; function CloneTagItems(const tagList : pTagItem) : pTagItem; type - TLocalCall = function(const tagList : pTagItem; LibBase: Pointer): pTagItem; stdcall; + TLocalCall = function(const tagList : pTagItem; LibBase: Pointer): pTagItem; cdecl; var Call: TLocalCall; begin @@ -481,7 +481,7 @@ end; function Date2Amiga(const date : pClockData) : ULONG; type - TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -491,7 +491,7 @@ end; procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG); type - TLocalCall = procedure(changelist, oldvalues : pTagItem;apply : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(changelist, oldvalues : pTagItem;apply : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -501,7 +501,7 @@ end; function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG; type - TLocalCall = function(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -511,7 +511,7 @@ end; function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject; type - TLocalCall = function(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject; LibBase: Pointer): pNamedObject; stdcall; + TLocalCall = function(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject; LibBase: Pointer): pNamedObject; cdecl; var Call: TLocalCall; begin @@ -521,7 +521,7 @@ end; function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem; type - TLocalCall = function(TagVal : Tag;const TagList : pTagItem; LibBase: Pointer): pTagItem; stdcall; + TLocalCall = function(TagVal : Tag;const TagList : pTagItem; LibBase: Pointer): pTagItem; cdecl; var Call: TLocalCall; begin @@ -531,7 +531,7 @@ end; procedure FreeNamedObject(Obj : pNamedObject); type - TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); stdcall; + TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -541,7 +541,7 @@ end; procedure FreeTagItems(TagList : pTagItem); type - TLocalCall = procedure(TagList : pTagItem; LibBase: Pointer); stdcall; + TLocalCall = procedure(TagList : pTagItem; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -551,7 +551,7 @@ end; function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG; type - TLocalCall = function(tagval : Tag;default : ULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(tagval : Tag;default : ULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -561,7 +561,7 @@ end; function GetUniqueID : ULONG; type - TLocalCall = function(LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -571,7 +571,7 @@ end; procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG); type - TLocalCall = procedure(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG; LibBase: Pointer); stdcall; + TLocalCall = procedure(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -581,7 +581,7 @@ end; function NamedObjectName(Obj : pNamedObject) : STRPTR; type - TLocalCall = function(Obj : pNamedObject; LibBase: Pointer): STRPTR; stdcall; + TLocalCall = function(Obj : pNamedObject; LibBase: Pointer): STRPTR; cdecl; var Call: TLocalCall; begin @@ -591,7 +591,7 @@ end; function NextTagItem(Item : ppTagItem) : pTagItem; type - TLocalCall = function(Item : ppTagItem; LibBase: Pointer): pTagItem; stdcall; + TLocalCall = function(Item : ppTagItem; LibBase: Pointer): pTagItem; cdecl; var Call: TLocalCall; begin @@ -601,7 +601,7 @@ end; function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG; type - TLocalCall = function(InitialFlags : ULONG;const TagList, boolmap : pTagItem; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(InitialFlags : ULONG;const TagList, boolmap : pTagItem; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -611,7 +611,7 @@ end; function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG; type - TLocalCall = function(packk: APTR;const packTable : pULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(packk: APTR;const packTable : pULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -621,7 +621,7 @@ end; procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem); type - TLocalCall = procedure(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem; LibBase: Pointer); stdcall; + TLocalCall = procedure(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -631,7 +631,7 @@ end; procedure ReleaseNamedObject(Obj : pNamedObject); type - TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); stdcall; + TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -641,7 +641,7 @@ end; procedure RemNamedObject(Obj : pNamedObject;Msg : pointer); type - TLocalCall = procedure(Obj : pNamedObject;Msg : pointer; LibBase: Pointer); stdcall; + TLocalCall = procedure(Obj : pNamedObject;Msg : pointer; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -651,7 +651,7 @@ end; function SDivMod32(dividend , divisor : LongInt) : LongInt; type - TLocalCall = function(dividend , divisor : LongInt; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(dividend , divisor : LongInt; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -661,7 +661,7 @@ end; function SMult32(Arg1, Arg2 : LongInt) : LongInt; type - TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -671,7 +671,7 @@ end; function SMult64(Arg1, Arg2 : LongInt) : LongInt; type - TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -681,7 +681,7 @@ end; function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt; type - TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -691,7 +691,7 @@ end; function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt; type - TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt; LibBase: Pointer): LongInt; stdcall; + TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt; LibBase: Pointer): LongInt; cdecl; var Call: TLocalCall; begin @@ -701,7 +701,7 @@ end; function TagInArray(t : Tag;const TagArray : pULONG) : Boolean; type - TLocalCall = function(t : Tag;const TagArray : pULONG; LibBase: Pointer): Boolean; stdcall; + TLocalCall = function(t : Tag;const TagArray : pULONG; LibBase: Pointer): Boolean; cdecl; var Call: TLocalCall; begin @@ -711,7 +711,7 @@ end; function ToLower(c : ULONG) : Char; type - TLocalCall = function(c : ULONG; LibBase: Pointer): Char; stdcall; + TLocalCall = function(c : ULONG; LibBase: Pointer): Char; cdecl; var Call: TLocalCall; begin @@ -721,7 +721,7 @@ end; function ToUpper(c : ULONG) : Char; type - TLocalCall = function(c : ULONG; LibBase: Pointer): Char; stdcall; + TLocalCall = function(c : ULONG; LibBase: Pointer): Char; cdecl; var Call: TLocalCall; begin @@ -731,7 +731,7 @@ end; function UDivMod32(dividend , divisor : ULONG) : ULONG; type - TLocalCall = function(dividend , divisor : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(dividend , divisor : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -741,7 +741,7 @@ end; function UMult32(Arg1, Arg2 : ULONG) : ULONG; type - TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -751,7 +751,7 @@ end; function UMult64(Arg1, Arg2 : ULONG) : ULONG; type - TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin @@ -761,7 +761,7 @@ end; function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG; type - TLocalCall = function(const pac: APTR;const packTable: pULONG;TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; + TLocalCall = function(const pac: APTR;const packTable: pULONG;TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; var Call: TLocalCall; begin diff --git a/rtl/aros/video.pp b/rtl/aros/video.pp new file mode 100644 index 0000000000..a16fcd71c9 --- /dev/null +++ b/rtl/aros/video.pp @@ -0,0 +1,656 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 by Karoly Balogh + member of the Free Pascal development team + + Video unit for Amiga and MorphOS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit Video; + +{.$define VIDEODEBUG} +{.$define WITHBUFFERING} + + +{ + Date: 2013-01-09 + What: Adjusted FPC video unit for AROS (/AmigaOS?) + + goal: + --------------------------------------------------------------------------- + Attempt to add user-on-demand support for AROS Fullscreen to the FPC video + unit. + + DISCLAIMER: + Experimental code only meant as PoC. + + DON'T USE FOR PUBLICATION UNLESS ALL PERSONAL COMMENTS AND REFERENCES ARE + REMOVED AND THE ACTUAL CODE IS APPROVED BY SOMEONE THAT KNOWS WHAT HE/SHE + IS DOING. + THIS CODE IS PROOF OF CONCEPT ONLY AND AS SUCH DOES NOT PROVIDE 100% + RELIABLE CODE AND/OR APPROVED PROGRAMMING TECHNIQUES. + + Idea: + The idea of running a video-unit screen on its own graphical screen + emerged from ALB42's port of the dos-based fp-editor that is distributed + with freepascal. In it's original form the editor would be run from dos + and would present itself in a full-screen modus fashion. + + This behaviour changed slightly with the ending of the dos era, and + instead a commando window started to appear in regular OS'. + + But even when this changed, Windows users were still able to view this + command window in full-screen by means of pressing ctrl-enter. + + Since this behaviour is not present on current next gen amigaOS systems, + we have to live without that. + + And so begun the idea of letting the video-unit somehow be influenced + in such a way that an Freevision application that uses the videounit + could be shown in fullscreen. + + In order to accomplish this task we missuse the color tag of TVideomode. + When the color is set to monochrome it will show the + dos-screen on a full graphics screen and the dos-output will be shown + in a borderless backdrop window. That way it appears that the vision + application is running full-screen. + + The current implementation has a limitation that cannot be solved. + + Namely, the vision screens are based on a ascii character screen, so + the final measurements of the full-screen-window will depend + on the amount of pixels that maximally can be displayed by means of + those same character-sizes. + Since the used font is currently 8 pixels width and 16 pixels high, + it becomes clear that not every screen-resolution is suitable to + exactly fit both dimensions pixelwise. As a result a small + stripe (of default backgroundcolor) on the bottom or right may appear. + + HAVE FUN ! + + MaGoRiuM +} + + +interface + +uses + amigados, intuition, tagsarray, utility, sysutils; + +{$i videoh.inc} + + +{ Amiga specific calls, to help interaction between Keyboard, Mouse and + Video units, and Free Vision } +procedure GotCloseWindow; +function HasCloseWindow: boolean; +procedure GotResizeWindow; +function HasResizeWindow(var winw:longint; var winh: longint): boolean; + + + +var + VideoWindow: PWindow; + +implementation + +uses + exec, agraphics; + +{$i video.inc} + +{$i videodata.inc} + +const + VIDEOSCREENNAME = 'FPC Video Screen Output'; + +var + OS_Screen : PScreen = nil; // To hold our screen, when necessary + FPC_VIDEO_FULLSCREEN : Boolean = False; // Global that defines when we need to attempt opening on own scren + +var + VideoColorMap : PColorMap; + VideoPens : array[0..15] of LongInt; + + OldCursorX, + OldCursorY : LongInt; + CursorType : Word; + OldCursorType : Word; + + {$ifdef WITHBUFFERING} + BitmapWidth, BitmapHeight: Integer; + BufRp: PRastPort; + {$endif} + + GotCloseWindowMsg : Boolean; + GotResizeWindowMsg : Boolean; + LastL, LastT: Integer; + LastW, LastH: Integer; + WindowForReqSave: PWindow; + Process: PProcess; +(* + GetScreen: pScreen; + + Tries to open a custom screen, which attempt to clone the workbench, + and returns the pointer to the screen. Result can be nil when failed + otherwise the screen got opened correctly. +*) +Function GetScreen: pScreen; +var + ScreenTags: TTagsList; + Tags: PTagItem; +begin + AddTags(ScreenTags,[ + SA_Title , VIDEOSCREENNAME, + SA_Left , 0, + SA_Top , 0, + SA_ShowTitle , 0, // Do not show the screen's TitleBar + SA_Type , 1 shl 1, // pubscreen + SA_PubName , VIDEOSCREENNAME, + SA_Quiet , True, + SA_LikeWorkbench , 1 // Let OS + ]); + Tags := GetTagPtr(ScreenTags); + GetScreen := OpenScreenTagList(nil, Tags); + {$ifdef VIDEODEBUG} + if (GetScreen <> nil) then + Writeln('DEBUG: Opened a new screen') + else + Writeln('ERROR: Failed to open new screen'); + {$endif} +end; + +(* + GetWindow: pWindow; + + Tries to create and open a window. Returns the pointer to + the window or nil in case of failure. + + The routine keeps the global FPC_FULL_SCREEM option into + account and act accordingly. + + In windowed mode it returns a window with another kind of + settings then when it has to reside on it's own customscreen. +*) +Function GetWindow: PWindow; +Var + WindowTags: TTagsList; + Tags: PTagItem; +begin + if FPC_VIDEO_FULLSCREEN then + begin + OS_Screen := GetScreen; + If OS_Screen = nil then + Exit; + + {$ifdef VIDEODEBUG} + WriteLn('DEBUG: Opened customscreen succesfully'); + {$endif} + Addtags(WindowTags, [ + WA_CustomScreen, OS_Screen, + WA_Left , 0, + WA_Top , 0, + WA_InnerWidth , (OS_Screen^.Width div 8) * 8, + WA_InnerHeight, (OS_Screen^.Height div 16) * 16, + WA_AutoAdjust , 1, + WA_Activate , 1, + WA_Borderless , 1, + WA_BackDrop , 1, + WA_FLAGS , (WFLG_GIMMEZEROZERO or WFLG_REPORTMOUSE or WFLG_RMBTRAP or + WFLG_SMART_REFRESH or WFLG_NOCAREREFRESH), + WA_IDCMP , (IDCMP_RAWKEY or + IDCMP_MOUSEMOVE or IDCMP_MOUSEBUTTONS or + IDCMP_CHANGEWINDOW or IDCMP_CLOSEWINDOW) + ]); + end else + begin // Windowed Mode + AddTags(WindowTags, [ + WA_Left , LastL, + WA_Top , LastT, + WA_InnerWidth , LastW*8, + WA_InnerHeight, LastH*16, + WA_MaxWidth , 32768, + WA_MaxHeight , 32768, + WA_Title , PChar('FPC Video Window Output'), + WA_Activate , 1, + WA_FLAGS , (WFLG_GIMMEZEROZERO or WFLG_REPORTMOUSE or + WFLG_SMART_REFRESH or WFLG_NOCAREREFRESH or + WFLG_DRAGBAR or WFLG_DEPTHGADGET or WFLG_SIZEGADGET or + WFLG_SIZEBBOTTOM or WFLG_RMBTRAP or WFLG_CLOSEGADGET), + WA_IDCMP , (IDCMP_RAWKEY or + IDCMP_MOUSEMOVE or IDCMP_MOUSEBUTTONS or + IDCMP_CHANGEWINDOW or IDCMP_CLOSEWINDOW)//, + ]); + end; + + Tags := GetTagPtr(WindowTags); + GetWindow := OpenWindowTagList(nil, Tags); + + Process := PProcess(FindTask(nil)); + WindowForReqSave := Process^.pr_WindowPtr; + Process^.pr_WindowPtr := GetWindow; + + {$ifdef VIDEODEBUG} + If GetWindow <> nil then + WriteLn('DEBUG: Sucessfully opened videounit Window') + else + WriteLn('ERROR: Failed to open videounit Window'); + {$endif} +end; + + +// ========================================================================== +// == +// == Original source code continues, with minor adjustments +// == +// ========================================================================== + + +procedure SysInitVideo; +var + Counter: LongInt; +begin + {$ifdef VIDEODEBUG} + WriteLn('FULLSCREEN VIDEO UNIT MODIFICATION v2'); + if FPC_VIDEO_FULLSCREEN then + WriteLn('DEBUG: Recognized fullscreen mode') + else + WriteLn('DEBUG: Recognized windowed mode'); + {$endif} + + // fill videobuf and oldvideobuf with different bytes, to allow proper first draw + FillDword(VideoBuf^, VideoBufSize div 4, $1234D3AD); + FillDword(OldVideoBuf^, VideoBufSize div 4, $4321BEEF); + + VideoWindow := GetWindow; + + // nice hardcode values are probably going to screw up things + // so wee neeed a way to detrmined how many chars could be on + // the screen in both directions. And a bit accurate. + if FPC_VIDEO_FULLSCREEN then + begin + // just to make sure that we are going to use the window width + // and height instead of the one from the screen. + // This is to circumvent that the window (or virtual window from + // vision based on characters pixels * characters in both + // dimensions) is actually smaller then the window it resides on. + // + // Can happen for instance when the window does not hide it's + // borders or title as intended. + ScreenWidth := VideoWindow^.GZZWidth div 8; + ScreenHeight := VideoWindow^.GZZHeight div 16; + ScreenColor := False; + + {$ifdef VIDEODEBUG} + Writeln('DEBUG: Fullscreen - windowed - Width * Heigth = ',ScreenWidth,' * ',ScreenHeight); + {$endif} + end else + begin + ScreenWidth := LastW; + ScreenHeight := LastH; + ScreenColor := True; + end; + {$ifdef WITHBUFFERING} + BufRp^.Bitmap := AllocBitmap(VideoWindow^.GZZWidth, VideoWindow^.GZZHeight, VideoWindow^.RPort^.Bitmap^.Depth, BMF_CLEAR, VideoWindow^.RPort^.Bitmap); + BitmapWidth := VideoWindow^.GZZWidth; + BitmapHeight := VideoWindow^.GZZHeight; + {$endif} + { viewpostcolormap info } + videoColorMap := pScreen(videoWindow^.WScreen)^.ViewPort.ColorMap; + + for Counter := 0 to 15 do + begin + VideoPens[Counter] := ObtainPen(VideoColorMap, LongWord(-1), + vgacolors[counter, 0] shl 24, vgacolors[counter, 1] shl 24, vgacolors[counter, 2] shl 24, + PEN_EXCLUSIVE); + {$ifdef VIDEODEBUG} + If VideoPens[Counter] = -1 then + WriteLn('errr color[',Counter,'] = ', VideoPens[Counter]) + else + WriteLn('good color[',Counter,'] = ', VideoPens[Counter]); + {$endif} + end; + + CursorX := 0; + CursorY := 0; + OldCursorX := 0; + OldCursorY := 0; + CursorType := crHidden; + OldCursorType := crHidden; + + GotCloseWindowMsg := false; + GotResizeWindowMsg := false; +end; + +procedure SysDoneVideo; +var + Counter: LongInt; +begin + if VideoWindow <> nil then + begin + Process^.pr_WindowPtr := WindowForReqSave; + if not FPC_VIDEO_FULLSCREEN then + begin + LastL := VideoWindow^.LeftEdge; + LastT := VideoWindow^.TopEdge; + end; + CloseWindow(videoWindow); + end; + {$ifdef WITHBUFFERING} + FreeBitmap(BufRp^.Bitmap); + BufRp^.Bitmap := nil; + {$endif} + VideoWindow := nil; + for Counter := 0 to 15 do + ReleasePen(VideoColorMap, VideoPens[Counter]); + if ((FPC_VIDEO_FULLSCREEN) and (OS_Screen <> nil)) then + begin + CloseScreen(OS_Screen); + end; +end; + +function SysSetVideoMode(const Mode: TVideoMode): Boolean; +var + dx: integer; + dy: integer; +begin + if ScreenColor <> Mode.Color then + begin + SysDoneVideo; + FPC_VIDEO_FULLSCREEN := not Mode.color; + if not FPC_VIDEO_FULLSCREEN then + begin + LastT := 50; + LastL := 50; + LastW := 80; + LastH := 25; + end; + SysInitVideo; + end else + if not FPC_VIDEO_FULLSCREEN then + begin + dx := (Mode.col * 8) - VideoWindow^.GZZWidth; + dy := (Mode.row * 16) - VideoWindow^.GZZHeight; + SizeWindow(videoWindow, dx, dy); + end; + ScreenWidth := Mode.col; + ScreenHeight := Mode.row; + LastW := Mode.Col; + LastH := Mode.Row; + ScreenColor := Mode.color; + SysSetVideoMode := True; +end; + +var + OldSH, OldSW : longint; + +procedure SysClearScreen; +begin + oldSH := -1; + oldSW := -1; + UpdateScreen(True); +end; + +procedure DrawChar(rp: PRastPort; x, y: LongInt; crType: Word); +var + TmpCharData: Word; + TmpChar: Byte; + TmpFGColor: Byte; + TmpBGColor: Byte; + sX, sY: LongInt; +begin + TmpCharData := VideoBuf^[y * ScreenWidth + x]; + TmpChar := TmpCharData and $0ff; + TmpFGColor := (TmpCharData shr 8) and %00001111; + TmpBGColor := (TmpCharData shr 12) and %00000111; + + sX := x * 8; + sY := y * 16; + + if crType <> crBlock then + begin + SetABPenDrMd(rp, VideoPens[TmpFGColor], VideoPens[tmpBGColor], JAM2); + end else + begin + { in case of block cursor, swap fg/bg colors + and BltTemplate() below will take care of everything } + SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2); + end; + + BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16); + + if crType = crUnderLine then + begin + { draw two lines at the bottom of the char, in case of underline cursor } + agraphics.Move(rp, sX, sY + 14); Draw(rp, sX + 7, sY + 14); + agraphics.Move(rp, sX, sY + 15); Draw(rp, sX + 7, sY + 15); + end; +end; + +procedure SysUpdateScreen(Force: Boolean); +var + BufCounter: Longint; + SmallForce: Boolean; + Counter, CounterX, CounterY: LongInt; + //BufRp: PRastPort; + t: Double; + NumChanged: Integer; +begin + SmallForce := False; + + // override forced update when screen dimensions haven't changed + if Force then + begin + if (OldSH = ScreenHeight) and (OldSW = ScreenWidth) then + Force:=false + else + begin + OldSH := ScreenHeight; + OldSW := ScreenWidth; + end; + end; + + if Force then + begin + SmallForce:=true; + end else + begin + Counter:=0; + while not smallforce and (Counter < (VideoBufSize div 4) - 1) do + begin + SmallForce := (PDWord(VideoBuf)[Counter] <> PDWord(OldVideoBuf)[Counter]); + inc(Counter); + end; + end; + + {$ifdef WITHBUFFERING} + if (VideoWindow^.GZZWidth > BitmapWidth) or (VideoWindow^.GZZHeight > BitmapHeight) then + begin + FreeBitmap(BufRp^.Bitmap); + BufRp^.Bitmap := AllocBitmap(VideoWindow^.GZZWidth, VideoWindow^.GZZHeight, VideoWindow^.RPort^.Bitmap^.Depth, BMF_CLEAR, VideoWindow^.RPort^.Bitmap); + BitmapWidth := VideoWindow^.GZZWidth; + BitmapHeight := VideoWindow^.GZZHeight; + Force := True; + Smallforce := True; + end; + {$endif} + + BufCounter:=0; + NumChanged:=0; + if Smallforce then + begin + //t := now(); + for CounterY := 0 to ScreenHeight - 1 do + begin + for CounterX := 0 to ScreenWidth - 1 do + begin + if (VideoBuf^[BufCounter] <> OldVideoBuf^[BufCounter]) or Force then + begin + {$ifdef WITHBUFFERING} + DrawChar(BufRp, CounterX, CounterY, crHidden); + {$else} + DrawChar(VideoWindow^.RPort, CounterX, CounterY, crHidden); + {$endif} + OldVideoBuf^[BufCounter] := VideoBuf^[BufCounter]; + Inc(NumChanged); + end; + Inc(BufCounter); + end; + end; + //if NumChanged > 100 then + // writeln('redraw time: ', floattoStrF((Now-t)* 24 * 60 * 60 * 1000000 / NumChanged, fffixed, 8,3), ' us/char' ); // ms + end; + + if (CursorType <> OldCursorType) or + (CursorX <> OldCursorX) or (CursorY <> OldCursorY) or + SmallForce then + begin + {$ifdef WITHBUFFERING} + DrawChar(BufRp, OldCursorY, OldCursorX, crHidden); + DrawChar(BufRp, CursorY, CursorX, CursorType); + {$else} + DrawChar(VideoWindow^.RPort, OldCursorY, OldCursorX, crHidden); + DrawChar(VideoWindow^.RPort, CursorY, CursorX, CursorType); + {$endif} + OldCursorX := CursorX; + OldCursorY := CursorY; + OldcursorType := CursorType; + end; + {$ifdef WITHBUFFERING} + BltBitMapRastPort(BufRp^.Bitmap, 0, 0, VideoWindow^.RPort, 0, 0, ScreenWidth * 8, ScreenHeight * 16, $00C0); + {$endif} +end; + + +procedure SysSetCursorPos(NewCursorX, NewCursorY: Word); +begin + CursorX := NewCursorY; + CursorY := NewCursorX; + SysUpdateScreen(False); +end; + +function SysGetCapabilities: Word; +begin + SysGetCapabilities := cpColor or cpChangeCursor; +end; + +function SysGetCursorType: Word; +begin + SysGetCursorType := cursorType; +end; + + +procedure SysSetCursorType(NewType: Word); +begin + cursorType := newType; + { FIXME: halfBlock cursors are not supported for now + by the rendering code } + if CursorType = crHalfBlock then + cursorType := crBlock; + + SysUpdateScreen(False); +end; + + +// Amiga specific calls +procedure GotCloseWindow; +begin + GotCloseWindowMsg := True; +end; + +function HasCloseWindow: Boolean; +begin + HasCloseWindow := GotCloseWindowMsg; + GotCloseWindowMsg := False; +end; + +procedure GotResizeWindow; +begin + GotResizeWindowMsg := True; +end; + +function HasResizeWindow(var WinW: LongInt; var WinH: LongInt): Boolean; +begin + WinW := 0; + WinH := 0; + HasResizeWindow := GotResizeWindowMsg; + if Assigned(VideoWindow) then + begin + //writeln('resize'); + WinW := VideoWindow^.GZZWidth div 8; + WinH := VideoWindow^.GZZHeight div 16; + LastW := WinW; + LastH := WinH; + end; + GotResizeWindowMsg := False; +end; + +function SysGetVideoModeCount: Word; +begin + SysGetVideoModeCount := 2; +end; + +function SysGetVideoModeData(Index: Word; var Mode: TVideoMode): Boolean; +var + Screen: PScreen; +begin + case Index of + 0: begin + Mode.Col := 80; + Mode.Row := 25; + Mode.Color := True; + end; + 1: begin + Screen := LockPubScreen('Workbench'); + Mode.Col := Screen^.Width div 8; + Mode.Row := Screen^.Height div 16; + UnlockPubScreen('Workbench', Screen); + Mode.Color := False; + end; + end; + SysGetVideoModeData := True; +end; + + +const + SysVideoDriver : TVideoDriver = ( + InitDriver : @SysInitVideo; + DoneDriver : @SysDoneVideo; + UpdateScreen : @SysUpdateScreen; + ClearScreen : @SysClearScreen; + SetVideoMode : @SysSetVideoMode; + GetVideoModeCount : @SysGetVideoModeCount; + GetVideoModeData : @SysGetVideoModeData; + SetCursorPos : @SysSetCursorPos; + GetCursorType : @SysGetCursorType; + SetCursorType : @SysSetCursorType; + GetCapabilities : @SysGetCapabilities + ); + + +initialization + SetVideoDriver(SysVideoDriver); + LastT := 50; + LastL := 50; + LastW := 80; + LastH := 25; + {$ifdef WITHBUFFERING} + BufRp := CreateRastPort; + BufRp^.Layer := nil; + BufRp^.Bitmap := nil; + {$endif} +finalization + {$ifdef WITHBUFFERING} + if Assigned(BufRp^.Bitmap) then + FreeBitmap(BufRp^.Bitmap); + FreeRastPort(BufRp); + {$endif} +end. diff --git a/rtl/aros/videodata.inc b/rtl/aros/videodata.inc new file mode 100644 index 0000000000..359585d63f --- /dev/null +++ b/rtl/aros/videodata.inc @@ -0,0 +1,281 @@ + +const + vgacolors : array[0..15,0..2] of byte = ( + ( 0, 0, 0 ), // black + ( 0, 0, 153 ), // blue + ( 0, 153, 0 ), // green + ( 0, 153, 153 ), // cyan + ( 153, 0, 0 ), // red + ( 153, 0, 153 ), // magenta + ( 153, 102, 0 ), // brown + ( 153, 153, 153 ), // lightgray + + ( 102, 102, 102 ), // darkgray + ( 102, 102, 255 ), // lightblue + ( 102, 255, 102 ), // lightgreen + ( 102, 255, 255 ), // lightcyan + ( 255, 102, 102 ), // lightred + ( 255, 102, 255 ), // lightmagenta + ( 255, 255, 102 ), // yellow + ( 255, 255, 255 ) // white + ); + +const + vgafont : array[0..255,0..15] of byte = ( + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $7E, $81, $A5, $81, $81, $A5, $99, $81, $81, $7E, $00, $00, $00, $00 ), + ( $00, $00, $7E, $FF, $DB, $FF, $FF, $DB, $E7, $FF, $FF, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $6C, $FE, $FE, $FE, $FE, $7C, $38, $10, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $7C, $FE, $7C, $38, $10, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $18, $3C, $3C, $E7, $E7, $E7, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $18, $3C, $7E, $FF, $FF, $7E, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $18, $3C, $3C, $18, $00, $00, $00, $00, $00, $00 ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $E7, $C3, $C3, $E7, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $00, $00, $00, $3C, $66, $42, $42, $66, $3C, $00, $00, $00, $00, $00 ), + ( $FF, $FF, $FF, $FF, $FF, $C3, $99, $BD, $BD, $99, $C3, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $1E, $06, $0E, $1A, $78, $CC, $CC, $CC, $CC, $78, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $66, $66, $66, $3C, $18, $7E, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $3F, $33, $3F, $30, $30, $30, $30, $70, $F0, $E0, $00, $00, $00, $00 ), + ( $00, $00, $7F, $63, $7F, $63, $63, $63, $63, $67, $E7, $E6, $C0, $00, $00, $00 ), + ( $00, $00, $00, $18, $18, $DB, $3C, $E7, $3C, $DB, $18, $18, $00, $00, $00, $00 ), + ( $00, $80, $C0, $E0, $F0, $F8, $FE, $F8, $F0, $E0, $C0, $80, $00, $00, $00, $00 ), + ( $00, $02, $06, $0E, $1E, $3E, $FE, $3E, $1E, $0E, $06, $02, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $7E, $3C, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $66, $66, $66, $66, $66, $00, $66, $66, $00, $00, $00, $00 ), + ( $00, $00, $7F, $DB, $DB, $DB, $7B, $1B, $1B, $1B, $1B, $1B, $00, $00, $00, $00 ), + ( $00, $7C, $C6, $60, $38, $6C, $C6, $C6, $6C, $38, $0C, $C6, $7C, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $FE, $FE, $FE, $FE, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $7E, $3C, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $18, $18, $18, $18, $18, $7E, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $18, $0C, $FE, $0C, $18, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $30, $60, $FE, $60, $30, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $C0, $C0, $C0, $FE, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $28, $6C, $FE, $6C, $28, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $38, $7C, $7C, $FE, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $FE, $7C, $7C, $38, $38, $10, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $3C, $3C, $18, $18, $18, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $66, $66, $66, $24, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $6C, $6C, $FE, $6C, $6C, $6C, $FE, $6C, $6C, $00, $00, $00, $00 ), + ( $18, $18, $7C, $C6, $C2, $C0, $7C, $06, $06, $86, $C6, $7C, $18, $18, $00, $00 ), + ( $00, $00, $00, $00, $C2, $C6, $0C, $18, $30, $60, $C6, $86, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $6C, $38, $76, $DC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $30, $30, $30, $60, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $0C, $18, $30, $30, $30, $30, $30, $30, $18, $0C, $00, $00, $00, $00 ), + ( $00, $00, $30, $18, $0C, $0C, $0C, $0C, $0C, $0C, $18, $30, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $66, $3C, $FF, $3C, $66, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $18, $18, $7E, $18, $18, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $18, $18, $18, $30, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $02, $06, $0C, $18, $30, $60, $C0, $80, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $C6, $C6, $D6, $D6, $C6, $C6, $6C, $38, $00, $00, $00, $00 ), + ( $00, $00, $18, $38, $78, $18, $18, $18, $18, $18, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $06, $0C, $18, $30, $60, $C0, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $06, $06, $3C, $06, $06, $06, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $0C, $1C, $3C, $6C, $CC, $FE, $0C, $0C, $0C, $1E, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C0, $C0, $C0, $FC, $06, $06, $06, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $38, $60, $C0, $C0, $FC, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $06, $06, $0C, $18, $30, $30, $30, $30, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $7C, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $7E, $06, $06, $06, $0C, $78, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $00, $00, $18, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $00, $00, $18, $18, $30, $00, $00, $00, $00 ), + ( $00, $00, $00, $06, $0C, $18, $30, $60, $30, $18, $0C, $06, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $00, $00, $7E, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $60, $30, $18, $0C, $06, $0C, $18, $30, $60, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $0C, $18, $18, $18, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $7C, $C6, $C6, $DE, $DE, $DE, $DC, $C0, $7C, $00, $00, $00, $00 ), + ( $00, $00, $10, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $66, $66, $66, $66, $FC, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $C0, $C0, $C2, $66, $3C, $00, $00, $00, $00 ), + ( $00, $00, $F8, $6C, $66, $66, $66, $66, $66, $66, $6C, $F8, $00, $00, $00, $00 ), + ( $00, $00, $FE, $66, $62, $68, $78, $68, $60, $62, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $FE, $66, $62, $68, $78, $68, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $DE, $C6, $C6, $66, $3A, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $FE, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $3C, $18, $18, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $1E, $0C, $0C, $0C, $0C, $0C, $CC, $CC, $CC, $78, $00, $00, $00, $00 ), + ( $00, $00, $E6, $66, $66, $6C, $78, $78, $6C, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $F0, $60, $60, $60, $60, $60, $60, $62, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $C6, $EE, $FE, $FE, $D6, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $C6, $E6, $F6, $FE, $DE, $CE, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $60, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $D6, $DE, $7C, $0C, $0E, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $6C, $66, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $60, $38, $0C, $06, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $7E, $7E, $5A, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $6C, $38, $10, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $D6, $D6, $D6, $FE, $EE, $6C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $6C, $7C, $38, $38, $7C, $6C, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $66, $66, $3C, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $86, $0C, $18, $30, $60, $C2, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $3C, $30, $30, $30, $30, $30, $30, $30, $30, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $80, $C0, $E0, $70, $38, $1C, $0E, $06, $02, $00, $00, $00, $00 ), + ( $00, $00, $3C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $3C, $00, $00, $00, $00 ), + ( $10, $38, $6C, $C6, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00 ), + ( $30, $30, $18, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $E0, $60, $60, $78, $6C, $66, $66, $66, $66, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $C0, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $1C, $0C, $0C, $3C, $6C, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $64, $60, $F0, $60, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $CC, $CC, $CC, $CC, $CC, $7C, $0C, $CC, $78, $00 ), + ( $00, $00, $E0, $60, $60, $6C, $76, $66, $66, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $06, $06, $00, $0E, $06, $06, $06, $06, $06, $06, $66, $66, $3C, $00 ), + ( $00, $00, $E0, $60, $60, $66, $6C, $78, $78, $6C, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $38, $18, $18, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $EC, $FE, $D6, $D6, $D6, $D6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $DC, $66, $66, $66, $66, $66, $66, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $DC, $66, $66, $66, $66, $66, $7C, $60, $60, $F0, $00 ), + ( $00, $00, $00, $00, $00, $76, $CC, $CC, $CC, $CC, $CC, $7C, $0C, $0C, $1E, $00 ), + ( $00, $00, $00, $00, $00, $DC, $76, $66, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $60, $38, $0C, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $10, $30, $30, $FC, $30, $30, $30, $30, $36, $1C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $66, $66, $66, $66, $66, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $C6, $D6, $D6, $D6, $FE, $6C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $6C, $38, $38, $38, $6C, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $7E, $06, $0C, $F8, $00 ), + ( $00, $00, $00, $00, $00, $FE, $CC, $18, $30, $60, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $0E, $18, $18, $18, $70, $18, $18, $18, $18, $0E, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $18, $18, $00, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $70, $18, $18, $18, $0E, $18, $18, $18, $18, $70, $00, $00, $00, $00 ), + ( $00, $00, $76, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $6C, $C6, $C6, $C6, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $C0, $C2, $66, $3C, $0C, $06, $7C, $00, $00 ), + ( $00, $00, $CC, $00, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $0C, $18, $30, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $CC, $00, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $38, $6C, $38, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $3C, $66, $60, $60, $66, $3C, $0C, $06, $3C, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $66, $00, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $18, $3C, $66, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $C6, $00, $10, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $38, $6C, $38, $00, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $18, $30, $60, $00, $FE, $66, $60, $7C, $60, $60, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $CC, $76, $36, $7E, $D8, $D8, $6E, $00, $00, $00, $00 ), + ( $00, $00, $3E, $6C, $CC, $CC, $FE, $CC, $CC, $CC, $CC, $CE, $00, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $30, $78, $CC, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $7E, $06, $0C, $78, $00 ), + ( $00, $C6, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $C6, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $18, $18, $3C, $66, $60, $60, $60, $66, $3C, $18, $18, $00, $00, $00, $00 ), + ( $00, $38, $6C, $64, $60, $F0, $60, $60, $60, $60, $E6, $FC, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $3C, $18, $7E, $18, $7E, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $F8, $CC, $CC, $F8, $C4, $CC, $DE, $CC, $CC, $CC, $C6, $00, $00, $00, $00 ), + ( $00, $0E, $1B, $18, $18, $18, $7E, $18, $18, $18, $18, $18, $D8, $70, $00, $00 ), + ( $00, $18, $30, $60, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $0C, $18, $30, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $18, $30, $60, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $18, $30, $60, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $76, $DC, $00, $DC, $66, $66, $66, $66, $66, $66, $00, $00, $00, $00 ), + ( $76, $DC, $00, $C6, $E6, $F6, $FE, $DE, $CE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $3C, $6C, $6C, $3E, $00, $7E, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $38, $6C, $6C, $38, $00, $7C, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $30, $30, $00, $30, $30, $60, $C0, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $FE, $C0, $C0, $C0, $C0, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $FE, $06, $06, $06, $06, $00, $00, $00, $00, $00 ), + ( $00, $C0, $C0, $C2, $C6, $CC, $18, $30, $60, $DC, $86, $0C, $18, $3E, $00, $00 ), + ( $00, $C0, $C0, $C2, $C6, $CC, $18, $30, $66, $CE, $9E, $3E, $06, $06, $00, $00 ), + ( $00, $00, $18, $18, $00, $18, $18, $18, $3C, $3C, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $36, $6C, $D8, $6C, $36, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $D8, $6C, $36, $6C, $D8, $00, $00, $00, $00, $00, $00 ), + ( $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44 ), + ( $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA ), + ( $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77 ), + ( $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $F8, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $36, $36, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $00, $00, $FE, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $F8, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $F6, $06, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $FE, $06, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $F6, $06, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $36, $36, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $F8, $18, $F8, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $1F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $18, $18, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $18, $18, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $1F, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $36, $36, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $37, $30, $3F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $3F, $30, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $F7, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $FF, $00, $F7, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $37, $30, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $F7, $00, $F7, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $18, $18, $18, $18, $18, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $36, $36, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $FF, $00, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $3F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $1F, $18, $1F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $1F, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $3F, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $FF, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $18, $18, $18, $18, $18, $FF, $18, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $F8, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0 ), + ( $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $DC, $D8, $D8, $D8, $DC, $76, $00, $00, $00, $00 ), + ( $00, $00, $78, $CC, $CC, $CC, $D8, $CC, $C6, $C6, $C6, $CC, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $C6, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $00, $00, $00, $00 ), + ( $00, $00, $00, $FE, $C6, $60, $30, $18, $30, $60, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $D8, $D8, $D8, $D8, $D8, $70, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $66, $66, $66, $66, $66, $7C, $60, $60, $C0, $00, $00, $00 ), + ( $00, $00, $00, $00, $76, $DC, $18, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $7E, $18, $3C, $66, $66, $66, $3C, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $38, $6C, $C6, $C6, $FE, $C6, $C6, $6C, $38, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $C6, $C6, $C6, $6C, $6C, $6C, $6C, $EE, $00, $00, $00, $00 ), + ( $00, $00, $1E, $30, $18, $0C, $3E, $66, $66, $66, $66, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $DB, $DB, $DB, $7E, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $03, $06, $7E, $DB, $DB, $F3, $7E, $60, $C0, $00, $00, $00, $00 ), + ( $00, $00, $1C, $30, $60, $60, $7C, $60, $60, $60, $30, $1C, $00, $00, $00, $00 ), + ( $00, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $00, $00, $FE, $00, $00, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $7E, $18, $18, $00, $00, $FF, $00, $00, $00, $00 ), + ( $00, $00, $00, $30, $18, $0C, $06, $0C, $18, $30, $00, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $0C, $18, $30, $60, $30, $18, $0C, $00, $7E, $00, $00, $00, $00 ), + ( $00, $00, $0E, $1B, $1B, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $18, $D8, $D8, $D8, $70, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $7E, $00, $18, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $DC, $00, $76, $DC, $00, $00, $00, $00, $00, $00 ), + ( $00, $38, $6C, $6C, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $18, $18, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $18, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $0F, $0C, $0C, $0C, $0C, $0C, $EC, $6C, $6C, $3C, $1C, $00, $00, $00, $00 ), + ( $00, $D8, $6C, $6C, $6C, $6C, $6C, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $70, $D8, $30, $60, $C8, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $7C, $7C, $7C, $7C, $7C, $7C, $7C, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ) + ); |