Debian Codegraph @

packages/seacas/applications/blot/cmdleg.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 SUBROUTINE CMDLEG (INLINE, VERB, IFLD, INTYP, CFIELD, IFIELD,
9 & XYTYPE, MESHOK, DOQA, DOLEG, DOAXIS, DOBOX, CAPTN, *)
10 C=======================================================================
11
12 C --*** CMDLEG *** (BLOT) Process legend labeling command
13 C -- Written by Amy Gilkey - revised 04/21/88
14 C --
15 C --CMDLEG processes a legend labeling command. The commands are:
16 C -- QA - controls whether the QA information is to be drawn
17 C -- LEGEND - controls whether non-QA legend information is to be drawn
18 C -- AXIS - controls whether the axis is to be numbered
19 C -- CAPTION - sets the plot caption
20 C --
21 C --Parameters:
22 C -- INLINE - I/O - the parsed input lines for the log file
23 C -- VERB - I/O - the command verb; set for SHOW
24 C -- IFLD - I/O - the field number
25 C -- INTYP - IN - the input types from the free field reader
26 C -- CFIELD - IN - the character fields
27 C -- IFIELD - IN - the integer fields
28 C -- XYTYPE - IN - true iff curr program is an XY curve versus mesh plot
29 C -- MESHOK - IN - true iff mesh can be displayed
30 C -- DOQA - I/O - true iff QA information is to be drawn on legend
31 C -- (1) for mesh plots, (2) for curve plots
32 C -- DOLEG - I/O - true iff non-QA legend information is to be drawn
33 C -- (1) for mesh plots, (2) for curve plots
34 C -- DOAXIS - I/O - true iff axis is to be labeled
35 C -- (1) for mesh plots, (2) for curve plots
36 C -- CAPTN - I/O - the three-line plot caption
37 C -- (1) for mesh plots, (2) for curve plots
38 C -- * - OUT - return statement if command error; message is printed
39
40 include 'params.blk'
41 CHARACTER*(*) INLINE(*)
42 CHARACTER*(*) VERB
43 INTEGER INTYP(*)
44 CHARACTER*(*) CFIELD(*)
45 INTEGER IFIELD(*)
46 LOGICAL XYTYPE, MESHOK
47 LOGICAL DOQA(2), DOLEG(2), DOAXIS(2), DOBOX
48 CHARACTER*(*) CAPTN(3,2)
49
50 INTEGER IDUM
51 REAL RDUM
52 CHARACTER*(MXSTLN) CDUM
53
54 CHARACTER*(MXSTLN) WORD
55 LOGICAL ISON
56
57 DATA IDUM / 1 /
58
59 IF (VERB .EQ. 'QA') THEN
60 CALL FFADDC (VERB, INLINE(1))
61 CALL FFONOF (IFLD, INTYP, CFIELD, ISON, *110)
62 CALL FFADDO (ISON, INLINE(1))
63
64 ELSE IF (VERB .EQ. 'LEGEND') THEN
65 CALL FFADDC (VERB, INLINE(1))
66 CALL FFONOF (IFLD, INTYP, CFIELD, ISON, *110)
67 CALL FFADDO (ISON, INLINE(1))
68
69 ELSE IF (VERB .EQ. 'AXIS') THEN
70 CALL FFADDC (VERB, INLINE(1))
71 CALL FFONOF (IFLD, INTYP, CFIELD, ISON, *110)
72 CALL FFADDO (ISON, INLINE(1))
73
74 ELSE IF (VERB .EQ. 'OUTLINE') THEN
75 CALL FFADDC (VERB, INLINE(1))
76 CALL FFONOF (IFLD, INTYP, CFIELD, ISON, *110)
77 CALL FFADDO (ISON, INLINE(1))
78
79 ELSE IF (VERB .EQ. 'CAPTION') THEN
80 CALL FFADDC (VERB, INLINE(1))
81 CALL FFINTG (IFLD, INTYP, IFIELD,
82 & 'caption line number (1..3) or 0', 0, ISTART, *110)
83 CALL FFADDI (ISTART, INLINE(1))
84 IF ((ISTART .LT. 0) .OR. (ISTART .GT. 3)) THEN
85 CALL PRTERR ('CMDERR',
86 & 'Expected caption line number (1..3)')
87 GOTO 110
88 END IF
89 IF (ISTART .EQ. 0) THEN
90 ISTART = 1
91 IEND = 3
92 ELSE
93 IEND = ISTART
94 END IF
95
96 ELSE
97 GOTO 110
98 END IF
99
100 CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD)
101 IF (WORD .EQ. ' ') THEN
102 ITYPE = 1
103 IF (XYTYPE) ITYPE = 2
104 ELSE IF (WORD .EQ. 'MESH') THEN
105 IF (.NOT. MESHOK) THEN
106 CALL PRTERR ('CMDERR', 'Mesh is not defined')
107 GOTO 110
108 END IF
109 ITYPE = 1
110 ELSE IF (WORD .EQ. 'XY') THEN
111 IF (.NOT. XYTYPE) THEN
112 CALL PRTERR ('CMDERR',
113 & 'XY option not allowed from mesh subprogram')
114 GOTO 110
115 END IF
116 ITYPE = 2
117 ELSE
118 CALL PRTERR ('CMDERR', 'Expected "MESH" or "XY"')
119 GOTO 110
120 END IF
121 IF (WORD .NE. ' ') CALL FFADDC (WORD, INLINE(1))
122
123 IF (VERB .EQ. 'QA') THEN
124 DOQA(ITYPE) = ISON
125
126 ELSE IF (VERB .EQ. 'LEGEND') THEN
127 DOLEG(ITYPE) = ISON
128
129 ELSE IF (VERB .EQ. 'AXIS') THEN
130 DOAXIS(ITYPE) = ISON
131
132 ELSE IF (VERB .EQ. 'OUTLINE') THEN
133 DOBOX = ISON
134
135 ELSE IF (VERB .EQ. 'CAPTION') THEN
136 DO 100 I = ISTART, IEND
137 WRITE (WORD, '(''LINE '',(I1),''> '')') I
138 LWORD = LENSTR (WORD)
139 CALL GETINS ('line', IDUM, IDUM, IDUM, CDUM,
140 & IDUM, RDUM, CAPTN(I,ITYPE), IOSTAT,
141 & WORD, LWORD, *110)
142 INLINE(I-ISTART+2) = CAPTN(I,ITYPE)
143 100 CONTINUE
144 END IF
145
146 RETURN
147
148 110 CONTINUE
149 RETURN 1
150 END