4 c_iff - a portable IFF parser
9 c_iff - a portable IFF parser
17 <a href=
"#Introduction">Introduction
</a>
20 <a href=
"#Background">Background
</a>
23 <a href=
"#Portability">Portability
</a>
26 <a href=
"#Installation">Installation
</a>
29 <a href=
"#Documentation">Documentation
</a>
32 <a href=
"#CopLic">Copyright and License
</a>
35 <a href=
"#Author">Author
</a>
38 <a href=
"#VerHis">Version History
</a>
42 <a name=
"Introduction"></a>
46 c_iff is a portable IFF parser library written entirely in simple C.
47 With this library you can read and write IFFs in an easy way.
48 It is inspired by the Amigas own iffparse.library, but without its
51 <a name=
"Background"></a>
55 IFF - Interchange File Format is the Amigas way to store data in a
56 generic form. An IFF can contain nearly every type of data you can
57 imagine, e.g. pictures (ILBM), animations (ANIM), sounds (AIFF),
58 text (FTXT) or all of this in one file. This file can also contain
59 Meta-information like the authors name or a version-strings.
60 In the PC-world the name IFF is wrongly attached to the IFF-subtype
61 ILBM, a picture-format.
63 <a name=
"Portability"></a>
67 c_iff is written in clean ANSI-C. It uses only simple functions
68 from
<stdlib.h
> and
<stdio.h
> .
69 So it should be portable to anything, a C-compiler exists for.
70 I have tested it on the following machines:
74 AmigaOS native m68k with different compilers
77 AmigaOS PowerUp PPC with the vbccppc compiler
80 Linux APUS PPC with the gcc compiler
83 Linux SuSE AMD K6 with the gcc compiler
87 You see, it runs on Big and Little Endian machines.
88 IFFs are stored in Big Endian order. To write portable code you must
89 swap the bytes of multibyte numbers before you write them to an IFF
90 or after you read them from an IFF. c_iff provides the two macros
91 Swap16IfLE and Swap32IfLE to do this.
92 If you are on a Big Endian machine you might have to add your machine to c_iff.h
93 64-bit machines (and
16-bit machines) are now supported too.
94 Never use your machines (unsigned) char, short, int, long numbers if you deal
95 with IFFs. Instead use the CARDXX and INTXX definitions from c_iff.h .
97 <a name=
"Installation"></a>
101 There is no configure and such things, just a simple Makefile.
102 This should be usable for any unixoid system, that has cc, ar and ranlib.
103 Just type
"make" to build the statical library libc_iff.a .
104 To build the documentation, type
"make doc". This requieres perl installed.
105 "make example" builds the example.
107 <a name=
"Documentation"></a>
111 c_iff has a build in documentation. This is generated by a
"make doc" .
112 This produces a file
<a href=
"c_iff.txt">c_iff.txt
</a> . This file
113 is in Amigas AutoDoc format, a simple ASCII-format.
114 The file
<a href=
"example.c">example.c
</a> shows how to use c_iff to read and write
115 IFFs. The binary is build by
"make example" .
120 c_iff currently only supports FORM IFFs. But the other types of IFFs are very rare.
121 If you need them, tell me.
123 <a name=
"CopLic"></a>
125 Copyright and License
127 c_iff is Copyright (C)
2000,
2001 Joerg Dietrich
130 This is the AROS-version of c_iff.
131 It is distributed under the AROS Public License.
132 But I reserve the right to distribute
133 my own version under other licenses.
136 <a name=
"Author"></a>
140 c_iff is written by me, J
örg Dietrich .
141 You can reach me at
<a href=
"mailto:Dietrich_Joerg@t-online.de">Dietrich_Joerg@t-online.de
</a>.
143 <a name=
"VerHis"></a>
147 06-Nov-
2000 : initial release
149 11-Nov-
2001 : bug-fixes, support for non
32-bit architectures
154 Copyright
© 2000,
2001 <a href=
"mailto:Dietrich_Joerg@t-online.de">J
örg Dietrich
</a>
156 Last change:
11-Nov-
2001