148517Sbostic /*- 2*61393Sbostic * Copyright (c) 1980, 1993 3*61393Sbostic * The Regents of the University of California. All rights reserved. 419977Sdist * 548517Sbostic * %sccs.include.proprietary.c% 619977Sdist * 7*61393Sbostic * @(#)hp2648.h 8.1 (Berkeley) 06/04/93 848517Sbostic */ 948517Sbostic 1048517Sbostic /* 1115451Sralph * Displays plot files on an hp2648a graphics terminals. I have heard 1215451Sralph * that all hp plotting devices use the same control sequences, so this 1315451Sralph * might work for all hp devices capable of plotting. 1415451Sralph */ 1515451Sralph 1615451Sralph #include <stdio.h> 1715451Sralph 1815451Sralph #define TERMINAL "/dev/tty" 1915451Sralph 2015451Sralph #define ENQ 05 2115451Sralph #define ACK 06 2215451Sralph #define ESC 033 2315451Sralph #define GRAPHIC '*' 2415451Sralph #define MODE 'm' 2515451Sralph #define PLOT 'p' 2615451Sralph #define DISPLAY 'd' 2715451Sralph #define PENUP 'a' 2815451Sralph #define BINARY 'i' 2915451Sralph #define ASCII 'f' 3015451Sralph #define CR '\n' 3115451Sralph 3215451Sralph #define TRUE 1 3315451Sralph #define FALSE 0 3415451Sralph 3515451Sralph #define xsc(xi) ((int) (xi - lowx) * scalex + 0.5) 3615451Sralph #define ysc(yi) ((int) (yi - lowy) * scaley + 0.5) 3715451Sralph 3815451Sralph extern int shakehands; 3915451Sralph extern int currentx; 4015451Sralph extern int currenty; 4115451Sralph extern int buffcount; 4215451Sralph extern int fildes; 4315451Sralph extern float lowx; 4415451Sralph extern float lowy; 4515451Sralph extern float scalex; 4615451Sralph extern float scaley; 4715451Sralph extern struct sgttyb sarg; 48