xref: /csrg-svn/lib/libplot/hp7221/open.c (revision 61395)
148518Sbostic /*-
2*61395Sbostic  * Copyright (c) 1980, 1993
3*61395Sbostic  *	The Regents of the University of California.  All rights reserved.
448518Sbostic  *
548518Sbostic  * %sccs.include.proprietary.c%
619978Sdist  */
719978Sdist 
815475Sralph #ifndef lint
9*61395Sbostic static char sccsid[] = "@(#)open.c	8.1 (Berkeley) 06/04/93";
1048518Sbostic #endif /* not lint */
1115475Sralph 
1215475Sralph /*
1315475Sralph  * Displays plot files on an HP7221 plotter.
1415475Sralph  * Cloned from bgplot.c and gigiplot.c by Jim Kleckner
1515475Sralph  * Thu Jun 30 13:35:04 PDT 1983
1648518Sbostic  *
1748518Sbostic  * Requires a handshaking program such as hp7221cat to get the plotter
1848518Sbostic  * open and ready.
1915475Sralph  */
2015475Sralph 
2115475Sralph #include <signal.h>
2215475Sralph #include "hp7221.h"
2315475Sralph 
2415475Sralph int currentx = 0;
2515475Sralph int currenty = 0;
2615475Sralph double lowx = 0.0;
2715475Sralph double lowy = 0.0;
2815475Sralph double scale = 1.0;
2915475Sralph 
openpl()3015475Sralph openpl()
3115475Sralph {
3246637Sbostic 	void closepl();
3315475Sralph 
3415475Sralph 	/* catch interupts */
3515475Sralph 	signal(SIGINT, closepl);
3615475Sralph 	currentx = 0;
3715475Sralph 	currenty = 0;
3815475Sralph 	printf( "~VR~W" );
3915475Sralph 	putMBP( 800, 2000 );
4015475Sralph 	putMBP( 7600, 9600 );
4115475Sralph 	printf( "~S" );
4215475Sralph 	putMBP( XMAX, YMAX );
4315475Sralph 	printf( "vA~*z" );
4415475Sralph 
4515475Sralph 	space(0,0,XMAX,YMAX);
4615475Sralph }
47