/* defs.h 
	vi:ts=3 sw=3:
 */

/* $Id: defs.h,v 4.18 1995/09/16 15:32:28 espie Exp espie $ 
 * $Log: defs.h,v $
 * Revision 4.18  1995/09/16 15:32:28  espie
 * Signed/unsigned bug.
 *
 * Revision 4.17  1995/09/07 14:33:08  espie
 * *** empty log message ***
 *
 * Revision 4.16  1995/09/03 13:39:24  espie
 * *** empty log message ***
 *
 * Revision 4.15  1995/09/02 22:19:09  espie
 * mung added.
 *
 * Revision 4.14  1995/08/27 18:43:08  espie
 * *** empty log message ***
 *
 * Revision 4.14  1995/08/14  13:26:59  espie
 * *** empty log message ***
 *
 * Revision 4.13  1995/07/02 17:52:21  espie
 * *** empty log message ***
 *
 * Revision 4.12  1995/07/02 16:11:20  espie
 * *** empty log message ***
 *
 * Revision 4.11  1995/02/21 17:54:32  espie
 * Internal problem: buggy RCS. Fixed logs.
 *
 * Revision 4.5  1995/02/01  16:39:04  espie
 * Includes moved to defs.h
 *
 * Revision 4.4  1995/01/28  09:23:59  espie
 * Added #ifdef for MIN/MAX.
 *
 * Revision 4.2  1994/07/04  13:57:32  espie
 * Binary stuff.
 * Fixed up ansi C stupid bug.
 * Added prototypes, and `generic' values.
 * Better portability
 * Stupid fix + type casts.
 * Amiga support.
 * Protracker commands.
 */

#define LOCAL static
/* X is too short */
#define XT extern

#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef MALLOC_NOT_IN_STDLIB
#include <malloc.h>
#endif
#ifdef ONLY_BCOPY
#define memmove(a, b, n)		bcopy(b, a, n)
#endif

#ifndef EXPAND_WILDCARDS
#define EXPAND_WILDCARDS(x,y)
#endif

#ifdef BINARY_HEEDED
#define READ_ONLY    "rb"
#define WRITE_ONLY   "wb"
#else
#define READ_ONLY    "r"
#define WRITE_ONLY   "w"
#endif


#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif

#ifndef MIN
#define MIN(A,B) ((A)<(B) ? (A) : (B))
#endif
#ifndef MAX
#define MAX(A,B) ((A)>(B) ? (A) : (B))
#endif
     
#define D fprintf(stderr, "%d\n", __LINE__);

typedef union
   {
   long scalar;
   float real;
   GENERIC pointer;
   } VALUE;

/* predefinitions for relevant structures */
struct tag;
struct channel;
struct song;
struct automaton;
struct sample_info;
struct event;
struct tempo;
struct vauto;
struct play_entry;
struct option_set;
struct iff;
struct comm_chunk;


/* memory test */
#ifdef MUNG
#define malloc(n) do_malloc(n, __FILE__, __LINE__)
#define free(n) do_free(n, __FILE__, __LINE__)
#define calloc(n, s) do_calloc(n, s, __FILE__, __LINE__)
#define realloc(p, n) do_realloc(p, n, __FILE__, __LINE__)
#else
#define mung_message(p)
#endif
