/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#ifndef _CDEFS_H_
#define _CDEFS_H_

#ifndef NULL
#define NULL	0
#endif

#define YES	1
#define NO	0
#define UNDEF   -1

#define genptr		void *	/* historical */
#ifdef vax
#define void int
#endif

#define MIN(x,y)	((x) < (y) ? (x) : (y))
#define MAX(x,y)	((x) > (y) ? (x) : (y))
#define ABS(x)		((x) < 0 ? -(x) : (x))
#define FABS(x)		((x) < 0.0 ? -(x) : (x))

#define ARGUMENT(s)	(strcmp(*argv, (s)) == 0)  /* for parsing arg lists */
#define ARRAY_SIZE(a)	(sizeof(a)/sizeof(a[0]))   /* # of array elements */
#define STRNCPY(s1,s2,n) ((s1)[(n)] = '\0', strncpy ((s1),(s2),(n)))

#endif
