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