xref: /original-bsd/lib/libplot/hp2648/hp2648.h (revision 431be598)
1 /*-
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  *
7  *	@(#)hp2648.h	8.1 (Berkeley) 06/04/93
8  */
9 
10 /*
11  * Displays plot files on an hp2648a graphics terminals.  I have heard
12  * that all hp plotting devices use the same control sequences, so this
13  * might work for all hp devices capable of plotting.
14  */
15 
16 #include <stdio.h>
17 
18 #define TERMINAL "/dev/tty"
19 
20 #define	ENQ	05
21 #define ACK	06
22 #define ESC	033
23 #define GRAPHIC	'*'
24 #define MODE	'm'
25 #define PLOT	'p'
26 #define DISPLAY 'd'
27 #define PENUP	'a'
28 #define BINARY	'i'
29 #define ASCII	'f'
30 #define CR	'\n'
31 
32 #define TRUE  1
33 #define FALSE 0
34 
35 #define xsc(xi) ((int) (xi - lowx) * scalex + 0.5)
36 #define ysc(yi) ((int) (yi - lowy) * scaley + 0.5)
37 
38 extern int shakehands;
39 extern int currentx;
40 extern int currenty;
41 extern int buffcount;
42 extern int fildes;
43 extern float lowx;
44 extern float lowy;
45 extern float scalex;
46 extern float scaley;
47 extern struct sgttyb sarg;
48