home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / os2 / hpgl312.zip / IFF.H < prev    next >
C/C++ Source or Header  |  1993-04-18  |  20KB  |  481 lines

  1. #ifndef IFF_H
  2. #define IFF_H
  3. /*----------------------------------------------------------------------*/
  4. /* IFF.H  defs for IFF-85 Interchange Format Files.            1/22/86 */
  5. /*                                    */
  6. /* By Jerry Morrison and Steve Shaw, Electronic Arts.            */
  7. /* This software is in the public domain.                */
  8. /*----------------------------------------------------------------------*/
  9.  
  10. /*
  11. #ifndef COMPILER_H
  12. #include "iff/compiler.h"
  13. #endif
  14.  
  15. #ifndef LIBRARIES_DOS_H
  16. #include "libraries/dos.h"
  17. #endif
  18. */
  19.  
  20. #ifndef OFFSET_BEGINNING
  21. #define OFFSET_BEGINNING OFFSET_BEGINING
  22. #endif
  23.  
  24. typedef LONG IFFP;    /* Status code result from an IFF procedure */
  25.     /* LONG, because must be type compatable with ID for GetChunkHdr.*/
  26.     /* Note that the error codes below are not legal IDs.*/
  27. #define IFF_OKAY   0L    /* Keep going...*/
  28. #define END_MARK  -1L    /* As if there was a chunk at end of group.*/
  29. #define IFF_DONE  -2L    /* clientProc returns this when it has READ enough.
  30.              * It means return thru all levels. File is Okay.*/
  31. #define DOS_ERROR -3L
  32. #define NOT_IFF   -4L    /* not an IFF file.*/
  33. #define NO_FILE   -5L    /* Tried to open file, DOS didn't find it.*/
  34. #define CLIENT_ERROR -6L /* Client made invalid request, for instance, write
  35.              * a negative size chunk.*/
  36. #define BAD_FORM  -7L    /* A client read proc complains about FORM semantics;
  37.              * e.g. valid IFF, but missing a required chunk.*/
  38. #define SHORT_CHUNK -8L    /* Client asked to IFFReadBytes more bytes than left
  39.              * in the chunk. Could be client bug or bad form.*/
  40. #define BAD_IFF   -9L    /* mal-formed IFF file. [TBD] Expand this into a
  41.              * range of error codes.*/
  42. #define LAST_ERROR BAD_IFF
  43.  
  44. /* This MACRO is used to RETURN immediately when a termination condition is
  45.  * found. This is a pretty weird macro. It requires the caller to declare a
  46.  * local "IFFP iffp" and assign it. This wouldn't work as a subroutine since
  47.  * it returns for it's caller. */
  48. #define CheckIFFP()   { if (iffp != IFF_OKAY) return(iffp); }
  49.  
  50.  
  51. /* ---------- ID -------------------------------------------------------*/
  52.  
  53. typedef LONG ID;    /* An ID is four printable ASCII chars but
  54.              * stored as a LONG for efficient copy & compare.*/
  55.  
  56. /* Four-character IDentifier builder.*/
  57. #define MakeID(a,b,c,d)  ( (LONG)(a)<<24L | (LONG)(b)<<16L | (c)<<8 | (d) )
  58.  
  59. /* Standard group IDs.  A chunk with one of these IDs contains a
  60.    SubTypeID followed by zero or more chunks.*/
  61. #define FORM MakeID('F','O','R','M')
  62. #define PROP MakeID('P','R','O','P')
  63. #define LIST MakeID('L','I','S','T')
  64. #define CAT  MakeID('C','A','T',' ')
  65. #define FILLER MakeID(' ',' ',' ',' ')
  66. /* The IDs "FOR1".."FOR9", "LIS1".."LIS9", & "CAT1".."CAT9" are reserved
  67.  * for future standardization.*/
  68.  
  69. /* Pseudo-ID used internally by chunk reader and writer.*/
  70. #define NULL_CHUNK 0L           /* No current chunk.*/
  71.  
  72.  
  73. /* ---------- Chunk ----------------------------------------------------*/
  74.  
  75. /* All chunks start with a type ID and a count of the data bytes that
  76.    follow--the chunk's "logicl size" or "data size". If that number is odd,
  77.    a 0 pad byte is written, too. */
  78. typedef struct {
  79.     ID      ckID;
  80.     LONG  ckSize;
  81.     } ChunkHeader;
  82.  
  83. typedef struct {
  84.     ID      ckID;
  85.     LONG  ckSize;
  86.     UBYTE ckData[ 1 /*REALLY: ckSize*/ ];
  87.     } Chunk;
  88.  
  89. /* Pass ckSize = szNotYetKnown to the writer to mean "compute the size".*/
  90. #define szNotYetKnown 0x80000001L
  91.  
  92. /* Need to know whether a value is odd so can word-align.*/
  93. #define IS_ODD(a)   ((a) & 1)
  94.  
  95. /* This macro rounds up to an even number. */
  96. #define WordAlign(size)   ((size+1)&~1)
  97.  
  98. /* ALL CHUNKS MUST BE PADDED TO EVEN NUMBER OF BYTES.
  99.  * ChunkPSize computes the total "physical size" of a padded chunk from
  100.  * its "data size" or "logical size". */
  101. #define ChunkPSize(dataSize)  (WordAlign(dataSize) + sizeof(ChunkHeader))
  102.  
  103. /* The Grouping chunks (LIST, FORM, PROP, & CAT) contain concatenations of
  104.  * chunks after a subtype ID that identifies the content chunks.
  105.  * "FORM type XXXX", "LIST of FORM type XXXX", "PROPerties associated
  106.  * with FORM type XXXX", or "conCATenation of XXXX".*/
  107. typedef struct {
  108.     ID      ckID;
  109.     LONG  ckSize;    /* this ckSize includes "grpSubID".*/
  110.     ID    grpSubID;
  111.     } GroupHeader;
  112.  
  113. typedef struct {
  114.     ID      ckID;
  115.     LONG  ckSize;
  116.     ID    grpSubID;
  117.     UBYTE grpData[ 1 /*REALLY: ckSize-sizeof(grpSubID)*/ ];
  118.     } GroupChunk;
  119.  
  120.  
  121. /* ---------- IFF Reader -----------------------------------------------*/
  122.  
  123. /******** Routines to support a stream-oriented IFF file reader *******
  124.  *
  125.  * These routines handle lots of details like error checking and skipping
  126.  * over padding. They're also careful not to read past any containing context.
  127.  *
  128.  * These routines ASSUME they're the only ones reading from the file.
  129.  * Client should check IFFP error codes. Don't press on after an error!
  130.  * These routines try to have no side effects in the error case, except
  131.  * partial I/O is sometimes unavoidable.
  132.  *
  133.  * All of these routines may return DOS_ERROR. In that case, ask DOS for the
  134.  * specific error code.
  135.  *
  136.  * The overall scheme for the low level chunk reader is to open a "group read
  137.  * context" with OpenRIFF or OpenRGroup, read the chunks with GetChunkHdr
  138.  * (and its kin) and IFFReadBytes, and close the context with CloseRGroup.
  139.  *
  140.  * The overall scheme for reading an IFF file is to use ReadIFF, ReadIList,
  141.  * and ReadICat to scan the file. See those procedures, ClientProc (below),
  142.  * and the skeleton IFF reader. */
  143.  
  144. /* Client passes ptrs to procedures of this type to ReadIFF which call them
  145.  * back to handle LISTs, FORMs, CATs, and PROPs.
  146.  *
  147.  * Use the GroupContext ptr when calling reader routines like GetChunkHdr.
  148.  * Look inside the GroupContext ptr for your ClientFrame ptr. You'll
  149.  * want to type cast it into a ptr to your containing struct to get your
  150.  * private contextual data (stacked property settings). See below. */
  151. #ifdef FDwAT
  152. typedef IFFP ClientProc(struct _GroupContext *);
  153. #else
  154. typedef IFFP ClientProc();
  155. #endif
  156.  
  157. /* Client's context for reading an IFF file or a group.
  158.  * Client should actually make this the first component of a larger struct
  159.  * (it's personal stack "frame") that has a field to store each "interesting"
  160.  * property encountered.
  161.  * Either initialize each such field to a global default or keep a boolean
  162.  * indicating if you've read a property chunk into that field.
  163.  * Your getList and getForm procs should allocate a new "frame" and copy the
  164.  * parent frame's contents. The getProp procedure should store into the frame
  165.  * allocated by getList for the containing LIST. */
  166. typedef struct _ClientFrame {
  167.    ClientProc *getList, *getProp, *getForm, *getCat;
  168.     /* client's own data follows; place to stack property settings */
  169.     } ClientFrame;
  170.  
  171. /* Our context for reading a group chunk. */
  172. typedef struct _GroupContext {
  173.     struct _GroupContext *parent; /* Containing group; NULL => whole file. */
  174.     ClientFrame *clientFrame;     /* Reader data & client's context state. */
  175.     BPTR file;        /* Byte-stream file handle. */
  176.     LONG position;    /* The context's logical file position. */
  177.     LONG bound;        /* File-absolute context bound
  178.              * or szNotYetKnown (writer only). */
  179.     ChunkHeader ckHdr;    /* Current chunk header. ckHdr.ckSize = szNotYetKnown
  180.              * means we need to go back and set the size (writer only).
  181.              * See also Pseudo-IDs, above. */
  182.     ID subtype;        /* Group's subtype ID when reading. */
  183.     LONG bytesSoFar;    /* # bytes read/written of current chunk's data. */
  184.     } GroupContext;
  185.  
  186. /* Computes the number of bytes not yet read from the current chunk, given
  187.  * a group read context gc. */
  188. #define ChunkMoreBytes(gc)  ((gc)->ckHdr.ckSize - (gc)->bytesSoFar)
  189.  
  190.  
  191. /***** Low Level IFF Chunk Reader *****/
  192.  
  193. #ifdef FDwAT
  194.  
  195. /* Given an open file, open a read context spanning the whole file.
  196.  * This is normally only called by ReadIFF.
  197.  * This sets new->clientFrame = clientFrame.
  198.  * ASSUME context allocated by caller but not initialized.
  199.  * ASSUME caller doesn't deallocate the context before calling CloseRGroup.
  200.  * NOT_IFF ERROR if the file is too short for even a chunk header.*/
  201. extern IFFP OpenRIFF(BPTR, GroupContext *, ClientFrame *);
  202.              /*  file, new,            clientFrame  */
  203.  
  204. /* Open the remainder of the current chunk as a group read context.
  205.  * This will be called just after the group's subtype ID has been read
  206.  * (automatically by GetChunkHdr for LIST, FORM, PROP, and CAT) so the
  207.  * remainder is a sequence of chunks.
  208.  * This sets new->clientFrame = parent->clientFrame. The caller should repoint
  209.  * it at a new clientFrame if opening a LIST context so it'll have a "stack
  210.  * frame" to store PROPs for the LIST. (It's usually convenient to also
  211.  * allocate a new Frame when you encounter FORM of the right type.)
  212.  *
  213.  * ASSUME new context allocated by caller but not initialized.
  214.  * ASSUME caller doesn't deallocate the context or access the parent context
  215.  * before calling CloseRGroup.
  216.  * BAD_IFF ERROR if context end is odd or extends past parent. */
  217. extern IFFP OpenRGroup(GroupContext *, GroupContext *);
  218.            /*  parent,         new  */
  219.  
  220. /* Close a group read context, updating its parent context.
  221.  * After calling this, the old context may be deallocated and the parent
  222.  * context can be accessed again. It's okay to call this particular procedure
  223.  * after an error has occurred reading the group.
  224.  * This always returns IFF_OKAY. */
  225. extern IFFP CloseRGroup(GroupContext *);
  226.             /*  old  */
  227.  
  228. /* Skip any remaining bytes of the previous chunk and any padding, then
  229.  * read the next chunk header into context.ckHdr.
  230.  * If the ckID is LIST, FORM, CAT, or PROP, this automatically reads the
  231.  * subtype ID into context->subtype.
  232.  * Caller should dispatch on ckID (and subtype) to an appropriate handler.
  233.  *
  234.  * RETURNS context.ckHdr.ckID (the ID of the new chunk header); END_MARK
  235.  * if there are no more chunks in this context; or NOT_IFF if the top level
  236.  * file chunk isn't a FORM, LIST, or CAT; or BAD_IFF if malformed chunk, e.g.
  237.  * ckSize is negative or too big for containing context, ckID isn't positive,
  238.  * or we hit end-of-file.
  239.  *
  240.  * See also GetFChunkHdr, GetF1ChunkHdr, and GetPChunkHdr, below.*/
  241. extern ID       GetChunkHdr(GroupContext *);
  242.   /*  context.ckHdr.ckID    context  */
  243.  
  244. /* Read nBytes number of data bytes of current chunk. (Use OpenGroup, etc.
  245.  * instead to read the contents of a group chunk.) You can call this several
  246.  * times to read the data piecemeal.
  247.  * CLIENT_ERROR if nBytes < 0. SHORT_CHUNK if nBytes > ChunkMoreBytes(context)
  248.  * which could be due to a client bug or a chunk that's shorter than it
  249.  * ought to be (bad form). (on either CLIENT_ERROR or SHORT_CHUNK,
  250.  * IFFReadBytes won't read any bytes.) */
  251. extern IFFP IFFReadBytes(GroupContext *, BYTE *, LONG);
  252.              /*  context,        buffer, nBytes  */
  253.  
  254.  
  255. /***** IFF File Reader *****/
  256.  
  257. /* This is a noop ClientProc that you can use for a getList, getForm, getProp,
  258.  * or getCat procedure that just skips the group. A simple reader might just
  259.  * implement getForm, store ReadICat in the getCat field of clientFrame, and
  260.  * use SkipGroup for the getList and getProp procs.*/
  261. extern IFFP SkipGroup(GroupContext *);
  262.  
  263. /* IFF file reader.
  264.  * Given an open file, allocate a group context and use it to read the FORM,
  265.  * LIST, or CAT and it's contents. The idea is to parse the file's contents,
  266.  * and for each FORM, LIST, CAT, or PROP encountered, call the getForm,
  267.  * getList, getCat, or getProp procedure in clientFrame, passing the
  268.  * GroupContext ptr.
  269.  * This is achieved with the aid of ReadIList (which your getList should
  270.  * call) and ReadICat (which your getCat should call, if you don't just use
  271.  * ReadICat for your getCat). If you want to handle FORMs, LISTs, and CATs
  272.  * nested within FORMs, the getForm procedure must dispatch to getForm,
  273.  * getList, and getCat (it can use GetF1ChunkHdr to make this easy).
  274.  *
  275.  * Normal return is IFF_OKAY (if whole file scanned) or IFF_DONE (if a client
  276.  * proc said "done" first).
  277.  * See the skeletal getList, getForm, getCat, and getProp procedures. */
  278. extern IFFP ReadIFF(BPTR, ClientFrame *);
  279.                 /*  file, clientFrame  */
  280.  
  281. /* IFF LIST reader.
  282.  * Your "getList" procedure should allocate a ClientFrame, copy the parent's
  283.  * ClientFrame, and then call this procedure to do all the work.
  284.  *
  285.  * Normal return is IFF_OKAY (if whole LIST scanned) or IFF_DONE (if a client
  286.  * proc said "done" first).
  287.  * BAD_IFF ERROR if a PROP appears after a non-PROP. */
  288. extern IFFP ReadIList(GroupContext *, ClientFrame *);
  289.           /*  parent,         clientFrame  */
  290.  
  291. /* IFF CAT reader.
  292.  * Most clients can simply use this to read their CATs. If you must do extra
  293.  * setup work, put a ptr to your getCat procedure in the clientFrame, and
  294.  * have that procedure call ReadICat to do the detail work.
  295.  *
  296.  * Normal return is IFF_OKAY (if whole CAT scanned) or IFF_DONE (if a client
  297.  * proc said "done" first).
  298.  * BAD_IFF ERROR if a PROP appears in the CAT. */
  299. extern IFFP ReadICat(GroupContext *);
  300.          /*  parent  */
  301.  
  302. /* Call GetFChunkHdr instead of GetChunkHdr to read each chunk inside a FORM.
  303.  * It just calls GetChunkHdr and returns BAD_IFF if it gets a PROP chunk. */
  304. extern ID    GetFChunkHdr(GroupContext *);
  305.   /*  context.ckHdr.ckID    context  */
  306.  
  307. /* GetF1ChunkHdr is like GetFChunkHdr, but it automatically dispatches to the
  308.  * getForm, getList, and getCat procedure (and returns the result) if it
  309.  * encounters a FORM, LIST, or CAT. */
  310. extern ID    GetF1ChunkHdr(GroupContext *);
  311.   /*  context.ckHdr.ckID    context  */
  312.  
  313. /* Call GetPChunkHdr instead of GetChunkHdr to read each chunk inside a PROP.
  314.  * It just calls GetChunkHdr and returns BAD_IFF if it gets a group chunk. */
  315. extern ID    GetPChunkHdr(GroupContext *);
  316.   /*  context.ckHdr.ckID    context  */
  317.  
  318. #else /* not FDwAT */
  319.  
  320. extern IFFP OpenRIFF();
  321. extern IFFP OpenRGroup();
  322. extern IFFP CloseRGroup();
  323. extern ID   GetChunkHdr();
  324. extern IFFP IFFReadBytes();
  325. extern IFFP SkipGroup();
  326. extern IFFP ReadIFF();
  327. extern IFFP ReadIList();
  328. extern IFFP ReadICat();
  329. extern ID   GetFChunkHdr();
  330. extern ID   GetF1ChunkHdr();
  331. extern ID   GetPChunkHdr();
  332.  
  333. #endif /* not FDwAT */
  334.  
  335. /* ---------- IFF Writer -----------------------------------------------*/
  336.  
  337. /******* Routines to support a stream-oriented IFF file writer *******
  338.  *
  339.  * These routines will random access back to set a chunk size value when the
  340.  * caller doesn't know it ahead of time. They'll also do things automatically
  341.  * like padding and error checking.
  342.  *
  343.  * These routines ASSUME they're the only ones writing to the file.
  344.  * Client should check IFFP error codes. Don't press on after an error!
  345.  * These routines try to have no side effects in the error case, except that
  346.  * partial I/O is sometimes unavoidable.
  347.  *
  348.  * All of these routines may return DOS_ERROR. In that case, ask DOS for the
  349.  * specific error code.
  350.  *
  351.  * The overall scheme is to open an output GroupContext via OpenWIFF or
  352.  * OpenWGroup, call either PutCk or {PutCkHdr {IFFWriteBytes}* PutCkEnd} for
  353.  * each chunk, then use CloseWGroup to close the GroupContext.
  354.  *
  355.  * To write a group (LIST, FORM, PROP, or CAT), call StartWGroup, write out
  356.  * its chunks, then call EndWGroup. StartWGroup automatically writes the
  357.  * group header and opens a nested context for writing the contents.
  358.  * EndWGroup closes the nested context and completes the group chunk. */
  359.  
  360.  
  361. #ifdef FDwAT
  362.  
  363. /* Given a file open for output, open a write context.
  364.  * The "limit" arg imposes a fence or upper limit on the logical file
  365.  * position for writing data in this context. Pass in szNotYetKnown to be
  366.  * bounded only by disk capacity.
  367.  * ASSUME new context structure allocated by caller but not initialized.
  368.  * ASSUME caller doesn't deallocate the context before calling CloseWGroup.
  369.  * The caller is only allowed to write out one FORM, LIST, or CAT in this top
  370.  * level context (see StartWGroup and PutCkHdr).
  371.  * CLIENT_ERROR if limit is odd.*/
  372. extern IFFP OpenWIFF(BPTR, GroupContext *, LONG);
  373.          /*  file, new,            limit {file position}  */
  374.  
  375. /* Start writing a group (presumably LIST, FORM, PROP, or CAT), opening a
  376.  * nested context. The groupSize includes all nested chunks + the subtype ID.
  377.  *
  378.  * The subtype of a LIST or CAT is a hint at the contents' FORM type(s). Pass
  379.  * in FILLER if it's a mixture of different kinds.
  380.  *
  381.  * This writes the chunk header via PutCkHdr, writes the subtype ID via
  382.  * IFFWriteBytes, and calls OpenWGroup. The caller may then write the nested
  383.  * chunks and finish by calling EndWGroup.
  384.  * The OpenWGroup call sets new->clientFrame = parent->clientFrame.
  385.  *
  386.  * ASSUME new context structure allocated by caller but not initialized.
  387.  * ASSUME caller doesn't deallocate the context or access the parent context
  388.  * before calling CloseWGroup.
  389.  * ERROR conditions: See PutCkHdr, IFFWriteBytes, OpenWGroup. */
  390. extern IFFP StartWGroup(GroupContext *, ID, LONG, ID, GroupContext *);
  391.             /*  parent, groupType, groupSize, subtype, new  */
  392.  
  393. /* End a group started by StartWGroup.
  394.  * This just calls CloseWGroup and PutCkEnd.
  395.  * ERROR conditions: See CloseWGroup and PutCkEnd. */
  396. extern IFFP EndWGroup(GroupContext *);
  397.             /*  old  */
  398.  
  399. /* Open the remainder of the current chunk as a group write context.
  400.  * This is normally only called by StartWGroup.
  401.  *
  402.  * Any fixed limit to this group chunk or a containing context will impose
  403.  * a limit on the new context.
  404.  * This will be called just after the group's subtype ID has been written
  405.  * so the remaining contents will be a sequence of chunks.
  406.  * This sets new->clientFrame = parent->clientFrame.
  407.  * ASSUME new context structure allocated by caller but not initialized.
  408.  * ASSUME caller doesn't deallocate the context or access the parent context
  409.  * before calling CloseWGroup.
  410.  * CLIENT_ERROR if context end is odd or PutCkHdr wasn't called first. */
  411. extern IFFP OpenWGroup(GroupContext *, GroupContext *);
  412.            /*  parent,         new  */
  413.  
  414. /* Close a write context and update its parent context.
  415.  * This is normally only called by EndWGroup.
  416.  *
  417.  * If this is a top level context (created by OpenWIFF) we'll set the file's
  418.  * EOF (end of file) but won't close the file.
  419.  * After calling this, the old context may be deallocated and the parent
  420.  * context can be accessed again.
  421.  *
  422.  * Amiga DOS Note: There's no call to set the EOF. We just position to the
  423.  * desired end and return. Caller must Close file at that position.
  424.  * CLIENT_ERROR if PutCkEnd wasn't called first. */
  425. extern IFFP CloseWGroup(GroupContext *);
  426.             /*  old  */
  427.  
  428. /* Write a whole chunk to a GroupContext. This writes a chunk header, ckSize
  429.  * data bytes, and (if needed) a pad byte. It also updates the GroupContext.
  430.  * CLIENT_ERROR if ckSize == szNotYetKnown. See also PutCkHdr errors. */
  431. extern IFFP PutCk(GroupContext *, ID,   LONG,   BYTE *);
  432.           /*  context,        ckID, ckSize, *data  */
  433.  
  434. /* Write just a chunk header. Follow this will any number of calls to
  435.  * IFFWriteBytes and finish with PutCkEnd.
  436.  * If you don't yet know how big the chunk is, pass in ckSize = szNotYetKnown,
  437.  * then PutCkEnd will set the ckSize for you later.
  438.  * Otherwise, IFFWriteBytes and PutCkEnd will ensure that the specified
  439.  * number of bytes get written.
  440.  * CLIENT_ERROR if the chunk would overflow the GroupContext's bound, if
  441.  * PutCkHdr was previously called without a matching PutCkEnd, if ckSize < 0
  442.  * (except szNotYetKnown), if you're trying to write something other
  443.  * than one FORM, LIST, or CAT in a top level (file level) context, or
  444.  * if ckID <= 0 (these illegal ID values are used for error codes). */
  445. extern IFFP PutCkHdr(GroupContext *, ID,   LONG);
  446.          /*  context,        ckID, ckSize  */
  447.  
  448. /* Write nBytes number of data bytes for the current chunk and update
  449.  * GroupContext.
  450.  * CLIENT_ERROR if this would overflow the GroupContext's limit or the
  451.  * current chunk's ckSize, or if PutCkHdr wasn't called first, or if
  452.  * nBytes < 0. */
  453. extern IFFP IFFWriteBytes(GroupContext *, BYTE *, LONG);
  454.               /*  context,        *data,  nBytes  */
  455.  
  456. /* Complete the current chunk, write a pad byte if needed, and update
  457.  * GroupContext.
  458.  * If current chunk's ckSize = szNotYetKnown, this goes back and sets the
  459.  * ckSize in the file.
  460.  * CLIENT_ERROR if PutCkHdr wasn't called first, or if client hasn't
  461.  * written 'ckSize' number of bytes with IFFWriteBytes. */
  462. extern IFFP PutCkEnd(GroupContext *);
  463.          /*  context  */
  464.  
  465. #else /* not FDwAT */
  466.  
  467. extern IFFP OpenWIFF();
  468. extern IFFP StartWGroup();
  469. extern IFFP EndWGroup();
  470. extern IFFP OpenWGroup();
  471. extern IFFP CloseWGroup();
  472. extern IFFP PutCk();
  473. extern IFFP PutCkHdr();
  474. extern IFFP IFFWriteBytes();
  475. extern IFFP PutCkEnd();
  476.  
  477. #endif /* not FDwAT */
  478.  
  479. #endif IFF_H
  480.  
  481.