xref: /csrg-svn/lib/libplot/gigi/open.c (revision 61388)
148508Sbostic /*-
2*61388Sbostic  * Copyright (c) 1980, 1993
3*61388Sbostic  *	The Regents of the University of California.  All rights reserved.
448508Sbostic  *
548508Sbostic  * %sccs.include.proprietary.c%
619974Sdist  */
719974Sdist 
815494Sralph #ifndef lint
9*61388Sbostic static char sccsid[] = "@(#)open.c	8.1 (Berkeley) 06/04/93";
1048508Sbostic #endif /* not lint */
1115494Sralph 
1215494Sralph /*
1315494Sralph  * Displays plot files on a gigi "graphics" terminal.
1415494Sralph  */
1515494Sralph 
1615494Sralph #include <signal.h>
1715494Sralph #include "gigi.h"
1815494Sralph 
1915494Sralph int currentx = 0;
2015494Sralph int currenty = 0;
2115494Sralph double lowx = 0.0;
2215494Sralph double lowy = 0.0;
2315494Sralph double scalex = 1.0;
2415494Sralph double scaley = 1.0;
2515494Sralph 
openpl()2615494Sralph openpl()
2715494Sralph {
2846636Sbostic 	void closepl();
2915494Sralph 
3015494Sralph 	/* catch interupts */
3115494Sralph 	signal(SIGINT, closepl);
3215494Sralph 	currentx = 0;
3315494Sralph 	currenty = 0;
3415494Sralph 	/* enter grapics mode */
3515494Sralph 	putchar(ESC); putchar('P'); putchar('p');
3615494Sralph 
3715494Sralph 	/* set some parameters */
3815494Sralph 	printf("S(I0 T0 [0,0])");
3915494Sralph 
4015494Sralph 	space(0, 0, XMAX, YMAX);
4115494Sralph }
42