home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / libraries / iffparse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  2.7 KB  |  152 lines

  1. #ifndef IFF_IFFPARSE_H
  2. #define IFF_IFFPARSE_H
  3. /*
  4. ** $Filename: libraries/iffparse.h $
  5. ** $Release: 2.04 Includes, V37.4 $
  6. ** $Revision: 33.1 $
  7. ** $Date: 90/11/20 $
  8. **
  9. ** Structure definitions for the all new good nifty IFF code.
  10. **
  11. ** (C) Copyright 1989-1991 Commodore-Amiga Inc., Stuart Ferguson, and
  12. ** Leo L. Schwab
  13. ** All Rights Reserved
  14. */
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19. #ifndef EXEC_LISTS_H
  20. #include <exec/lists.h>
  21. #endif
  22. #ifndef EXEC_PORTS_H
  23. #include <exec/ports.h>
  24. #endif
  25. #ifndef DEVICES_CLIPBOARD_H
  26. #include <devices/clipboard.h>
  27. #endif
  28.  
  29.  
  30. struct IFFHandle {
  31.  ULONG iff_Stream;
  32.  ULONG iff_Flags;
  33.  LONG iff_Depth; 
  34.  
  35. };
  36.  
  37.  
  38. #define IFFF_READ 0L 
  39. #define IFFF_WRITE 1L 
  40. #define IFFF_RWBITS (IFFF_READ | IFFF_WRITE) 
  41. #define IFFF_FSEEK (1L<<1) 
  42. #define IFFF_RSEEK (1L<<2) 
  43. #define IFFF_RESERVED 0xFFFF0000L 
  44.  
  45.  
  46. struct IFFStreamCmd {
  47.  LONG sc_Command; 
  48.  APTR sc_Buf; 
  49.  LONG sc_NBytes; 
  50. };
  51.  
  52.  
  53. struct ContextNode {
  54.  struct MinNode cn_Node;
  55.  LONG cn_ID;
  56.  LONG cn_Type;
  57.  LONG cn_Size; 
  58.  LONG cn_Scan; 
  59.  
  60. };
  61.  
  62.  
  63. struct LocalContextItem {
  64.  struct MinNode lci_Node;
  65.  ULONG lci_ID,
  66.  lci_Type,
  67.  lci_Ident;
  68.  
  69. };
  70.  
  71.  
  72. struct StoredProperty {
  73.  LONG sp_Size;
  74.  UBYTE *sp_Data;
  75. };
  76.  
  77.  
  78. struct CollectionItem {
  79.  struct CollectionItem *ci_Next;
  80.  LONG ci_Size;
  81.  UBYTE *ci_Data;
  82. };
  83.  
  84.  
  85. struct ClipboardHandle {
  86.  struct IOClipReq cbh_Req;
  87.  struct MsgPort cbh_CBport;
  88.  struct MsgPort cbh_SatisfyPort;
  89. };
  90.  
  91.  
  92. #define IFFERR_EOF -1L 
  93. #define IFFERR_EOC -2L 
  94. #define IFFERR_NOSCOPE -3L 
  95. #define IFFERR_NOMEM -4L 
  96. #define IFFERR_READ -5L 
  97. #define IFFERR_WRITE -6L 
  98. #define IFFERR_SEEK -7L 
  99. #define IFFERR_MANGLED -8L 
  100. #define IFFERR_SYNTAX -9L 
  101. #define IFFERR_NOTIFF -10L 
  102. #define IFFERR_NOHOOK -11L 
  103. #define IFF_RETURN2CLIENT -12L 
  104.  
  105. #define MAKE_ID(a,b,c,d) \
  106.  ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
  107.  
  108.  
  109. #define ID_FORM MAKE_ID('F','O','R','M')
  110. #define ID_LIST MAKE_ID('L','I','S','T')
  111. #define ID_CAT MAKE_ID('C','A','T',' ')
  112. #define ID_PROP MAKE_ID('P','R','O','P')
  113. #define ID_NULL MAKE_ID(' ',' ',' ',' ')
  114.  
  115.  
  116. #define IFFLCI_PROP MAKE_ID('p','r','o','p')
  117. #define IFFLCI_COLLECTION MAKE_ID('c','o','l','l')
  118. #define IFFLCI_ENTRYHANDLER MAKE_ID('e','n','h','d')
  119. #define IFFLCI_EXITHANDLER MAKE_ID('e','x','h','d')
  120.  
  121.  
  122. #define IFFPARSE_SCAN 0L
  123. #define IFFPARSE_STEP 1L
  124. #define IFFPARSE_RAWSTEP 2L
  125.  
  126.  
  127. #define IFFSLI_ROOT 1L 
  128. #define IFFSLI_TOP 2L 
  129. #define IFFSLI_PROP 3L 
  130.  
  131.  
  132. #define IFFSIZE_UNKNOWN -1L
  133.  
  134.  
  135. #define IFFCMD_INIT 0 
  136. #define IFFCMD_CLEANUP 1 
  137. #define IFFCMD_READ 2 
  138. #define IFFCMD_WRITE 3 
  139. #define IFFCMD_SEEK 4 
  140. #define IFFCMD_ENTRY 5 
  141. #define IFFCMD_EXIT 6 
  142. #define IFFCMD_PURGELCI 7 
  143.  
  144.  
  145. #define IFFSCC_INIT IFFCMD_INIT
  146. #define IFFSCC_CLEANUP IFFCMD_CLEANUP
  147. #define IFFSCC_READ IFFCMD_READ
  148. #define IFFSCC_WRITE IFFCMD_WRITE
  149. #define IFFSCC_SEEK IFFCMD_SEEK
  150.  
  151. #endif
  152.