1{ 2 This file is part of the Free Pascal run time library. 3 4 utility functions (V50) for MorphOS/PowerPC 5 Copyright (c) 2002 The MorphOS Development Team, All Rights Reserved. 6 7 Free Pascal conversion 8 Copyright (c) 2004-2014 Karoly Balogh 9 10 See the file COPYING.FPC, included in this distribution, 11 for details about the copyright. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 17 **********************************************************************} 18 19 20function FindTagItem(tagVal : Cardinal location 'd0'; 21 tagList: PTagItem location 'a0'): PTagItem; 22SysCall MOS_UtilityBase 030; 23 24function GetTagData(tagValue : Cardinal location 'd0'; 25 defaultVal: Cardinal location 'd1'; 26 tagList : PTagItem location 'a0'): Cardinal; 27SysCall MOS_UtilityBase 036; 28 29function PackBoolTags(initialFlags: Cardinal location 'd0'; 30 tagList : PTagItem location 'a0'; 31 boolMap : PTagItem location 'a1'): Cardinal; 32SysCall MOS_UtilityBase 042; 33 34function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; 35SysCall MOS_UtilityBase 048; 36 37procedure FilterTagChanges(changeList : PTagItem location 'a0'; 38 originalList: PTagItem location 'a1'; 39 apply : Cardinal location 'd0'); 40SysCall MOS_UtilityBase 054; 41 42procedure MapTags(tagList: PTagItem location 'a0'; 43 mapList: PTagItem location 'a1'; 44 mapType: Cardinal location 'd0'); 45SysCall MOS_UtilityBase 060; 46 47function AllocateTagItems(numTags: Cardinal location 'd0'): PTagItem; 48SysCall MOS_UtilityBase 066; 49 50function CloneTagItems(tagList: PTagItem location 'a0'): PTagItem; 51SysCall MOS_UtilityBase 072; 52 53procedure FreeTagItems(tagList: PTagItem location 'a0'); 54SysCall MOS_UtilityBase 078; 55 56procedure RefreshTagItemClones(clone : PTagItem location 'a0'; 57 original: PTagItem location 'a1'); 58SysCall MOS_UtilityBase 084; 59 60function TagInArray(tagValue : Cardinal location 'd0'; 61 var tagArray: Cardinal location 'a0'): LongBool; 62SysCall MOS_UtilityBase 090; 63 64function FilterTagItems(tagList : PTagItem location 'a0'; 65 var filterArray: Cardinal location 'a1'; 66 logic : Cardinal location 'd0'): Cardinal; 67SysCall MOS_UtilityBase 096; 68 69function CallHookPkt(hook : PHook location 'a0'; 70 hobject : Pointer location 'a2'; 71 paramPacket: Pointer location 'a1'): Cardinal; 72SysCall MOS_UtilityBase 102; 73 74procedure Amiga2Date(seconds: Cardinal location 'd0'; 75 result : PClockData location 'a0'); 76SysCall MOS_UtilityBase 120; 77 78function Date2Amiga(date: PClockData location 'a0'): Cardinal; 79SysCall MOS_UtilityBase 126; 80 81function CheckDate(date: PClockData location 'a0'): Cardinal; 82SysCall MOS_UtilityBase 132; 83 84function SMult32(arg1: LongInt location 'd0'; 85 arg2: LongInt location 'd1'): LongInt; 86SysCall MOS_UtilityBase 138; 87 88function UMult32(arg1: Cardinal location 'd0'; 89 arg2: Cardinal location 'd1'): Cardinal; 90SysCall MOS_UtilityBase 144; 91 92function SDivMod32(dividend: LongInt location 'd0'; 93 divisor: LongInt location 'd1'): LongInt; 94SysCall MOS_UtilityBase 150; 95 96function UDivMod32(dividend: Cardinal location 'd0'; 97 divisor : Cardinal location 'd1'): Cardinal; 98SysCall MOS_UtilityBase 156; 99 100function Stricmp(string1: PChar location 'a0'; 101 string2: PChar location 'a1'): LongInt; 102SysCall MOS_UtilityBase 162; 103 104function Strnicmp(string1: PChar location 'a0'; 105 string2: PChar location 'a1'; 106 length : LongInt location 'd0'): LongInt; 107SysCall MOS_UtilityBase 168; 108 109function ToUpper(character: Cardinal location 'd0'): Char; 110SysCall MOS_UtilityBase 174; 111 112function ToLower(character: Cardinal location 'd0'): Char; 113SysCall MOS_UtilityBase 180; 114 115procedure ApplyTagChanges(list : PTagItem location 'a0'; 116 changeList: PTagItem location 'a1'); 117SysCall MOS_UtilityBase 186; 118 119function SMult64(arg1: LongInt location 'd0'; 120 arg2: LongInt location 'd1'): LongInt; 121SysCall MOS_UtilityBase 198; 122 123function UMult64(arg1: Cardinal location 'd0'; 124 arg2: Cardinal location 'd1'): Cardinal; 125SysCall MOS_UtilityBase 204; 126 127function PackStructureTags(pack : Pointer location 'a0'; 128 var packTable: Cardinal location 'a1'; 129 tagList : PTagItem location 'a2'): Cardinal; 130SysCall MOS_UtilityBase 210; 131 132function UnpackStructureTags(pack : Pointer location 'a0'; 133 var packTable: Cardinal location 'a1'; 134 tagList : PTagItem location 'a2'): Cardinal; 135SysCall MOS_UtilityBase 216; 136 137function AddNamedObject(nameSpace: PNamedObject location 'a0'; 138 nobject : PNamedObject location 'a1'): LongBool; 139SysCall MOS_UtilityBase 222; 140 141function AllocNamedObjectA(name : PChar location 'a0'; 142 tagList: PTagItem location 'a1'): PNamedObject; 143SysCall MOS_UtilityBase 228; 144 145function AttemptRemNamedObject(nobject: PNamedObject location 'a0'): LongInt; 146SysCall MOS_UtilityBase 234; 147 148function FindNamedObject(nameSpace : PNamedObject location 'a0'; 149 name : PChar location 'a1'; 150 lastObject: PNamedObject location 'a2'): PNamedObject; 151SysCall MOS_UtilityBase 240; 152 153procedure FreeNamedObject(nobject: PNamedObject location 'a0'); 154SysCall MOS_UtilityBase 246; 155 156function NamedObjectName(nobject: PNamedObject location 'a0'): PChar; 157SysCall MOS_UtilityBase 252; 158 159procedure ReleaseNamedObject(nobject: pNamedObject location 'a0'); 160SysCall MOS_UtilityBase 258; 161 162procedure RemNamedObject(nobject: PNamedObject location 'a0'; 163 message: PMessage location 'a1'); 164SysCall MOS_UtilityBase 264; 165 166function GetUniqueID: Cardinal; 167SysCall MOS_UtilityBase 270; 168 169