DEFINITION MODULE OptUtilityL{"utility.library",-36};
(* 30-May-1993/bp *)

FROM SYSTEM IMPORT ADDRESS,LONGSET;

IMPORT
 d:UtilityD,ExecD,R;

VAR
 utilityVersion:INTEGER;
 utilityBase:ExecD.LibraryPtr;

CONST
 utilityMinVersion=36;
 utilityName="utility.library";

PROCEDURE(*39*) AddNamedObject(
                 namespace{R.A0}:d.NamedObjectPtr;
                 object{R.A1}:d.NamedObjectPtr
                 ):BOOLEAN; CODE -222;

PROCEDURE AllocateTagItems(
           numItems{R.D0}:LONGCARD):d.TagItemPtr; CODE -66;

PROCEDURE(*39*) AllocNamedObjectA(
                 name{R.A0}:ADDRESS;
                 tags{R.A1}:ADDRESS
                 ):d.NamedObjectPtr; CODE -228;

PROCEDURE Amiga2Date(
           amigaTime{R.D0}:LONGCARD;
           VAR date{R.A0}:d.ClockData); CODE -120;

PROCEDURE(*39*) ApplyTagChanges(
                 list{R.A0}:ADDRESS;
                 changeList{R.A1}:ADDRESS
                 ); CODE -186;

PROCEDURE(*39*) AttemptRemNamedObject(
                 object{R.A0}:d.NamedObjectPtr
                 ):LONGINT; CODE -234;

PROCEDURE CallHookPkt(
           hook{R.A0}:d.HookPtr;
           object{R.A2},paramPacket{R.A1}:ADDRESS):LONGCARD; CODE -102;

PROCEDURE CheckDate(VAR date{R.A0}:d.ClockData):LONGCARD; CODE -132;

PROCEDURE CloneTagItems(
           tagList{R.A0}:d.TagItemPtr):d.TagItemPtr; CODE -72;

PROCEDURE Date2Amiga(VAR date{R.A0}:d.ClockData):LONGCARD; CODE -126;

PROCEDURE FilterTagChanges(
           newTagList{R.A0},oldTagList{R.A1}:d.TagItemPtr;
           apply{R.D0}:BOOLEAN); CODE -54;

PROCEDURE FilterTagItems(
           tagList{R.A0}:d.TagItemPtr;
           filterArray{R.A1}:d.TagPtr;
           logic{R.D0}:LONGINT):LONGCARD; CODE -96;

PROCEDURE(*39*) FindNamedObject(
                 namespace{R.A0}:d.NamedObjectPtr;
                 name{R.A1}:ADDRESS;
                 lastobject{R.A2}:d.NamedObjectPtr
                 ):d.NamedObjectPtr; CODE -240;

PROCEDURE FindTagItem(
           tagVal{R.D0}:d.Tag;
           tagList{R.A0}:d.TagItemPtr):d.TagItemPtr; CODE -30;

PROCEDURE(*39*) FreeNamedObject(
                 object{R.A0}:ADDRESS
                 ); CODE -246;

PROCEDURE FreeTagItems(tagList{R.A0}:d.TagItemPtr); CODE -78;

PROCEDURE GetTagData(
           tagVal{R.D0}:d.Tag;
           defaultVal{R.D1}:LONGCARD;
           tagList{R.A0}:d.TagItemPtr):LONGCARD; CODE -36;

PROCEDURE(*39*) GetUniqueID(
                 ):LONGCARD; CODE -270;

PROCEDURE MapTags(
           tagList{R.A0},mapList{R.A1}:d.TagItemPtr;
           includeMiss{R.D0}:LONGCARD); CODE -60;

PROCEDURE(*39*) NamedObjectName(
                 object{R.A0}:d.NamedObjectPtr
                 ):ADDRESS; CODE -252;

PROCEDURE NextTagItem(
           VAR tagListPtr{R.A0}:d.TagItemPtr):d.TagItemPtr; CODE -48;

PROCEDURE PackBoolTags(
           initialFlags{R.D0}:LONGSET;
           tagList{R.A0}:d.TagItemPtr;
           boolMap{R.A1}:d.TagItemPtr):LONGSET; CODE -42;

PROCEDURE RefreshTagItemClones(
           cloneList{R.A0},origList{R.A1}:d.TagItemPtr); CODE -84;

PROCEDURE(*39*) ReleaseNamedObject(
                 object{R.A0}:d.NamedObjectPtr
                 ); CODE -258;

PROCEDURE(*39*) RemNamedObject(
                 object{R.A0}:d.NamedObjectPtr;
                 message{R.A1}:ExecD.MessagePtr
                 ); CODE -264;

PROCEDURE(*39*) PackStructureTags(
                 pack{R.A0}:ADDRESS;
                 packtable{R.A1}:ADDRESS;
                 tagList{R.A2}:ADDRESS
                 ):LONGCARD; CODE -210;

PROCEDURE SDivMod32(
           dividend{R.D0},divisor{R.D1}:LONGINT):LONGINT; CODE -150;

PROCEDURE SMult32(
           factor1{R.D0},factor2{R.D1}:LONGINT):LONGINT; CODE -138;

PROCEDURE(*39*) SMult64( (* Resultat in D0:D1!! *)
                 arg1{R.D0}:LONGINT;
                 arg2{R.D1}:LONGINT
                 ):LONGINT; CODE -198;

PROCEDURE(*37*) Stricmp(
                 string1{R.A0}:ADDRESS;
                 string2{R.A1}:ADDRESS):LONGINT; CODE -162;

PROCEDURE(*37*) Strnicmp(
                 string1{R.A0}:ADDRESS;
                 string2{R.A1}:ADDRESS;
                 length{R.D0}:LONGINT):LONGINT; CODE -168;

PROCEDURE TagInArray(
           tagVal{R.D0}:d.Tag;
           tagArray{R.A0}:d.TagPtr):BOOLEAN; CODE -90;

PROCEDURE(*37*) ToLower(character{R.D0}:CHAR):CHAR; CODE -180;

PROCEDURE(*37*) ToUpper(character{R.D0}:CHAR):CHAR; CODE -174;

PROCEDURE UDivMod32(
           dividend{R.D0},divisor{R.D1}:LONGCARD):LONGCARD; CODE -156;

PROCEDURE UMult32(
           factor1{R.D0},factor2{R.D1}:LONGCARD):LONGCARD; CODE -144;

PROCEDURE(*39*) UMult64( (* Resultat in D0:D1!! *)
                 arg1{R.D0}:LONGCARD;
                 arg2{R.D1}:LONGCARD
                 ):LONGCARD; CODE -204;

PROCEDURE(*39*) UnpackStructureTags(
                 pack{R.A0}:ADDRESS;
                 packtable{R.A1}:ADDRESS;
                 tagList{R.A2}:ADDRESS
                 ):LONGCARD; CODE -216;

END OptUtilityL.lib-36
