Fixed compatibility of output.
[AROS.git] / compiler / include / libraries / iffparse.h
blob35258e19164834b921b9844c17d86e2e7f3017fc
1 #ifndef LIBRARIES_IFFPARSE_H
2 #define LIBRARIES_IFFPARSE_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Definitions for iffparse.library
9 Lang: english
12 #ifndef EXEC_LISTS_H
13 # include <exec/lists.h>
14 #endif
15 #ifndef EXEC_PORTS_H
16 # include <exec/ports.h>
17 #endif
18 #ifndef EXEC_TYPES_H
19 # include <exec/types.h>
20 #endif
21 #ifndef DEVICES_CLIPBOARD_H
22 # include <devices/clipboard.h>
23 #endif
24 #ifndef AROS_MACROS_H
25 # include <aros/macros.h>
26 #endif
28 struct IFFHandle
30 IPTR iff_Stream;
31 ULONG iff_Flags; /* see below */
32 LONG iff_Depth;
35 /* iff_Flags */
36 #define IFFF_READ 0L
37 #define IFFF_WRITE (1L<<0)
38 #define IFFF_RWBITS (IFFF_READ | IFFF_WRITE)
39 #define IFFF_FSEEK (1L<<1)
40 #define IFFF_RSEEK (1L<<2)
41 #define IFFF_RESERVED 0xFFFF0000
43 struct IFFStreamCmd
45 LONG sc_Command;
46 APTR sc_Buf;
47 LONG sc_NBytes;
50 #define IFFCMD_INIT 0
51 #define IFFCMD_CLEANUP 1
52 #define IFFCMD_READ 2
53 #define IFFCMD_WRITE 3
54 #define IFFCMD_SEEK 4
55 #define IFFCMD_ENTRY 5
56 #define IFFCMD_EXIT 6
57 #define IFFCMD_PURGELCI 7
59 struct ContextNode
61 struct MinNode cn_Node;
63 LONG cn_ID;
64 LONG cn_Type;
65 LONG cn_Size;
66 LONG cn_Scan;
69 struct LocalContextItem
71 struct MinNode lci_Node;
73 ULONG lci_ID;
74 ULONG lci_Type;
75 ULONG lci_Ident;
78 struct StoredProperty
80 LONG sp_Size;
81 APTR sp_Data;
84 struct CollectionItem
86 struct CollectionItem * ci_Next;
87 LONG ci_Size;
88 APTR ci_Data;
91 struct ClipboardHandle
93 struct IOClipReq cbh_Req;
94 struct MsgPort cbh_CBport;
95 struct MsgPort cbh_SatisfyPort;
98 /* ParseIFF() */
99 #define IFFPARSE_SCAN 0L
100 #define IFFPARSE_STEP 1L
101 #define IFFPARSE_RAWSTEP 2L
103 /* StoreLocalItem() */
104 #define IFFSLI_ROOT 1L
105 #define IFFSLI_TOP 2L
106 #define IFFSLI_PROP 3L
108 #define IFFSIZE_UNKNOWN -1L
110 /* Errors */
111 #define IFFERR_EOF -1L
112 #define IFFERR_EOC -2L
113 #define IFFERR_NOSCOPE -3L
114 #define IFFERR_NOMEM -4L
115 #define IFFERR_READ -5L
116 #define IFFERR_WRITE -6L
117 #define IFFERR_SEEK -7L
118 #define IFFERR_MANGLED -8L
119 #define IFFERR_SYNTAX -9L
120 #define IFFERR_NOTIFF -10L
121 #define IFFERR_NOHOOK -11L
122 #define IFF_RETURN2CLIENT -12L
124 #define MAKE_ID(a,b,c,d) AROS_MAKE_ID((a),(b),(c),(d))
126 #define ID_FORM MAKE_ID('F','O','R','M')
127 #define ID_LIST MAKE_ID('L','I','S','T')
128 #define ID_CAT MAKE_ID('C','A','T',' ')
129 #define ID_PROP MAKE_ID('P','R','O','P')
130 #define ID_NULL MAKE_ID(' ',' ',' ',' ')
132 #define IFFLCI_PROP MAKE_ID('p','r','o','p')
133 #define IFFLCI_COLLECTION MAKE_ID('c','o','l','l')
134 #define IFFLCI_ENTRYHANDLER MAKE_ID('e','n','h','d')
135 #define IFFLCI_EXITHANDLER MAKE_ID('e','x','h','d')
137 #endif /* LIBRARIES_IFFPARSE_H */