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 logical c_false = FALSE_;
23 static real c_b15 = .85f;
24 static real c_b16 = 1.f;
25 static real c_b17 = 0.f;
26 static real c_b19 = .05f;
27 static real c_b20 = .1f;
28 static real c_b24 = -.5f;
29 static real c_b25 = .025f;
30 static integer c__5 = 5;
31 static real c_b40 = .01f;
32 static integer c__0 = 0;
33 
34 /* ----------------------------------------------------------------------- */
35 /*     Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
36 /* ----------------------------------------------------------------------- */
MAIN__(void)37 /* Main program */ int MAIN__(void)
38 {
39     /* Initialized data */
40 
41     static real xbox[5] = { 0.f,1.f,1.f,0.f,0.f };
42     static real ybox[5] = { 0.f,0.f,1.f,1.f,0.f };
43 
44     /* System generated locals */
45     real r__1;
46 
47     /* Builtin functions */
48     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
49 	    e_wsle(void), s_rsle(cilist *), e_rsle(void), s_wsfi(icilist *),
50 	    do_fio(integer *, char *, ftnlen), e_wsfi(void);
51 
52     /* Local variables */
53     static integer i__, j;
54     static real x1, x2, y1, y2;
55     static integer iw;
56     static char chr[5];
57     static integer iclr, level;
58     extern /* Subroutine */ int sgcls_(void), sgfrm_(void), slmgn_(real *,
59 	    real *, real *, real *), slrat_(real *, real *), sgopn_(integer *)
60 	    ;
61     static integer ibgcli;
62     extern /* Subroutine */ int sgiget_(char *, integer *, ftnlen), gliset_(
63 	    char *, integer *, ftnlen), sgiset_(char *, integer *, ftnlen),
64 	    sglset_(char *, logical *, ftnlen);
65     static integer levelz;
66     extern /* Subroutine */ int sgswnd_(real *, real *, real *, real *),
67 	    sgstrf_(void), sgstrn_(integer *), sgpwsn_(void), sgplzu_(integer
68 	    *, real *, real *, integer *, integer *), slsttl_(char *, char *,
69 	    real *, real *, real *, integer *, ftnlen, ftnlen), sgsvpt_(real *
70 	    , real *, real *, real *), sgtnzu_(integer *, real *, real *,
71 	    integer *), sgtxzv_(real *, real *, char *, real *, integer *,
72 	    integer *, integer *, ftnlen);
73 
74     /* Fortran I/O blocks */
75     static cilist io___3 = { 0, 6, 0, 0, 0 };
76     static cilist io___4 = { 0, 5, 0, 0, 0 };
77     static icilist io___17 = { 0, chr, 0, "(I5)", 5, 1 };
78 
79 
80     s_wsle(&io___3);
81     do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ; ", (ftnlen)24);
82     e_wsle();
83     sgpwsn_();
84     s_rsle(&io___4);
85     do_lio(&c__3, &c__1, (char *)&iw, (ftnlen)sizeof(integer));
86     e_rsle();
87     gliset_("MAXMSG", &c__300, (ftnlen)6);
88     sgopn_(&iw);
89     sgiget_("IBGCLI", &ibgcli, (ftnlen)6);
90     sglset_("LFULL", &c_true, (ftnlen)5);
91     sglset_("LSOFTF", &c_false, (ftnlen)6);
92     sgiset_("INDEX", &c__1, (ftnlen)5);
93     slrat_(&c_b15, &c_b16);
94     slmgn_(&c_b17, &c_b17, &c_b19, &c_b20);
95     slsttl_("TEST OF SGTONE", "T", &c_b17, &c_b24, &c_b25, &c__1, (ftnlen)14,
96 	    (ftnlen)1);
97     sgfrm_();
98     sgswnd_(&c_b17, &c_b16, &c_b17, &c_b16);
99     sgstrn_(&c__1);
100     for (j = 0; j <= 9; ++j) {
101 	for (i__ = 0; i__ <= 9; ++i__) {
102 	    x1 = i__ * .076000000000000012f + .003f + .11999999999999994f;
103 	    x2 = x1 + .07f;
104 	    y1 = (9 - j) * .10000000000000001f + .003f;
105 	    y2 = y1 + .07f;
106 	    iclr = i__ + j * 10;
107 	    level = iclr * 1000 + 999;
108 	    if (iclr == 0) {
109 		iclr = ibgcli;
110 	    }
111 	    levelz = iclr * 1000 + 999;
112 	    sgsvpt_(&x1, &x2, &y1, &y2);
113 	    sgstrf_();
114 	    s_wsfi(&io___17);
115 	    do_fio(&c__1, (char *)&level, (ftnlen)sizeof(integer));
116 	    e_wsfi();
117 	    sgtnzu_(&c__5, xbox, ybox, &levelz);
118 	    sgplzu_(&c__5, xbox, ybox, &c__1, &c__1);
119 	    r__1 = y2 + .014999999999999999f;
120 	    sgtxzv_(&x2, &r__1, chr, &c_b40, &c__0, &c__1, &c__1, (ftnlen)5);
121 /* L10: */
122 	}
123 /* L20: */
124     }
125     sgcls_();
126     return 0;
127 } /* MAIN__ */
128 
sgtclr_()129 /* Main program alias */ int sgtclr_ () { MAIN__ (); return 0; }
130