148525Sbostic /*-
2*61412Sbostic * Copyright (c) 1983, 1993
3*61412Sbostic * The Regents of the University of California. All rights reserved.
448525Sbostic *
548525Sbostic * %sccs.include.proprietary.c%
648525Sbostic */
748525Sbostic
813371Ssam #ifndef lint
9*61412Sbostic static char sccsid[] = "@(#)open.c 8.1 (Berkeley) 06/04/93";
1048525Sbostic #endif /* not lint */
1113371Ssam
1213371Ssam #include <sgtty.h>
1313371Ssam /* gsi plotting output routines */
1413371Ssam # define DOWN 012
1513371Ssam # define UP 013
1613371Ssam # define LEFT 010
1713371Ssam # define RIGHT 040
1813371Ssam # define BEL 007
1913371Ssam # define ACK 006
2013371Ssam #define PLOTIN 063
2113371Ssam #define PLOTOUT 064
2213371Ssam # define CR 015
2313371Ssam # define FF 014
2413371Ssam # define VERTRESP 48
2513371Ssam # define HORZRESP 60.
2613371Ssam # define HORZRES 6.
2713371Ssam # define VERTRES 8.
2813371Ssam /* down is line feed, up is reverse oyne feed,
2913371Ssam left is bwckspace, right is space. 48 points per inch
3013371Ssam vertically, 60 horizontally */
3113371Ssam
3213371Ssam int xnow, ynow;
3313371Ssam int OUTF;
3413371Ssam struct sgttyb ITTY, PTTY;
3513371Ssam float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0;
3613371Ssam int xscale, xoffset, yscale;
3713371Ssam float botx = 0., boty = 0., obotx = 0., oboty = 0.;
3813371Ssam float scalex = 1., scaley = 1.;
3913371Ssam
openpl()4013371Ssam openpl ()
4113371Ssam {
4213371Ssam int reset();
4313371Ssam xnow = ynow = 0;
4413371Ssam OUTF = 1;
4513371Ssam printf("\r");
4613371Ssam gtty(OUTF, &ITTY);
4713371Ssam signal (2, reset);
4813371Ssam PTTY = ITTY;
4913371Ssam PTTY.sg_flags &= ~CRMOD; /* don't map lf */
5013371Ssam stty(OUTF,&PTTY);
5113371Ssam /* initialize constants */
5213371Ssam xscale = 4096./(HORZRESP * WIDTH);
5313371Ssam yscale = 4096 /(VERTRESP * HEIGHT);
5413371Ssam xoffset = OFFSET * HORZRESP;
5513371Ssam return;
5613371Ssam }
5713371Ssam
openvt()5813371Ssam openvt(){
5913371Ssam openpl();
6013371Ssam }
61