xref: /csrg-svn/lib/libplot/hp7221/open.c (revision 48518)
1*48518Sbostic /*-
2*48518Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*48518Sbostic  * All rights reserved.
4*48518Sbostic  *
5*48518Sbostic  * %sccs.include.proprietary.c%
619978Sdist  */
719978Sdist 
815475Sralph #ifndef lint
9*48518Sbostic static char sccsid[] = "@(#)open.c	5.3 (Berkeley) 04/22/91";
10*48518Sbostic #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
16*48518Sbostic  *
17*48518Sbostic  * Requires a handshaking program such as hp7221cat to get the plotter
18*48518Sbostic  * 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 
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