home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
diskutil
/
ff32src
/
stddef.h
< prev
Wrap
C/C++ Source or Header
|
1993-08-05
|
1KB
|
53 lines
/* Standard definitions to use -- boolean variables, etc */
#ifndef STDDEF_H
#define STDDEF_H
typedef unsigned long LONG;
typedef unsigned WORD;
typedef unsigned char BYTE;
typedef unsigned char SHORT;
typedef void VOID;
#define MAXINT 0xFFFF
#define MAXLONG 0xFFFFFFFF
#define NULL ((char *)0)
#ifndef NIL
#define NIL '\0'
#endif
typedef char BOOLEAN;
#define FALSE 0
#define TRUE (!FALSE)
typedef VOID (func)();
typedef int (ifunc)();
typedef LONG (lfunc)();
/* Inclusive between macro */
#define IBETWEEN(x, a, b) (((x) >= (a) && (x) <= (b)) ? TRUE : FALSE)
/* Exclusive between macro */
#define EBETWEEN(x, a, b) (((x) > (a) && (x) < (b)) ? TRUE : FALSE)
extern char *strcat();
extern char *malloc();
extern char *lmalloc();
typedef struct { int w,h; } wh;
typedef struct { int x,y; } xy;
typedef struct { int x,y,w,h; } xywh;
typedef struct { int x,y,x1,y1; } xyxy;
typedef struct { int x,y,x1,y1,x2,y2,x3,y3; } xyxyxyxy;
#define XYWH_PTR(a) &a.x, &a.y, &a.w, &a.h
#define XYXY_PTR(a) &a.x, &a.y, &a.x1, &a.y1
#define XY_PTR(a) &a.x, &a.y
#define WH_PTR(a) &a.w, &a.h
#define XYXYXYXY_PTR(a) &a.x, &a.y, &a.x1, &a.y1, &a.x2, &a.y2, &a.x3, &a.y3
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define new(p) ((p) = malloc(sizeof(*p))) /* Like Pascal's new */
#endif