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__1 = 1;
18 static integer c__2 = 2;
19
20 /* ----------------------------------------------------------------------- */
21 /* UYPTMK : PLOT TICKMARKS */
22 /* ----------------------------------------------------------------------- */
23 /* Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
24 /* ----------------------------------------------------------------------- */
uyptmk_(char * cside,integer * islct,real * uy,integer * n,ftnlen cside_len)25 /* Subroutine */ int uyptmk_(char *cside, integer *islct, real *uy, integer *
26 n, ftnlen cside_len)
27 {
28 /* System generated locals */
29 address a__1[2];
30 integer i__1[2];
31 real r__1;
32 char ch__1[6], ch__2[7];
33
34 /* Builtin functions */
35 integer s_wsfi(icilist *), do_fio(integer *, char *, ftnlen), e_wsfi(void)
36 ;
37 /* Subroutine */ int s_cat(char *, char **, integer *, integer *, ftnlen);
38 integer i_sign(integer *, integer *);
39
40 /* Local variables */
41 static integer jsgn;
42 static real uxmn, uymn, posx, uxmx, uymx;
43 static integer iflag, index;
44 static char cslct[1];
45 static integer inner;
46 static real rtick, roffy, rofgy, rsize;
47 extern logical lchreq_(char *, char *, ftnlen, ftnlen);
48 extern /* Subroutine */ int msgdmp_(char *, char *, char *, ftnlen,
49 ftnlen, ftnlen);
50 extern logical luychk_(char *, ftnlen);
51 extern /* Subroutine */ int sgqwnd_(real *, real *, real *, real *),
52 uziget_(char *, integer *, ftnlen), uzrget_(char *, real *,
53 ftnlen), uzrset_(char *, real *, ftnlen), uyptmz_(real *, integer
54 *, real *, real *, real *, integer *);
55
56 /* Fortran I/O blocks */
57 static icilist io___2 = { 0, cslct, 0, "(I1)", 1, 1 };
58
59
60 /* Parameter adjustments */
61 --uy;
62
63 /* Function Body */
64 if (! luychk_(cside, (ftnlen)1)) {
65 msgdmp_("E", "UYPTMK", "SIDE PARAMETER IS INVALID.", (ftnlen)1, (
66 ftnlen)6, (ftnlen)26);
67 }
68 if (! (0 <= *islct && *islct <= 2)) {
69 msgdmp_("E", "UYPTMK", "'ISLCT' IS INVALID.", (ftnlen)1, (ftnlen)6, (
70 ftnlen)19);
71 }
72 if (*n <= 0) {
73 msgdmp_("E", "UYPTMK", "NUMBER OF POINTS IS INVALID.", (ftnlen)1, (
74 ftnlen)6, (ftnlen)28);
75 }
76 s_wsfi(&io___2);
77 do_fio(&c__1, (char *)&(*islct), (ftnlen)sizeof(integer));
78 e_wsfi();
79 /* Writing concatenation */
80 i__1[0] = 5, a__1[0] = "ROFFY";
81 i__1[1] = 1, a__1[1] = cside;
82 s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)6);
83 uzrget_(ch__1, &roffy, (ftnlen)6);
84 /* Writing concatenation */
85 i__1[0] = 5, a__1[0] = "ROFGY";
86 i__1[1] = 1, a__1[1] = cside;
87 s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)6);
88 uzrget_(ch__1, &rofgy, (ftnlen)6);
89 /* Writing concatenation */
90 i__1[0] = 6, a__1[0] = "INDEXT";
91 i__1[1] = 1, a__1[1] = cslct;
92 s_cat(ch__2, a__1, i__1, &c__2, (ftnlen)7);
93 uziget_(ch__2, &index, (ftnlen)7);
94 /* Writing concatenation */
95 i__1[0] = 6, a__1[0] = "RSIZET";
96 i__1[1] = 1, a__1[1] = cslct;
97 s_cat(ch__2, a__1, i__1, &c__2, (ftnlen)7);
98 uzrget_(ch__2, &rsize, (ftnlen)7);
99 uziget_("INNER", &inner, (ftnlen)5);
100 jsgn = i_sign(&c__1, &inner);
101 if (! lchreq_(cside, "U", (ftnlen)1, (ftnlen)1)) {
102 sgqwnd_(&uxmn, &uxmx, &uymn, &uymx);
103 if (lchreq_(cside, "L", (ftnlen)1, (ftnlen)1)) {
104 posx = uxmn;
105 iflag = -1;
106 } else {
107 posx = uxmx;
108 iflag = 1;
109 }
110 } else {
111 uzrget_("UXUSER", &posx, (ftnlen)6);
112 uziget_("IFLAG", &iflag, (ftnlen)5);
113 iflag = i_sign(&c__1, &iflag);
114 }
115 rtick = -rsize * jsgn * iflag;
116 if (iflag >= 0) {
117 /* Computing MAX */
118 r__1 = rofgy + rtick;
119 roffy = max(r__1,roffy);
120 } else {
121 /* Computing MIN */
122 r__1 = rofgy + rtick;
123 roffy = min(r__1,roffy);
124 }
125 uyptmz_(&uy[1], n, &posx, &rofgy, &rtick, &index);
126 /* Writing concatenation */
127 i__1[0] = 5, a__1[0] = "ROFFY";
128 i__1[1] = 1, a__1[1] = cside;
129 s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)6);
130 uzrset_(ch__1, &roffy, (ftnlen)6);
131 return 0;
132 } /* uyptmk_ */
133
134