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_b14 = .85f;
24 static real c_b15 = 1.f;
25 static real c_b16 = 0.f;
26 static real c_b18 = .05f;
27 static real c_b19 = .1f;
28 static real c_b23 = -.5f;
29 static real c_b24 = .025f;
30 static integer c__5 = 5;
31 static real c_b39 = .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 level;
58     extern /* Subroutine */ int sgcls_(void), sgfrm_(void), slmgn_(real *,
59 	    real *, real *, real *), slrat_(real *, real *), sgopn_(integer *)
60 	    , gliset_(char *, integer *, ftnlen), sgiset_(char *, integer *,
61 	    ftnlen), sglset_(char *, logical *, ftnlen), sgswnd_(real *, real
62 	    *, real *, real *), sgstrf_(void), sgstrn_(integer *), sgpwsn_(
63 	    void), sgplzu_(integer *, real *, real *, integer *, integer *),
64 	    slsttl_(char *, char *, real *, real *, real *, integer *, ftnlen,
65 	     ftnlen), sgsvpt_(real *, real *, real *, real *), sgtnzu_(
66 	    integer *, real *, real *, integer *), sgtxzv_(real *, real *,
67 	    char *, real *, integer *, integer *, integer *, ftnlen);
68 
69     /* Fortran I/O blocks */
70     static cilist io___3 = { 0, 6, 0, 0, 0 };
71     static cilist io___4 = { 0, 5, 0, 0, 0 };
72     static icilist io___14 = { 0, chr, 0, "(I5)", 5, 1 };
73 
74 
75     s_wsle(&io___3);
76     do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ; ", (ftnlen)24);
77     e_wsle();
78     sgpwsn_();
79     s_rsle(&io___4);
80     do_lio(&c__3, &c__1, (char *)&iw, (ftnlen)sizeof(integer));
81     e_rsle();
82     gliset_("MAXMSG", &c__300, (ftnlen)6);
83     sgopn_(&iw);
84     sglset_("LFULL", &c_true, (ftnlen)5);
85     sglset_("LSOFTF", &c_false, (ftnlen)6);
86     sgiset_("INDEX", &c__1, (ftnlen)5);
87     slrat_(&c_b14, &c_b15);
88     slmgn_(&c_b16, &c_b16, &c_b18, &c_b19);
89     slsttl_("TEST OF SGTONE", "T", &c_b16, &c_b23, &c_b24, &c__1, (ftnlen)14,
90 	    (ftnlen)1);
91     sgfrm_();
92     sgswnd_(&c_b16, &c_b15, &c_b16, &c_b15);
93     sgstrn_(&c__1);
94     for (j = 0; j <= 9; ++j) {
95 	for (i__ = 0; i__ <= 9; ++i__) {
96 	    x1 = i__ * .076000000000000012f + .003f + .11999999999999994f;
97 	    x2 = x1 + .07f;
98 	    y1 = (9 - j) * .10000000000000001f + .003f;
99 	    y2 = y1 + .07f;
100 	    level = (i__ + j * 10) * 1000 + 999;
101 	    sgsvpt_(&x1, &x2, &y1, &y2);
102 	    sgstrf_();
103 	    s_wsfi(&io___14);
104 	    do_fio(&c__1, (char *)&level, (ftnlen)sizeof(integer));
105 	    e_wsfi();
106 	    sgtnzu_(&c__5, xbox, ybox, &level);
107 	    sgplzu_(&c__5, xbox, ybox, &c__1, &c__1);
108 	    r__1 = y2 + .014999999999999999f;
109 	    sgtxzv_(&x2, &r__1, chr, &c_b39, &c__0, &c__1, &c__1, (ftnlen)5);
110 /* L10: */
111 	}
112 /* L20: */
113     }
114     sgcls_();
115     return 0;
116 } /* MAIN__ */
117 
sgtclr_()118 /* Main program alias */ int sgtclr_ () { MAIN__ (); return 0; }
119