BSD 4_3_Reno release
[unix-history] / usr / src / lib / libplot / t450 / open.c
CommitLineData
3b2a4433 1#ifndef lint
0f4556f1 2static char sccsid[] = "@(#)open.c 4.1 (Berkeley) 6/27/83";
3b2a4433
SL
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 PLOTIN 063
15#define PLOTOUT 064
16# define CR 015
17# define FF 014
18# define VERTRESP 48
19# define HORZRESP 60.
20# define HORZRES 6.
21# define VERTRES 8.
22/* down is line feed, up is reverse oyne feed,
23 left is bwckspace, right is space. 48 points per inch
24 vertically, 60 horizontally */
25
26int xnow, ynow;
27int OUTF;
28struct sgttyb ITTY, PTTY;
29float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0;
30int xscale, xoffset, yscale;
31float botx = 0., boty = 0., obotx = 0., oboty = 0.;
32float scalex = 1., scaley = 1.;
33
34openpl ()
35{
36 int reset();
37 xnow = ynow = 0;
38 OUTF = 1;
39 printf("\r");
40 gtty(OUTF, &ITTY);
41 signal (2, reset);
42 PTTY = ITTY;
43 PTTY.sg_flags &= ~CRMOD; /* don't map lf */
44 stty(OUTF,&PTTY);
45 /* initialize constants */
46 xscale = 4096./(HORZRESP * WIDTH);
47 yscale = 4096 /(VERTRESP * HEIGHT);
48 xoffset = OFFSET * HORZRESP;
49 return;
50}
51
52openvt(){
53openpl();
54}