Jump to content

Aros/Developer/Docs/Libraries/IFFParse

From Wikibooks, open books for an open world
Navbar for the Aros wikibook
Aros User
Aros User Docs
Aros User FAQs
Aros User Applications
Aros User DOS Shell
Aros/User/AmigaLegacy
Aros Dev Docs
Aros Developer Docs
Porting Software from AmigaOS/SDL
For Zune Beginners
Zune .MUI Classes
For SDL Beginners
Aros Developer BuildSystem
Specific platforms
Aros x86 Complete System HCL
Aros x86 Audio/Video Support
Aros x86 Network Support
Aros Intel AMD x86 Installing
Aros Storage Support IDE SATA etc
Aros Poseidon USB Support
x86-64 Support
Motorola 68k Amiga Support
Linux and FreeBSD Support
Windows Mingw and MacOSX Support
Android Support
Arm Raspberry Pi Support
PPC Power Architecture
misc
Aros Public License

Introduction

[edit | edit source]

Datatypes have largely replaced the EA / Commodore era inspired IFF file formats.

IBM has an entry about IFF file format.

only some few times its called blocklen 128 bytes 1.

Something FRead-ing pointers/IFF-offsets one at a time, then FRead-ing the following block of data? (Disk blocks numbers and file entries?)

Especially IFF:

  • Read FORM (LONG)
  • Read length (LONG)
  • Read type (LONG)
  • Read block-length (LONG)
  • Read block content (an even number of bytes)

References

[edit | edit source]
struct IFFHandle *AllocIFF() ()

LONG OpenIFF(struct IFFHandle *iff, LONG rwMode) 
LONG ParseIFF(struct IFFHandle *iff, LONG mode) 
void CloseIFF(struct IFFHandle *iff) 
void FreeIFF(struct IFFHandle *iff)

LONG ReadChunkBytes(struct IFFHandle *iff, APTR buf, LONG numBytes) (A0, A1, D0)
LONG WriteChunkBytes(struct IFFHandle *iff, APTR buf, LONG numBytes) (A0, A1, D0)
LONG ReadChunkRecords(struct IFFHandle *iff, APTR buf, LONG bytesPerRecord, LONG numRecords) (A0, A1, D0, D1)
LONG WriteChunkRecords(struct IFFHandle *iff, APTR buf, LONG bytesPerRecord, LONG numRecords) (A0, A1, D0, D1)
LONG PushChunk(struct IFFHandle *iff, LONG type, LONG id, LONG size) (A0, D0, D1, D2)
LONG PopChunk(struct IFFHandle *iff) (A0)

LONG EntryHandler(struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object) (A0, D0, D1, D2, A1, A2)
LONG ExitHandler(struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object) (A0, D0, D1, D2, A1, A2)

LONG PropChunk(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)
LONG PropChunks(struct IFFHandle *iff, LONG *propArray, LONG numPairs) (A0, A1, D0)
LONG StopChunk(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)
LONG StopChunks(struct IFFHandle *iff, LONG *propArray, LONG numPairs) (A0, A1, D0)
LONG CollectionChunk(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)
LONG CollectionChunks(struct IFFHandle *iff, LONG *propArray, LONG numPairs) (A0, A1, D0)
struct CollectionItem *FindCollection(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)

LONG StopOnExit(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)
struct StoredProperty *FindProp(struct IFFHandle *iff, LONG type, LONG id) (A0, D0, D1)

struct ContextNode *FindPropContext(struct IFFHandle *iff) (A0)
struct ContextNode *CurrentChunk(struct IFFHandle *iff) (A0)
struct ContextNode *ParentChunk(struct ContextNode *contextNode) (A0)
struct LocalContextItem *AllocLocalItem(LONG type, LONG id, LONG ident, ULONG dataSize) (D0, D1, D2, D3)

APTR LocalItemData(struct LocalContextItem *localItem) (A0)
void SetLocalItemPurge(struct LocalContextItem *localItem, struct Hook *purgeHook) (A0, A1)
void FreeLocalItem(struct LocalContextItem *localItem) (A0)
struct LocalContextItem *FindLocalItem(struct IFFHandle *iff, LONG type, LONG id, LONG ident) (A0, D0, D1, D2)
LONG StoreLocalItem(struct IFFHandle *iff, struct LocalContextItem *localItem, LONG position) (A0, A1, D0)

void StoreItemInContext(struct IFFHandle *iff, struct LocalContextItem *localItem, struct ContextNode *contextNode) (A0, A1, A2)
void InitIFF(struct IFFHandle *iff, LONG flags, struct Hook *streamHook) (A0, D0, A1)
void InitIFFasDOS(struct IFFHandle *iff) (A0)
void InitIFFasClip(struct IFFHandle *iff) (A0)

struct ClipboardHandle *OpenClipboard(LONG unitNumber) (D0)
void CloseClipboard(struct ClipboardHandle *clipHandle) (A0)

LONG GoodID(LONG id) (D0)
LONG GoodType(LONG type) (D0)
STRPTR IDtoStr(LONG id, STRPTR buf) (D0, A0)