1*13319Ssam #ifndef lint 2*13319Ssam static char sccsid[] = "@(#)open.c 4.1 (Berkeley) 06/27/83"; 3*13319Ssam #endif 4*13319Ssam 5*13319Ssam # 6*13319Ssam #include <sgtty.h> 7*13319Ssam /* gsi plotting output routines */ 8*13319Ssam # define DOWN 012 9*13319Ssam # define UP 013 10*13319Ssam # define LEFT 010 11*13319Ssam # define RIGHT 040 12*13319Ssam # define BEL 007 13*13319Ssam # define ACK 006 14*13319Ssam # define CR 015 15*13319Ssam # define FF 014 16*13319Ssam # define VERTRESP 48 17*13319Ssam # define HORZRESP 60. 18*13319Ssam # define HORZRES 6. 19*13319Ssam # define VERTRES 8. 20*13319Ssam /* down is line feed, up is reverse oyne feed, 21*13319Ssam left is bwckspace, right is space. 48 points per inch 22*13319Ssam vertically, 60 horizontally */ 23*13319Ssam 24*13319Ssam int xnow, ynow; 25*13319Ssam int OUTF; 26*13319Ssam struct sgttyb ITTY, PTTY; 27*13319Ssam float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0; 28*13319Ssam int xscale, xoffset, yscale; 29*13319Ssam float botx = 0., boty = 0., obotx = 0., oboty = 0.; 30*13319Ssam float scalex = 1., scaley = 1.; 31*13319Ssam 32*13319Ssam openpl () 33*13319Ssam { 34*13319Ssam int reset(); 35*13319Ssam xnow = ynow = 0; 36*13319Ssam OUTF = 1; 37*13319Ssam printf("\r"); 38*13319Ssam gtty(OUTF, &ITTY); 39*13319Ssam signal (2, reset); 40*13319Ssam PTTY = ITTY; 41*13319Ssam PTTY.sg_flags &= ~CRMOD; /* don't map lf */ 42*13319Ssam /* initialize constants */ 43*13319Ssam xscale = 4096./(HORZRESP * WIDTH); 44*13319Ssam yscale = 4096 /(VERTRESP * HEIGHT); 45*13319Ssam xoffset = OFFSET * HORZRESP; 46*13319Ssam return; 47*13319Ssam } 48*13319Ssam 49*13319Ssam openvt(){ 50*13319Ssam openpl(); 51*13319Ssam } 52