DEFINITION MODULE IFFParseL {"iffparse.library",36};
(* 16-Apr-1992/cn *)

FROM SYSTEM IMPORT ADDRESS;

FROM UtilityD IMPORT HookPtr;

IMPORT
 d:IFFParseD,R,ExecD;

VAR
 iffparseVersion:INTEGER;
 iffparseBase:ExecD.LibraryPtr;

CONST
 iffparseMinVersion=36;
 iffparseName="iffparse.library";

PROCEDURE AllocIFF():d.IFFHandlePtr; CODE -30;

PROCEDURE AllocLocalItem(
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT;
           ident{R.D2}:LONGINT;
           dataSize{R.D3}:LONGINT):d.LocalContextItemPtr; CODE -186;

PROCEDURE CloseClipboard(
           clipboard{R.A0}:d.ClipboardHandlePtr); CODE -252;

PROCEDURE CloseIFF(iff{R.A0}:d.IFFHandlePtr); CODE -48;

PROCEDURE CollectionChunk(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):LONGINT; CODE -138;

PROCEDURE CollectionChunks(
           iff{R.A0}:d.IFFHandlePtr;
           propArray{R.A1}:ADDRESS;
           nProps{R.D0}:LONGINT):LONGINT; CODE -144;

PROCEDURE CurrentChunk(
           iff{R.A0}:d.IFFHandlePtr):d.ContextNodePtr; CODE -174;

PROCEDURE EntryHandler(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT;
           position{R.D2}:LONGINT;
           handler{R.A1}:HookPtr;
           object{R.A2}:ADDRESS):LONGINT; CODE -102;

PROCEDURE ExitHandler(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT;
           position{R.D2}:LONGINT;
           handler{R.A1}:HookPtr;
           object{R.A2}:ADDRESS):LONGINT; CODE -108;

PROCEDURE FindCollection(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):d.CollectionItemPtr; CODE -162;

PROCEDURE FindLocalItem(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT;
           ident{R.D2}:LONGINT):d.LocalContextItemPtr; CODE -210;

PROCEDURE FindProp(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):d.StoredPropertyPtr; CODE -156;

PROCEDURE FindPropContext(
           iff{R.A0}:d.IFFHandlePtr):d.ContextNodePtr; CODE -168;

PROCEDURE FreeIFF(iff{R.A0}:d.IFFHandlePtr); CODE -54;

PROCEDURE FreeLocalItem(
           localItem{R.A0}:d.LocalContextItemPtr); CODE -204;

PROCEDURE GoodID(id{R.D0}:LONGINT):BOOLEAN; CODE -258;

PROCEDURE GoodType(type{R.D0}:LONGINT):BOOLEAN; CODE -264;

PROCEDURE IDtoStr(
           id{R.D0}:LONGINT;
           buf{R.A0}:ADDRESS):ADDRESS; CODE -270;

PROCEDURE InitIFF(
           iff{R.A0}:d.IFFHandlePtr;
           flags{R.D0}:d.IFFFlagSet;
           streamHook{R.A1}:HookPtr); CODE -228;

PROCEDURE InitIFFasClip(iff{R.A0}:d.IFFHandlePtr); CODE -240;

PROCEDURE InitIFFasDOS(iff{R.A0}:d.IFFHandlePtr); CODE -234;

PROCEDURE LocalItemData(
           localItem{R.A0}:d.LocalContextItemPtr):ADDRESS; CODE -192;

PROCEDURE OpenClipboard(
           unitNum{R.D0}:LONGINT):d.ClipboardHandlePtr; CODE -246;

PROCEDURE OpenIFF(
           iff{R.A0}:d.IFFHandlePtr;
           rwMode{R.D0}:d.IFFFlagSet):LONGINT; CODE -36;

PROCEDURE ParentChunk(
           ctxNode{R.A0}:d.ContextNodePtr):d.ContextNodePtr; CODE -180;

PROCEDURE ParseIFF(
           iff{R.A0}:d.IFFHandlePtr;
           control{R.D0}:LONGINT):LONGINT; CODE -42;

PROCEDURE PopChunk(iff{R.A0}:d.IFFHandlePtr):LONGINT; CODE -90;

PROCEDURE PropChunk(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):LONGINT; CODE -114;

PROCEDURE PropChunks(
           iff{R.A0}:d.IFFHandlePtr;
           propArray{R.A1}:ADDRESS;
           nProps{R.D0}:LONGINT):LONGINT; CODE -120;

PROCEDURE PushChunk(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT;
           size{R.D2}:LONGINT):LONGINT; CODE -84;

PROCEDURE ReadChunkBytes(
           iff{R.A0}:d.IFFHandlePtr;
           buf{R.A1}:ADDRESS;
           size{R.D0}:LONGINT):LONGINT; CODE -60;

PROCEDURE ReadChunkRecords(
           iff{R.A0}:d.IFFHandlePtr;
           buf{R.A1}:ADDRESS;
           bytesPerRecord{R.D0}:LONGINT;
           nRecords{R.D1}:LONGINT):LONGINT; CODE -72;

PROCEDURE SetLocalItemPurge(
           localItem{R.A0}:d.LocalContextItemPtr;
           purgeHook{R.A1}:HookPtr); CODE -198;

PROCEDURE StopChunk(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):LONGINT; CODE -126;

PROCEDURE StopChunks(
           iff{R.A0}:d.IFFHandlePtr;
           propArray{R.A1}:ADDRESS;
           nProps{R.D0}:LONGINT):LONGINT; CODE -132;

PROCEDURE StopOnExit(
           iff{R.A0}:d.IFFHandlePtr;
           type{R.D0}:LONGINT;
           id{R.D1}:LONGINT):LONGINT; CODE -150;

PROCEDURE StoreItemInContext(
           iff{R.A0}:d.IFFHandlePtr;
           localItem{R.A1}:d.LocalContextItemPtr;
           contextNode{R.A2}:d.ContextNodePtr); CODE -222;

PROCEDURE StoreLocalItem(
           iff{R.A0}:d.IFFHandlePtr;
           localItem{R.A1}:d.LocalContextItemPtr;
           position{R.D0}:LONGINT):LONGINT; CODE -216;

PROCEDURE WriteChunkBytes(
           iff{R.A0}:d.IFFHandlePtr;
           buf{R.A1}:ADDRESS;
           size{R.D0}:LONGINT):LONGINT; CODE -66;

PROCEDURE WriteChunkRecords(
           iff{R.A0}:d.IFFHandlePtr;
           buf{R.A1}:ADDRESS;
           bytesPerRecord{R.D0}:LONGINT;
           nRecords{R.D1}:LONGINT):LONGINT; CODE -78;

END IFFParseL.lib36
