clt
NIFFIO chunk length table routines.
.
Return a new, empty NIFFIOChunkLengthTable, or null on failure.
NIFFIOChunkLengthTable *
NIFFIOCLTNew()
Free the memory allocated to a chunk length table.
void
NIFFIOCLTDelete(NIFFIOChunkLengthTable *pclt)
Make an entry into a chunk length table.
RIFFIOSuccess
NIFFIOCLTMakeEntry(NIFFIOChunkLengthTable *pclt,
niffChklentabEntry cltEntry)
T <cltEntry> is filled with the values for the new entry
- T <cltEntry> is added to <*pclt>
- If an existing entry in <*pclt> matches <cltEntry> then
the entry's value is replaced.
.
Fill a chunk length table with ``canned'' entries.
RIFFIOSuccess
NIFFIOCLTMakeDefaultEntries(NIFFIOChunkLengthTable *pclt)
This routine is useful if you don't need a custom chunk length
table. It fills an existing chunk length table with a complete set
of chunk length entries for each chunk in the NIFF specification.
TWB - Should this include INFO chunks? probably.
Lookup a chunk length given an FOURCC.
RIFFIOSuccess
NIFFIOCLTLookup(NIFFIOChunkLengthTable *pclt, niffChklentabEntry *cltEntryp)
T <cltEntryp->chunkName> contains the FOURCC to look up in <*pclt>.
Fills in <cltEntryp->offsetOfFirstTag> according to <*pclt>.
-
*RIFFIO_OK
-
if <cltEntryp->chunkName> was found.
-
*RIFFIO_FAIL
-
otherwise
.
Return the number of entries in a chunk length table
unsigned
NIFFIOCLTCount(NIFFIOChunkLengthTable *pclt)
Compare FOURCCs alphabetically.
int
NIFFIOCompareFOURCC(FOURCC fccA, FOURCC fccB)
- <0 if a comes before b
- 0 if a is the same as b
- >0 if a comes after b
The return results are compatible with bsearch().and strcmp() in the Standard C library.