#define NPRIMITIVES 20
typedef struct s_vector *(*qpe_fun_ptr) ();
typedef struct s_device {
	int active;
	long which;	/* index in the list of devices: see $M/device.c */
	float *params;
	long nlocal;
	char *local_params;
	qpe_fun_ptr routines[NPRIMITIVES];
} device;

/* defines for routine position in dev->routines */
#define DEV_initial 0
#define DEV_wrap 1
#define DEV_flush 2
#define DEV_signalled 3
#define DEV_marks 4
#define DEV_lines 5
#define DEV_polygon 6
#define DEV_text 7
#define DEV_segments 8
#define DEV_clear 9
#define DEV_input 10
#define DEV_menu 11
#define DEV_hook 12
#define DEV_seek 13
#define DEV_ptchar 14
#define DEV_line 15
#define DEV_length 16
#define DEV_query 17


extern device *cur_device;
extern device deflt_device;

#define NPARAMS 200

#define NULL_DEVICE (&deflt_device)

#define TTY5620 -999
#define POSTSCRIPT -998
#define HPGL -997
#define PRINTER -996
#define TEK4014 -995
#define TTY630 -994
#define TEK4105 -993
#define HP2623	-991
#define HP2648	-990
#define HP2628	-990
#define HP2627	-989
#define HP150	-988
#define X11	-1111
#define NEWS	-987
#define SUN -425

/* hook types */
#define HOOK_setcolor		1	/* set the color table */
#define HOOK_getcolor		2	/* get the color table */
