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 real c_b6 = .5f;
21 static real c_b7 = .9f;
22 static real c_b9 = .04f;
23 static integer c__0 = 0;
24 static real c_b18 = .1f;
25 static real c_b19 = .02f;
26 static integer c_n1 = -1;
27 static real c_b26 = .015f;
28 static integer c__2 = 2;
29
30 /* ----------------------------------------------------------------------- */
31 /* Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
32 /* ----------------------------------------------------------------------- */
MAIN__(void)33 /* Main program */ int MAIN__(void)
34 {
35 /* System generated locals */
36 address a__1[3];
37 integer i__1[3];
38 real r__1;
39 char ch__1[18];
40
41 /* Builtin functions */
42 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
43 e_wsle(void), s_rsle(cilist *), e_rsle(void);
44 /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
45 integer s_wsfi(icilist *), do_fio(integer *, char *, ftnlen), e_wsfi(void)
46 ;
47 /* Subroutine */ int s_cat(char *, char **, integer *, integer *, ftnlen);
48
49 /* Local variables */
50 static integer i__;
51 static real x[2], y[2];
52 static integer iws;
53 static char cpat[16], cttl[16];
54 extern /* Subroutine */ int sgcls_(void), sgfrm_(void), sgopn_(integer *);
55 static integer itype;
56 extern /* Subroutine */ int bitpci_(char *, integer *, ftnlen), sgsplt_(
57 integer *), sgpwsn_(void), sgplzv_(integer *, real *, real *,
58 integer *, integer *), sgtxzv_(real *, real *, char *, real *,
59 integer *, integer *, integer *, ftnlen);
60
61 /* Fortran I/O blocks */
62 static cilist io___1 = { 0, 6, 0, 0, 0 };
63 static cilist io___2 = { 0, 5, 0, 0, 0 };
64 static icilist io___9 = { 0, cttl+8, 0, "(I5)", 5, 1 };
65
66
67 s_wsle(&io___1);
68 do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ;", (ftnlen)24);
69 e_wsle();
70 sgpwsn_();
71 s_rsle(&io___2);
72 do_lio(&c__3, &c__1, (char *)&iws, (ftnlen)sizeof(integer));
73 e_rsle();
74 sgopn_(&iws);
75 sgfrm_();
76 sgtxzv_(&c_b6, &c_b7, "LINE TYPE", &c_b9, &c__0, &c__0, &c__3, (ftnlen)9);
77 x[0] = .4f;
78 x[1] = .8f;
79 for (i__ = 1; i__ <= 5; ++i__) {
80 if (1 <= i__ && i__ <= 4) {
81 itype = i__;
82 } else {
83 s_copy(cpat, "0011111111001001", (ftnlen)16, (ftnlen)16);
84 bitpci_(cpat, &itype, (ftnlen)16);
85 sgsplt_(&itype);
86 }
87 s_copy(cttl, "ITYPE = #####", (ftnlen)16, (ftnlen)13);
88 s_wsfi(&io___9);
89 do_fio(&c__1, (char *)&itype, (ftnlen)sizeof(integer));
90 e_wsfi();
91 y[0] = .7f - (i__ - 1) * .12f;
92 y[1] = y[0];
93 sgtxzv_(&c_b18, y, cttl, &c_b19, &c__0, &c_n1, &c__3, (ftnlen)16);
94 if (i__ == 5) {
95 r__1 = y[0] - .05f;
96 /* Writing concatenation */
97 i__1[0] = 1, a__1[0] = "(";
98 i__1[1] = 16, a__1[1] = cpat;
99 i__1[2] = 1, a__1[2] = ")";
100 s_cat(ch__1, a__1, i__1, &c__3, (ftnlen)18);
101 sgtxzv_(&c_b18, &r__1, ch__1, &c_b26, &c__0, &c_n1, &c__3, (
102 ftnlen)18);
103 }
104 sgplzv_(&c__2, x, y, &itype, &c__3);
105 /* L10: */
106 }
107 sgcls_();
108 return 0;
109 } /* MAIN__ */
110
sgltyp_()111 /* Main program alias */ int sgltyp_ () { MAIN__ (); return 0; }
112