RIFFL, the Replacement iffparse.library

RIFFL is a collection of routines to read IFF files.

Copyright © 1997 Kim Minh Kaplan.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License in the file named COPYING for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Latest version is riffl v0.2

This library aims to be source compatible with Commodore Amiga's iffparse.library. It had very few testing so it is probably buggy. It should compile on any ANSI C compiler except for POSIXStreamHandler.c which will need the read/write/lseek routines. It has only been tested on my Intel-GNU-Linux box.

Here is a short description of each directory:

lib
the replacement iffparse library routines.
include
header files.
progs

The following exec.library functions are implemented: AddHead, AddTail, Insert, Remove, RemHead, RemTail.

The following iffparse.library functions are implemented: AllocIFF, AllocLocalItem, CloseIFF, CurrentChunk, EntryHandler, ExitHandler, FindLocalItem, FindProp, FindPropContext, FreeIFF, FreeLocalItem GoodID, GoodType, IDtoStr, InitIFF, LocalItemData, OpenIFF, ParentChunk, ParseIFF, PropChunk, PushChunk, ReadChunkBytes, ReadChunkRecords, StopChunk StopOnExit, StoreItemInContext, StoreLocalItem, WriteChunkBytes.

The utility.library CallHookPkt function is implemented.

The Amiga library support routine NewList is implemented.

There are some extra routines:

InitIFFasFILE
initialise an IFFHandle to read from a standard C FILE*.
InitIFFasPOSIX
initialise an IFFHandle to read from a POSIX file descriptor.
ILBMDecodeByteRun1
decompress an IFF ILBM scan line.
ILBMEncodeByteRun1
compress an IFF ILBM scan line.
ILBMRowToChunky
transform an IFF ILBM scan line to a chunky pixel scan line (i.e one byte per pixel).
ILBMChunkyToRow
transform an chunky pixel scan line (n bytes per pixel) to an IFF ILBM scan line.

If you are interested, I also have some patches to Imagemagick 3.8.6 to read IFF ILBM.

Bug reports, comments, enhancements and stories about what you did with this library are welcome.

Kim Minh Kaplan