xref: /csrg-svn/lib/libplot/gigi/open.c (revision 19974)
1*19974Sdist /*
2*19974Sdist  * Copyright (c) 1980 Regents of the University of California.
3*19974Sdist  * All rights reserved.  The Berkeley software License Agreement
4*19974Sdist  * specifies the terms and conditions for redistribution.
5*19974Sdist  */
6*19974Sdist 
715494Sralph #ifndef lint
8*19974Sdist static char sccsid[] = "@(#)open.c	5.1 (Berkeley) 05/07/85";
9*19974Sdist #endif not lint
1015494Sralph 
1115494Sralph /*
1215494Sralph  * Displays plot files on a gigi "graphics" terminal.
1315494Sralph  */
1415494Sralph 
1515494Sralph #include <signal.h>
1615494Sralph #include "gigi.h"
1715494Sralph 
1815494Sralph int currentx = 0;
1915494Sralph int currenty = 0;
2015494Sralph double lowx = 0.0;
2115494Sralph double lowy = 0.0;
2215494Sralph double scalex = 1.0;
2315494Sralph double scaley = 1.0;
2415494Sralph 
2515494Sralph openpl()
2615494Sralph {
2715494Sralph 	int closepl();
2815494Sralph 
2915494Sralph 	/* catch interupts */
3015494Sralph 	signal(SIGINT, closepl);
3115494Sralph 	currentx = 0;
3215494Sralph 	currenty = 0;
3315494Sralph 	/* enter grapics mode */
3415494Sralph 	putchar(ESC); putchar('P'); putchar('p');
3515494Sralph 
3615494Sralph 	/* set some parameters */
3715494Sralph 	printf("S(I0 T0 [0,0])");
3815494Sralph 
3915494Sralph 	space(0, 0, XMAX, YMAX);
4015494Sralph }
41