
/* 

	General IFF definitions
	based on orginal iff stuff from C=

	(c) Copyright 1995-2001 Grzegorz Calkowski

	This file is part of SysPic.

	SysPic  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.

	Bison 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 Bison; see the file COPYING.  If not, write to
	the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

*/

#ifndef IFF_H
#define IFF_H

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifndef MAX
#define	MAX(a,b)	((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define	MIN(a,b)	((a) < (b) ? (a) : (b))
#endif
#ifndef ABS
#define	ABS(x)		((x) < 0 ? -(x) : (x))
#endif

#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif

/* Generic Chunk ID's we may encounter */
#define	ID_FORM		MAKE_ID('F','O','R','M')
#define	ID_ANNO		MAKE_ID('A','N','N','O')
#define	ID_AUTH		MAKE_ID('A','U','T','H')
#define	ID_CHRS		MAKE_ID('C','H','R','S')
#define	ID_Copyright	MAKE_ID('(','c',')',' ')
#define	ID_CSET		MAKE_ID('C','S','E','T')
#define	ID_FVER		MAKE_ID('F','V','E','R')
#define	ID_NAME		MAKE_ID('N','A','M','E')
#define ID_TEXT		MAKE_ID('T','E','X','T')
#define ID_BODY		MAKE_ID('B','O','D','Y')

/* Errors */

#define CLIENT_ERROR			1
#define IFFERR_NOMEM			2
#define IFFERR_NOFILE		3
#define IFFERR_IO				4
#define IFFERR_MANGLED		5

#endif
