/* these have to be like so, so that we can write */
/* things like R & V, etc. */
#define H 0
#define V 1
#define R_DIR 0
#define U_DIR 1
#define L_DIR 2
#define D_DIR 3
#define ishor(n) (((n) & V) == 0)
#define isvert(n) (((n) & V) != 0)
#define isright(n) ((n) == R_DIR)
#define isleft(n) ((n) == L_DIR)
#define isdown(n) ((n) == D_DIR)
#define isup(n) ((n) == U_DIR)
typedef float ofloat; /* for o_val[] in obj; could be double */
typedef struct obj { /* stores various things in variable length */
int o_type;
int o_count; /* number of things */
int o_nobj; /* index in objlist */
int o_mode; /* hor or vert */
float o_x; /* coord of "center" */
float o_y;
int o_nt1; /* 1st index in text[] for this object */
int o_nt2; /* 2nd; difference is #text strings */
int o_attr; /* HEAD, CW, INVIS, etc., go here */
int o_size; /* linesize */
int o_nhead; /* arrowhead style */
struct symtab *o_symtab; /* symtab for [...] */
float o_ddval; /* value of dot/dash expression */
float o_fillval; /* gray scale value */
ofloat o_val[1]; /* actually this will be > 1 in general */
/* type is not always FLOAT!!!! */
} obj;
typedef union { /* the yacc stack type */
int i;
char *p;
obj *o;
double f;
struct symtab *st;
} YYSTYPE;
#define MAXARGS 20
typedef struct { /* argument stack */
char *argstk[MAXARGS]; /* pointers to args */
char *argval; /* points to space containing args */
} Arg;
extern int dbg;
extern obj **objlist;
extern int nobj, nobjlist;
extern Attr *attr;
extern int nattr, nattrlist;
extern Text *text;
extern int ntextlist;
extern int ntext;
extern int ntext1;
extern double curx, cury;
extern int hvmode;
extern int codegen;
extern char *PEstring;