16a411f21Sbostic /*- 2*2782e408Sbostic * Copyright (c) 1980, 1993 3*2782e408Sbostic * The Regents of the University of California. All rights reserved. 46a411f21Sbostic * 56a411f21Sbostic * %sccs.include.proprietary.c% 68e82faefSdist */ 78e82faefSdist 8100ffca9Sralph #ifndef lint 9*2782e408Sbostic static char sccsid[] = "@(#)open.c 8.1 (Berkeley) 06/04/93"; 106a411f21Sbostic #endif /* not lint */ 11100ffca9Sralph 12100ffca9Sralph /* 13100ffca9Sralph * Displays plot files on an HP7221 plotter. 14100ffca9Sralph * Cloned from bgplot.c and gigiplot.c by Jim Kleckner 15100ffca9Sralph * Thu Jun 30 13:35:04 PDT 1983 166a411f21Sbostic * 176a411f21Sbostic * Requires a handshaking program such as hp7221cat to get the plotter 186a411f21Sbostic * open and ready. 19100ffca9Sralph */ 20100ffca9Sralph 21100ffca9Sralph #include <signal.h> 22100ffca9Sralph #include "hp7221.h" 23100ffca9Sralph 24100ffca9Sralph int currentx = 0; 25100ffca9Sralph int currenty = 0; 26100ffca9Sralph double lowx = 0.0; 27100ffca9Sralph double lowy = 0.0; 28100ffca9Sralph double scale = 1.0; 29100ffca9Sralph openpl()30100ffca9Sralphopenpl() 31100ffca9Sralph { 3224cdc3f0Sbostic void closepl(); 33100ffca9Sralph 34100ffca9Sralph /* catch interupts */ 35100ffca9Sralph signal(SIGINT, closepl); 36100ffca9Sralph currentx = 0; 37100ffca9Sralph currenty = 0; 38100ffca9Sralph printf( "~VR~W" ); 39100ffca9Sralph putMBP( 800, 2000 ); 40100ffca9Sralph putMBP( 7600, 9600 ); 41100ffca9Sralph printf( "~S" ); 42100ffca9Sralph putMBP( XMAX, YMAX ); 43100ffca9Sralph printf( "vA~*z" ); 44100ffca9Sralph 45100ffca9Sralph space(0,0,XMAX,YMAX); 46100ffca9Sralph } 47