xref: /original-bsd/lib/libplot/gigi/open.c (revision c3e32dec)
1 /*-
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)open.c	8.1 (Berkeley) 06/04/93";
10 #endif /* not lint */
11 
12 /*
13  * Displays plot files on a gigi "graphics" terminal.
14  */
15 
16 #include <signal.h>
17 #include "gigi.h"
18 
19 int currentx = 0;
20 int currenty = 0;
21 double lowx = 0.0;
22 double lowy = 0.0;
23 double scalex = 1.0;
24 double scaley = 1.0;
25 
26 openpl()
27 {
28 	void closepl();
29 
30 	/* catch interupts */
31 	signal(SIGINT, closepl);
32 	currentx = 0;
33 	currenty = 0;
34 	/* enter grapics mode */
35 	putchar(ESC); putchar('P'); putchar('p');
36 
37 	/* set some parameters */
38 	printf("S(I0 T0 [0,0])");
39 
40 	space(0, 0, XMAX, YMAX);
41 }
42