1 /* setw.f -- translated by f2c (version 19961017).
2    You must link the resulting object file with the libraries:
3 	-lf2c -lm   (in that order)
4 */
5 
6 #include "f2c.h"
7 
8 /* Common Block Declarations */
9 
10 extern struct {
11     real xpgmin, ypgmin, xpgmax, ypgmax, xclbot, yclbot, xcltop, ycltop, xbot,
12 	     ybot, xtop, ytop, xmin, ymin, xmax, ymax;
13     integer ixcoor, iycoor;
14     real alphxx, betaxx, alphyy, betayy, tmajx, tminx, tmajy, tminy;
15     integer majrx, minrx, majry, minry, isizx, isizy;
16     real xphold, yphold;
17 } zzzplt_;
18 
19 #define zzzplt_1 zzzplt_
20 
21 extern struct {
22     real xphmax, yphmax;
23     integer ixpmax, iypmax;
24     real xpscal, ypscal;
25     integer iflip, nplotr;
26     char cfile[64];
27 } zzpltr_;
28 
29 #define zzpltr_1 zzpltr_
30 
31 
32 
33 
setw_(real * x1,real * y1,real * x2,real * y2)34 /* Subroutine */ int setw_(real *x1, real *y1, real *x2, real *y2)
35 {
36 
37 /*  Set the clipping rectangle (physical coords). */
38 /* .......................................................................
39  */
40 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
41  */
42 
43 /*  Internal Data for PLOTPAK */
44 
45     if (*x1 >= *x2) {
46 	zzzplt_1.xclbot = zzzplt_1.xpgmin;
47 	zzzplt_1.xcltop = zzzplt_1.xpgmax;
48     } else {
49 	zzzplt_1.xclbot = dmax(*x1,zzzplt_1.xpgmin);
50 	zzzplt_1.xcltop = dmin(*x2,zzzplt_1.xpgmax);
51     }
52 
53     if (*y1 >= *y2) {
54 	zzzplt_1.yclbot = zzzplt_1.ypgmin;
55 	zzzplt_1.ycltop = zzzplt_1.ypgmax;
56     } else {
57 	zzzplt_1.yclbot = dmax(*y1,zzzplt_1.ypgmin);
58 	zzzplt_1.ycltop = dmin(*y2,zzzplt_1.ypgmax);
59     }
60 
61     return 0;
62 } /* setw_ */
63 
64