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