1
2
3
4
5 LOGICAL TAKEIT(OBJ,SFLAG)
6 IMPLICIT INTEGER(A-Z)
7 %include dparam
8 LOGICAL TAKE,LIT
9
10 TAKEIT=.FALSE.
11 IF((OBJ.EQ.0).OR.(OBJ.GT.STRBIT).OR.DEADF)
12 & GO TO 4000
13 ODO2=ODESC2(OBJ)
14 X=OCAN(OBJ)
15
16 IF((X.EQ.0).OR.(AND(SFLAG,VFBIT).EQ.0)) GO TO 500
17
18 IF(AND(OFLAG2(X),OPENBT).NE.0) GO TO 500
19 CALL RSPSUB(566,ODO2)
20 RETURN
21
22
23 500 IF(AND(SFLAG,VRBIT).EQ.0) GO TO 1000
24
25 IF(AND(SFLAG,VTBIT).EQ.0) GO TO 2000
26
27
28
29 IF(SCHLST(0,0,HERE,0,0,OBJ).LE.0) GO TO 4000
30
31
32
33
34 IF(AND(OFLAG1(OBJ),TAKEBT).NE.0) GO TO 3000
35
36
37
38
39 IF(AND(SFLAG,VCBIT).EQ.0) GO TO 4000
40 CALL RSPSUB(445,ODO2)
41 RETURN
42
43
44
45
46
47 2000 IF(AND(SFLAG,VCBIT).EQ.0) GO TO 4000
48 1000 IF(SCHLST(0,0,HERE,0,0,OBJ).LE.0) GO TO 4000
49 I=665
50 IF(WINNER.NE.PLAYER) I=1082
51 CALL RSPSUB(I,ODO2)
52 RETURN
53
54
55
56 3000 IF(LIT(HERE)) GO TO 3500
57 CALL RSPEAK(579)
58 RETURN
59
60 3500 SVA=PRSA
61 SVO=PRSO
62 SVI=PRSI
63 PRSA=TAKEW
64 PRSO=OBJ
65 PRSI=0
66 TAKEIT=TAKE(.TRUE.)
67 PRSA=SVA
68 PRSO=SVO
69 PRSI=SVI
70 RETURN
71
72
73
74 4000 TAKEIT=.TRUE.
75 RETURN
76
77
78
79
80
81
82
83 INTEGER GWIM(SFLAG,SFW1,SFW2)
84 IMPLICIT INTEGER(A-Z)
85 %include dparam
86 LOGICAL TAKEIT,NOCARE,LIT
87
88 GWIM=0
89 IF(DEADF) RETURN
90 AV=AVEHIC(WINNER)
91
92 NOCARE=AND(SFLAG,VCBIT).EQ.0
93
94
95
96
97
98 IF(AND(SFLAG,VABIT).NE.0)
99 & GWIM=FWIM(SFW1,SFW2,0,0,WINNER,NOCARE)
100
101
102 IF((GWIM.LT.0).OR..NOT.LIT(HERE).OR.
103 & (AND(SFLAG,VRBIT).EQ.0)) RETURN
104
105
106
107 100 ROBJ=FWIM(SFW1,SFW2,HERE,0,0,NOCARE)
108 IF(ROBJ) 500,600,200
109
110
111
112
113
114 200 IF((AV.EQ.0).OR.(ROBJ.EQ.AV).OR.
115 & (AND(OFLAG2(ROBJ),FINDBT).NE.0)) GO TO 300
116 IF(OCAN(ROBJ).NE.AV) RETURN
117
118 300 IF(GWIM.EQ.0) GO TO 400
119 GWIM=-GWIM
120 RETURN
121
122 400 IF(.NOT.TAKEIT(ROBJ,SFLAG)) RETURN
123 500 GWIM=ROBJ
124 600 RETURN
125
126
127
128
129
130
131
132 LOGICAL NOADJS(OBJ)
133 IMPLICIT INTEGER(A-Z)
134 %include dparam
135
136 NOADJS=.FALSE.
137 DO 100 I=1,AVMAX
138 IF(IABS(AVOC(I)).EQ.OBJ) RETURN
139 IF(AVOC(I).EQ.0) GO TO 200
140 100 CONTINUE
141 200 NOADJS=.TRUE.
142 RETURN
143
144
145
146
147
148
149
150 CHARACTER*(*) LCIFY(STRING,START)
151 IMPLICIT INTEGER(A-Z)
152 CHARACTER*(*) STRING
153
154 LCIFY=STRING
155 K=LEN(STRING)
156 IF(START.GT.K) RETURN
157
158 ULCVT=ICHAR('a')-ICHAR('A')
159 DO 100 I=START,K
160 IF((STRING(I:I).GE.'A').AND.(STRING(I:I).LE.'Z'))
161 & LCIFY(I:I)=CHAR(ICHAR(STRING(I:I))+ULCVT)
162 100 CONTINUE
163 RETURN
164
165
166
167
168
169
170
171 CHARACTER*(*) FINDVB(SYNTAX)
172 IMPLICIT INTEGER(A-Z)
173 %include dparam
174
175 J=1
176 DO 100 K=1,VWMAX
177 NEWJ=J+VVOC(J)+1
178 IF((J.LE.SYNTAX).AND.(SYNTAX.LT.NEWJ)) GO TO 200
179 IF(VWORD(K)(1:1).NE.'*') J=NEWJ
180 100 CONTINUE
181 FINDVB=' '
182 RETURN
183
184 200 FINDVB=VWORD(K)
185 IF(VWORD(K)(1:1).EQ.'*') FINDVB=VWORD(K)(2:WRDLNT)
186 RETURN
187
188
189
190
191
192
193
194 CHARACTER*(*) FINDPR(PREPNO)
195 IMPLICIT INTEGER(A-Z)
196 %include dparam
197
198 DO 100 I=1,PWMAX
199 IF(PVOC(I).EQ.PREPNO) GO TO 200
200 100 CONTINUE
201 FINDPR=' '
202 RETURN
203
204 200 FINDPR=PWORD(I)
205 RETURN
206
207