xref: /csrg-svn/lib/libplot/hp7221/open.c (revision 46637)
119978Sdist /*
219978Sdist  * Copyright (c) 1980 Regents of the University of California.
319978Sdist  * All rights reserved.  The Berkeley software License Agreement
419978Sdist  * specifies the terms and conditions for redistribution.
519978Sdist  */
619978Sdist 
715475Sralph #ifndef lint
8*46637Sbostic static char sccsid[] = "@(#)open.c	5.2 (Berkeley) 02/24/91";
919978Sdist #endif not lint
1015475Sralph 
1115475Sralph /*
1215475Sralph  * Displays plot files on an HP7221 plotter.
1315475Sralph  * Cloned from bgplot.c and gigiplot.c by Jim Kleckner
1415475Sralph  * Thu Jun 30 13:35:04 PDT 1983
1515475Sralph  *  Requires a handshaking program such as hp7221cat to get
1615475Sralph  *  the plotter open and ready.
1715475Sralph  */
1815475Sralph 
1915475Sralph #include <signal.h>
2015475Sralph #include "hp7221.h"
2115475Sralph 
2215475Sralph int currentx = 0;
2315475Sralph int currenty = 0;
2415475Sralph double lowx = 0.0;
2515475Sralph double lowy = 0.0;
2615475Sralph double scale = 1.0;
2715475Sralph 
2815475Sralph openpl()
2915475Sralph {
30*46637Sbostic 	void closepl();
3115475Sralph 
3215475Sralph 	/* catch interupts */
3315475Sralph 	signal(SIGINT, closepl);
3415475Sralph 	currentx = 0;
3515475Sralph 	currenty = 0;
3615475Sralph 	printf( "~VR~W" );
3715475Sralph 	putMBP( 800, 2000 );
3815475Sralph 	putMBP( 7600, 9600 );
3915475Sralph 	printf( "~S" );
4015475Sralph 	putMBP( XMAX, YMAX );
4115475Sralph 	printf( "vA~*z" );
4215475Sralph 
4315475Sralph 	space(0,0,XMAX,YMAX);
4415475Sralph }
45