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