1 /*  -- translated by f2c (version 20100827).
2    You must link the resulting object file with libf2c:
3 	on Microsoft Windows system, link with libf2c.lib;
4 	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 	or, if you install libf2c.a in a standard place, with -lf2c -lm
6 	-- in that order, at the end of the command line, as in
7 		cc *.o -lf2c -lm
8 	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9 
10 		http://www.netlib.org/f2c/libf2c.zip
11 */
12 
13 #include "libtinyf2c.h"
14 
15 /* Table of constant values */
16 
17 static integer c__9 = 9;
18 static integer c__1 = 1;
19 static integer c__3 = 3;
20 static integer c__300 = 300;
21 static logical c_true = TRUE_;
22 static real c_b10 = .85f;
23 static real c_b11 = 1.f;
24 static real c_b12 = 0.f;
25 static real c_b14 = .05f;
26 static real c_b15 = .1f;
27 static real c_b19 = -.5f;
28 static real c_b20 = .025f;
29 static real c_b27 = .01f;
30 static integer c__4 = 4;
31 
32 /* ----------------------------------------------------------------------- */
33 /*     Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
34 /* ----------------------------------------------------------------------- */
MAIN__(void)35 /* Main program */ int MAIN__(void)
36 {
37     /* Initialized data */
38 
39     static real xbox[4] = { 0.f,1.f,1.f,0.f };
40     static real ybox[4] = { 0.f,0.f,1.f,1.f };
41 
42     /* System generated locals */
43     integer i__1;
44     real r__1;
45 
46     /* Builtin functions */
47     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
48 	    e_wsle(void), s_rsle(cilist *), e_rsle(void), s_wsfi(icilist *),
49 	    do_fio(integer *, char *, ftnlen), e_wsfi(void);
50 
51     /* Local variables */
52     static integer i__, j;
53     static real x1, y1, x2, y2;
54     static integer ibc;
55     static char chr[5];
56     static integer iws;
57     extern /* Subroutine */ int sgcls_(void), sgfrm_(void), slmgn_(real *,
58 	    real *, real *, real *);
59     static integer itpat;
60     extern /* Subroutine */ int slrat_(real *, real *), sgopn_(integer *),
61 	    sgtnu_(integer *, real *, real *), sgtxv_(real *, real *, char *,
62 	    ftnlen), sgiget_(char *, integer *, ftnlen), gliset_(char *,
63 	    integer *, ftnlen), sglset_(char *, logical *, ftnlen), sgswnd_(
64 	    real *, real *, real *, real *), sgstrf_(void), sgstxc_(integer *)
65 	    , sgstnp_(integer *), sgstrn_(integer *), sgpwsn_(void), slsttl_(
66 	    char *, char *, real *, real *, real *, integer *, ftnlen, ftnlen)
67 	    , sgsvpt_(real *, real *, real *, real *), slpvpr_(integer *),
68 	    sgstxs_(real *);
69 
70     /* Fortran I/O blocks */
71     static cilist io___3 = { 0, 6, 0, 0, 0 };
72     static cilist io___4 = { 0, 5, 0, 0, 0 };
73     static icilist io___14 = { 0, chr, 0, "(I5)", 5, 1 };
74 
75 
76     s_wsle(&io___3);
77     do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ; ", (ftnlen)24);
78     e_wsle();
79     sgpwsn_();
80     s_rsle(&io___4);
81     do_lio(&c__3, &c__1, (char *)&iws, (ftnlen)sizeof(integer));
82     e_rsle();
83     gliset_("MAXMSG", &c__300, (ftnlen)6);
84     i__1 = -abs(iws);
85     sgopn_(&i__1);
86     sglset_("LFULL", &c_true, (ftnlen)5);
87     slrat_(&c_b10, &c_b11);
88     slmgn_(&c_b12, &c_b12, &c_b14, &c_b15);
89     slsttl_("TEST OF COLORMAP", "T", &c_b12, &c_b19, &c_b20, &c__1, (ftnlen)
90 	    16, (ftnlen)1);
91     sgfrm_();
92     sgswnd_(&c_b12, &c_b11, &c_b12, &c_b11);
93     sgstrn_(&c__1);
94     sgstxs_(&c_b27);
95     sgstxc_(&c__1);
96     for (j = 0; j <= 9; ++j) {
97 	for (i__ = 0; i__ <= 9; ++i__) {
98 	    x1 = i__ * .076000000000000012f + .003f + .11999999999999994f;
99 	    y1 = (9 - j) * .10000000000000001f + .003f;
100 	    x2 = x1 + .07f;
101 	    y2 = y1 + .07f;
102 	    itpat = (i__ + j * 10) * 1000 + 999;
103 	    sgsvpt_(&x1, &x2, &y1, &y2);
104 	    sgstrf_();
105 	    s_wsfi(&io___14);
106 	    do_fio(&c__1, (char *)&itpat, (ftnlen)sizeof(integer));
107 	    e_wsfi();
108 	    sgiget_("IBGCLI", &ibc, (ftnlen)6);
109 	    if (itpat == 999) {
110 		itpat = ibc * 1000 + 999;
111 	    }
112 	    slpvpr_(&c__1);
113 	    sgstnp_(&itpat);
114 	    sgtnu_(&c__4, xbox, ybox);
115 	    r__1 = y2 + .014999999999999999f;
116 	    sgtxv_(&x2, &r__1, chr, (ftnlen)5);
117 /* L10: */
118 	}
119     }
120     sgcls_();
121     return 0;
122 } /* MAIN__ */
123 
color1_()124 /* Main program alias */ int color1_ () { MAIN__ (); return 0; }
125