/*

  File: misc.h

  $Header: /u/boat/pdb/Src/Include/RCS/misc.h,v 1.1 1992/09/11 18:51:37 karthik Exp karthik $
  
  $Log: misc.h,v $
 * Revision 1.1  1992/09/11  18:51:37  karthik
 * Initial revision
 *
  
  $Author$

*/

#ifndef _MISC_H_
#define _MISC_H_

#ifdef __transparencies__
#define BW_COLORS 1
#else
#undef BW_COLORS
#endif

#ifndef PI
#define PI 3.14159265358979323846
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef YES
#define YES TRUE
#endif
#ifndef NO
#define NO FALSE
#endif
#ifndef max
#define max(A, B) ((A) > (B)? (A) : (B))
#endif
#ifndef min
#define min(A, B) ((A) < (B)? (A) : (B))
#endif

#define RADIANS(x) ((x)*PI/180)
#define DEGREES(x) ((x)*180/PI)

#define DISTANCE(x1,y1,x2,y2) sqrt((double)(((x2)-(x1))*((x2)-(x1))+     \
					    ((y2)-(y1))*((y2)-(y1))))

#define DISTANCE_SQR(x1,y1,x2,y2) (((x2)-(x1))*((x2)-(x1))+              \
                                  ((y2)-(y1))*((y2)-(y1)))

#define OBJ(name_string) SUIT_name(name_string)

/* file: misc.c: */
char *myalloc(int n);
char *strsave(char *s);
char *itoa(int number);
char *lftoa(double number, int len);
int mystrlen(char *string);
char *mystrcpy(char *s1, char *s2);

#endif
