1*48522Sbostic /*- 2*48522Sbostic * Copyright (c) 1983 The Regents of the University of California. 3*48522Sbostic * All rights reserved. 4*48522Sbostic * 5*48522Sbostic * %sccs.include.proprietary.c% 6*48522Sbostic */ 7*48522Sbostic 813336Ssam #ifndef lint 9*48522Sbostic static char sccsid[] = "@(#)open.c 4.2 (Berkeley) 04/22/91"; 10*48522Sbostic #endif /* not lint */ 1113336Ssam 1213336Ssam #include <sgtty.h> 1313336Ssam /* gsi plotting output routines */ 1413336Ssam # define DOWN 012 1513336Ssam # define UP 013 1613336Ssam # define LEFT 010 1713336Ssam # define RIGHT 040 1813336Ssam # define BEL 007 1913336Ssam # define ACK 006 2013336Ssam # define CR 015 2113336Ssam # define FF 014 2213336Ssam # define VERTRESP 48 2313336Ssam # define HORZRESP 60. 2413336Ssam # define HORZRES 6. 2513336Ssam # define VERTRES 8. 2613336Ssam /* down is line feed, up is reverse oyne feed, 2713336Ssam left is bwckspace, right is space. 48 points per inch 2813336Ssam vertically, 60 horizontally */ 2913336Ssam 3013336Ssam int xnow, ynow; 3113336Ssam int OUTF; 3213336Ssam struct sgttyb ITTY, PTTY; 3313336Ssam float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0; 3413336Ssam int xscale, xoffset, yscale; 3513336Ssam float botx = 0., boty = 0., obotx = 0., oboty = 0.; 3613336Ssam float scalex = 1., scaley = 1.; 3713336Ssam 3813336Ssam openpl () 3913336Ssam { 4013336Ssam int reset(); 4113336Ssam xnow = ynow = 0; 4213336Ssam OUTF = 1; 4313336Ssam printf("\r"); 4413336Ssam gtty(OUTF, &ITTY); 4513336Ssam signal (2, reset); 4613336Ssam PTTY = ITTY; 4713336Ssam PTTY.sg_flags &= ~CRMOD; /* don't map lf */ 4813336Ssam /* initialize constants */ 4913336Ssam xscale = 4096./(HORZRESP * WIDTH); 5013336Ssam yscale = 4096 /(VERTRESP * HEIGHT); 5113336Ssam xoffset = OFFSET * HORZRESP; 5213336Ssam return; 5313336Ssam } 5413336Ssam 5513336Ssam openvt(){ 5613336Ssam openpl(); 5713336Ssam } 58