115451Sralph /* 2*19977Sdist * Copyright (c) 1980 Regents of the University of California. 3*19977Sdist * All rights reserved. The Berkeley software License Agreement 4*19977Sdist * specifies the terms and conditions for redistribution. 5*19977Sdist * 6*19977Sdist * @(#)hp2648.h 5.1 (Berkeley) 05/07/85 7*19977Sdist * 8*19977Sdist * 915451Sralph * Displays plot files on an hp2648a graphics terminals. I have heard 1015451Sralph * that all hp plotting devices use the same control sequences, so this 1115451Sralph * might work for all hp devices capable of plotting. 1215451Sralph */ 1315451Sralph 1415451Sralph #include <stdio.h> 1515451Sralph 1615451Sralph #define TERMINAL "/dev/tty" 1715451Sralph 1815451Sralph #define ENQ 05 1915451Sralph #define ACK 06 2015451Sralph #define ESC 033 2115451Sralph #define GRAPHIC '*' 2215451Sralph #define MODE 'm' 2315451Sralph #define PLOT 'p' 2415451Sralph #define DISPLAY 'd' 2515451Sralph #define PENUP 'a' 2615451Sralph #define BINARY 'i' 2715451Sralph #define ASCII 'f' 2815451Sralph #define CR '\n' 2915451Sralph 3015451Sralph #define TRUE 1 3115451Sralph #define FALSE 0 3215451Sralph 3315451Sralph #define xsc(xi) ((int) (xi - lowx) * scalex + 0.5) 3415451Sralph #define ysc(yi) ((int) (yi - lowy) * scaley + 0.5) 3515451Sralph 3615451Sralph extern int shakehands; 3715451Sralph extern int currentx; 3815451Sralph extern int currenty; 3915451Sralph extern int buffcount; 4015451Sralph extern int fildes; 4115451Sralph extern float lowx; 4215451Sralph extern float lowy; 4315451Sralph extern float scalex; 4415451Sralph extern float scaley; 4515451Sralph extern struct sgttyb sarg; 46