Debian Codegraph @

packages/seacas/applications/blot/cmdvwc.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 CMDVWC (VERB, INLINE,
9 & IFLD, INTYP, CFIELD, IFIELD, RFIELD,
10 & IVIEW, JVIEW, *)
11 C=======================================================================
12
13 C --*** CMDVWC *** (MESH) Process VIEW command (header only)
14 C -- Written by Amy Gilkey - revised 04/13/88
15 C --
16 C --Parameters:
17 C -- VERB - IN/OUT - the VIEW command
18 C -- INLINE - IN/OUT - the parsed input line for the log file
19 C -- IFLD, INTYP, CFIELD, IFIELD, RFIELD - IN/OUT - the free-field
20 C -- reader index and fields
21 C -- IVIEW - IN - the view number
22 C -- JVIEW - IN - IVIEW (if non-zero) or a defined non-empty view number
23 C -- (if any)
24 C --
25 C --Common Variables:
26 C -- Uses MSHDEF of /MSHOPT/
27
28 PARAMETER (MSHNON=0, MSHBOR=1, MSHDIV=2, MSHSEL=3, MSHALL=4)
29
30 include 'mshopt.blk'
31
32 CHARACTER*(*) VERB
33 CHARACTER*(*) INLINE
34 INTEGER INTYP(*)
35 CHARACTER*(*) CFIELD(*)
36 INTEGER IFIELD(*)
37 REAL RFIELD(*)
38
39 INTEGER NDEFVW, IXVW
40
41 IF (VERB .EQ. 'VIEW') THEN
42 CALL FFADDC (VERB, INLINE)
43 CALL FFINTG (IFLD, INTYP, IFIELD,
44 & 'view number', -1, IVIEW, *100)
45 CALL FFADDI (IVIEW, INLINE)
46 IF ((IVIEW .LT. 0) .OR. (IVIEW .GT. 4)) THEN
47 CALL PRTERR ('CMDERR', 'Expected view number')
48 GOTO 100
49 END IF
50 IF ((IVIEW .GE. 1) .AND. (MSHDEF(IVIEW) .EQ. 'NONE')) THEN
51 CALL PRTERR ('CMDERR', 'Specified view is undefined')
52 GOTO 100
53 END IF
54 CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', VERB)
55
56 ELSE
57 IF (NDEFVW (.TRUE.) .GT. 1) THEN
58 CALL PRTERR ('CMDERR',
59 & 'VIEW command must be used with multiple views')
60 GOTO 100
61 END IF
62
63 IVIEW = 2
64 END IF
65
66 IF (IVIEW .EQ. 0) THEN
67 JVIEW = IXVW (.FALSE., 1)
68 IF (JVIEW .EQ. 0) THEN
69 CALL PRTERR ('CMDERR',
70 & 'VIEW 0 not allowed because all views are empty')
71 GOTO 100
72 END IF
73 ELSE
74 JVIEW = IVIEW
75 END IF
76
77 RETURN
78
79 100 CONTINUE
80 RETURN 1
81 END