/************************************************************************/
/*                                                  					*/
/*                                  Types.h                             */
/*                                ===========                           */
/*              Hier werden die Standard-Typen von C definiert          */
/*                                                                      */
/*                                                                      */
/************************************************************************/

#ifndef __TYPES__
#define __TYPES__

/*
 * supported Languages:
 */
# define LNG_ENGLISH	0
# define LNG_GERMAN		1


# define BOOL       short                   /* 2 valued (true/false)    */
# define BYTE       char                    /* signed byte              */
# define UBYTE      unsigned char           /* unsigned byte            */
# define CHAR       char                    /* signed character         */
# define UCHAR      unsigned char           /* unsigned character       */
# define WORD       int                     /* signed word (16 bits)    */
# define UWORD      unsigned int            /* unsigned word            */
# define LONG       long                    /* signed long (32 bits)    */
# define ULONG      unsigned long           /* unsigned long            */

typedef enum {FALSE=0, TRUE=!0}			bool;
typedef enum {UNKNOWN=-1, OFF=0, ON=1}	tristate;
typedef unsigned char					uchar;
typedef signed char						byte;
typedef unsigned char					ubyte;
typedef int								word;
typedef unsigned int					uword;
typedef unsigned int					uint;
typedef unsigned short					ushort;
typedef unsigned long					ulong;
typedef unsigned long					size_t;

typedef union {
	ulong	ul;
	uword	u[2];
	struct {
		unsigned	jar:7;
		unsigned	mon:4;
		unsigned	tag:5;
		unsigned	std:5;
		unsigned	min:6;
		unsigned	sek:5;
	} td;
} Time_Date;


# define REG        register                /* register variable        */
# define LOCAL      auto                    /* Local var on 68000       */
# define EXTERN     extern                  /* External variable        */
# define MLOCAL     static                  /* Local to module          */
# define GLOBAL     /**/                    /* Global variable          */
# define VOID       /**/                    /* Void function return     */

# define MINBYTE    -128
# define MAXBYTE    127
# define MINUBYTE   0
# define MAXUBYTE   255
# define MINCHAR    -128
# define MAXCHAR    127
# define MINUCHAR   0
# define MAXUCHAR   255
# define MININT     -32768L
# define MAXINT     32767
# define MINUNSIGNED 0x0
# define MAXUNSIGNED 0xFFFFU
# define MINSLONG   0x80000000L
# define MAXSLONG   0x7FFFFFFFL
# define MINULONG   0x0L
# define MAXULONG   0xFFFFFFFFUL

# define CHARSIZE   sizeof(char)
# define SHORTSIZE  sizeof(short)
# define INTSIZE    sizeof(int)
# define LONGSIZE   sizeof(long)
# define FLOATSIZE  sizeof(float)
# define DOUBLESIZE sizeof(double)
# define PTRSIZE    sizeof(char *)

# ifndef NIL
#    define NIL     0L
# endif

# ifndef NULL
#    define NULL    0L
# endif

# define XPARM1(P1)				struct _x_p { P1; } *xparm = (struct _x_p *)...
# define XPARM2(P1,P2)			struct _x_p { P1; P2; } *xparm = (struct _x_p *)...
# define XPARM3(P1,P2,P3)		struct _x_p { P1; P2; P3; } *xparm = (struct _x_p *)...
# define XPARM4(P1,P2,P3,P4)	struct _x_p { P1; P2; P3; P4; } *xparm = (struct _x_p *)...

#define offsetof(type,ident)	((size_t)&(((type *)0)->ident))
#define ToBool(XX)				((XX)? TRUE : FALSE)

#ifndef ANSI_C
# define ANSI_C
#endif

#endif /* ndef __TYPES__ */