/* SccsId = "@(#)incl.h 4.2 (TU-Delft) 01/18/91" */
/**********************************************************

Name/Version      : cldm/4.2

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Author(s)         : J. Annevelink
Creation date     : 18-May-1983
Modified by       : S. de Graaf
Modification date : 06-Apr-1987
Modification date : 22-Apr-1988
Modification date : 18-Jan-1991


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1987-1988, All rights reserved
**********************************************************/
#include "stdio.h"
#include "signal.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "dmincl.h"

#define P_E fprintf(stderr,
#define RAD_DEG 0.01745329252

#define MAXPATH 50	/* max # of chars in a pathname */
#define NOINTS 600	/* max # of ints  of a poly */

struct mod_bbox {
    long    xl, xr, yb, yt;
};

struct name_tree {
    char    name[DM_MAXNAME+1];
    int     errflag;
    struct mod_bbox    *bbox;
    IMPCELL            *impcell;
    struct name_tree   *rchild;
    struct name_tree   *lchild;
};

char   *malloc ();		/* system routine */
char   *strcpy ();		/* system routine */
char   *ftoa ();
char   *itoa ();
double  atof ();		/* system routine */
double  cos ();			/* system routine */
double  sin ();			/* system routine */
long    roundh ();
long    roundl ();

/* Macro which can allocate a structure	*/

#define ALLOC(ptr,type) {\
if(!(ptr=(struct type *)malloc(sizeof(struct type))))\
pr_exit (07, 27, 0); }

#define FREE(ptr) free((char *)(ptr))

/* Macro which compares two integers */

#define Min(a,b) ((a)<(b)?(a):(b))
#define Max(a,b) ((a)>(b)?(a):(b))

/* Macro for rounding */

#define ROUND(x) (x < 0)?(x - 0.5001):(x + 0.5001)
