xref: /original-bsd/lib/libplot/hp7221/open.c (revision a1c2194a)
1 /*-
2  * Copyright (c) 1980 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)open.c	5.3 (Berkeley) 04/22/91";
10 #endif /* not lint */
11 
12 /*
13  * Displays plot files on an HP7221 plotter.
14  * Cloned from bgplot.c and gigiplot.c by Jim Kleckner
15  * Thu Jun 30 13:35:04 PDT 1983
16  *
17  * Requires a handshaking program such as hp7221cat to get the plotter
18  * open and ready.
19  */
20 
21 #include <signal.h>
22 #include "hp7221.h"
23 
24 int currentx = 0;
25 int currenty = 0;
26 double lowx = 0.0;
27 double lowy = 0.0;
28 double scale = 1.0;
29 
30 openpl()
31 {
32 	void closepl();
33 
34 	/* catch interupts */
35 	signal(SIGINT, closepl);
36 	currentx = 0;
37 	currenty = 0;
38 	printf( "~VR~W" );
39 	putMBP( 800, 2000 );
40 	putMBP( 7600, 9600 );
41 	printf( "~S" );
42 	putMBP( XMAX, YMAX );
43 	printf( "vA~*z" );
44 
45 	space(0,0,XMAX,YMAX);
46 }
47