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