/* * chunk.h * * Chunk file format definitions * * © 1993-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's AOF library (aoflib). * * Aoflib is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Aoflib 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aoflib. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __chunk_h #define __chunk_h #define chunk_MAGIC (0xC3CBC6C5ul) typedef struct { char chunkName[8]; /* The name of this chunk */ int offset; /* Offset of chunk data in file */ int size; /* Size of the chunk data */ } chunk_tableEntry; typedef struct { unsigned long id; /* Chunk file magic number */ int maxChunks; /* Number of chunks allocated */ int numChunks; /* Number of chunks used */ } chunk_fixedHeader; typedef struct { chunk_fixedHeader hdr; /* The file's header info */ chunk_tableEntry table[1]; /* Chunk entries (unsized array)*/ } chunk_header; #endif