2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
/*
|
|
|
31 |
AUTOMATICALLY GENERATED FROM ALGEBRA tdf (VERSION 1.0)
|
|
|
32 |
BY calculus (VERSION 1.2)
|
|
|
33 |
*/
|
|
|
34 |
|
|
|
35 |
#ifndef CMD_OPS_H_INCLUDED
|
|
|
36 |
#define CMD_OPS_H_INCLUDED
|
|
|
37 |
|
|
|
38 |
/* Operations for union COMMAND */
|
|
|
39 |
|
6 |
7u83 |
40 |
#define TAG_cmd(P) (CHECK_NULL(P)->ag_tag)
|
2 |
7u83 |
41 |
|
|
|
42 |
|
|
|
43 |
/* Operations for component line of union COMMAND */
|
|
|
44 |
|
6 |
7u83 |
45 |
#define cmd_line(P) (CHECK_NULL(P) + 1)
|
2 |
7u83 |
46 |
|
|
|
47 |
|
|
|
48 |
/* Operations for field simple of union COMMAND */
|
|
|
49 |
|
6 |
7u83 |
50 |
#define cmd_simple_tag ((unsigned)0)
|
|
|
51 |
#define IS_cmd_simple(P) (CHECK_NULL(P)->ag_tag == 0)
|
2 |
7u83 |
52 |
|
6 |
7u83 |
53 |
#define cmd_simple_text(P) (CHECK_TAG((P), 0) + 2)
|
2 |
7u83 |
54 |
|
6 |
7u83 |
55 |
#define MAKE_cmd_simple(line_, text_, tdf_cmd)\
|
2 |
7u83 |
56 |
{\
|
6 |
7u83 |
57 |
tdf *x102_ = GEN_tdf(3, TYPEID_cmd);\
|
|
|
58 |
x102_->ag_tag = 0;\
|
|
|
59 |
COPY_int(x102_ + 1, (line_));\
|
|
|
60 |
COPY_string(x102_ + 2, (text_));\
|
|
|
61 |
(tdf_cmd) = x102_;\
|
2 |
7u83 |
62 |
}
|
|
|
63 |
|
6 |
7u83 |
64 |
#define DECONS_cmd_simple(line_, text_, tdf_cmd)\
|
2 |
7u83 |
65 |
{\
|
6 |
7u83 |
66 |
tdf *x103_ = CHECK_TAG((tdf_cmd), 0);\
|
|
|
67 |
(line_) = DEREF_int(x103_ + 1);\
|
|
|
68 |
(text_) = DEREF_string(x103_ + 2);\
|
2 |
7u83 |
69 |
}
|
|
|
70 |
|
6 |
7u83 |
71 |
#define DESTROY_cmd_simple(destroyer_, line_, text_, tdf_cmd)\
|
2 |
7u83 |
72 |
{\
|
6 |
7u83 |
73 |
tdf *x104_ = CHECK_TAG((tdf_cmd), 0);\
|
|
|
74 |
(line_) = DEREF_int(x104_ + 1);\
|
|
|
75 |
(text_) = DEREF_string(x104_ + 2);\
|
|
|
76 |
(destroyer_)(x104_, (unsigned)3);\
|
2 |
7u83 |
77 |
}
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
/* Operations for field compound of union COMMAND */
|
|
|
81 |
|
6 |
7u83 |
82 |
#define cmd_compound_tag ((unsigned)1)
|
|
|
83 |
#define IS_cmd_compound(P) (CHECK_NULL(P)->ag_tag == 1)
|
2 |
7u83 |
84 |
|
6 |
7u83 |
85 |
#define cmd_compound_seq(P) (CHECK_TAG((P), 1) + 2)
|
2 |
7u83 |
86 |
|
6 |
7u83 |
87 |
#define MAKE_cmd_compound(line_, seq_, tdf_cmd)\
|
2 |
7u83 |
88 |
{\
|
6 |
7u83 |
89 |
tdf *x105_ = GEN_tdf(3, TYPEID_cmd);\
|
|
|
90 |
x105_->ag_tag = 1;\
|
|
|
91 |
COPY_int(x105_ + 1, (line_));\
|
|
|
92 |
COPY_list(x105_ + 2, (seq_));\
|
|
|
93 |
(tdf_cmd) = x105_;\
|
2 |
7u83 |
94 |
}
|
|
|
95 |
|
6 |
7u83 |
96 |
#define DECONS_cmd_compound(line_, seq_, tdf_cmd)\
|
2 |
7u83 |
97 |
{\
|
6 |
7u83 |
98 |
tdf *x106_ = CHECK_TAG((tdf_cmd), 1);\
|
|
|
99 |
(line_) = DEREF_int(x106_ + 1);\
|
|
|
100 |
(seq_) = DEREF_list(x106_ + 2);\
|
2 |
7u83 |
101 |
}
|
|
|
102 |
|
6 |
7u83 |
103 |
#define DESTROY_cmd_compound(destroyer_, line_, seq_, tdf_cmd)\
|
2 |
7u83 |
104 |
{\
|
6 |
7u83 |
105 |
tdf *x107_ = CHECK_TAG((tdf_cmd), 1);\
|
|
|
106 |
(line_) = DEREF_int(x107_ + 1);\
|
|
|
107 |
(seq_) = DEREF_list(x107_ + 2);\
|
|
|
108 |
(destroyer_)(x107_, (unsigned)3);\
|
2 |
7u83 |
109 |
}
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
/* Operations for field loop of union COMMAND */
|
|
|
113 |
|
6 |
7u83 |
114 |
#define cmd_loop_tag ((unsigned)2)
|
|
|
115 |
#define IS_cmd_loop(P) (CHECK_NULL(P)->ag_tag == 2)
|
2 |
7u83 |
116 |
|
6 |
7u83 |
117 |
#define cmd_loop_control(P) (CHECK_TAG((P), 2) + 2)
|
|
|
118 |
#define cmd_loop_body(P) (CHECK_TAG((P), 2) + 3)
|
2 |
7u83 |
119 |
|
6 |
7u83 |
120 |
#define MAKE_cmd_loop(line_, control_, body_, tdf_cmd)\
|
2 |
7u83 |
121 |
{\
|
6 |
7u83 |
122 |
tdf *x108_ = GEN_tdf(4, TYPEID_cmd);\
|
|
|
123 |
x108_->ag_tag = 2;\
|
|
|
124 |
COPY_int(x108_ + 1, (line_));\
|
|
|
125 |
COPY_string(x108_ + 2, (control_));\
|
|
|
126 |
COPY_cmd(x108_ + 3, (body_));\
|
|
|
127 |
(tdf_cmd) = x108_;\
|
2 |
7u83 |
128 |
}
|
|
|
129 |
|
6 |
7u83 |
130 |
#define DECONS_cmd_loop(line_, control_, body_, tdf_cmd)\
|
2 |
7u83 |
131 |
{\
|
6 |
7u83 |
132 |
tdf *x109_ = CHECK_TAG((tdf_cmd), 2);\
|
|
|
133 |
(line_) = DEREF_int(x109_ + 1);\
|
|
|
134 |
(control_) = DEREF_string(x109_ + 2);\
|
|
|
135 |
(body_) = DEREF_cmd(x109_ + 3);\
|
2 |
7u83 |
136 |
}
|
|
|
137 |
|
6 |
7u83 |
138 |
#define DESTROY_cmd_loop(destroyer_, line_, control_, body_, tdf_cmd)\
|
2 |
7u83 |
139 |
{\
|
6 |
7u83 |
140 |
tdf *x110_ = CHECK_TAG((tdf_cmd), 2);\
|
|
|
141 |
(line_) = DEREF_int(x110_ + 1);\
|
|
|
142 |
(control_) = DEREF_string(x110_ + 2);\
|
|
|
143 |
(body_) = DEREF_cmd(x110_ + 3);\
|
|
|
144 |
(destroyer_)(x110_, (unsigned)4);\
|
2 |
7u83 |
145 |
}
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
/* Operations for field cond of union COMMAND */
|
|
|
149 |
|
6 |
7u83 |
150 |
#define cmd_cond_tag ((unsigned)3)
|
|
|
151 |
#define IS_cmd_cond(P) (CHECK_NULL(P)->ag_tag == 3)
|
2 |
7u83 |
152 |
|
6 |
7u83 |
153 |
#define cmd_cond_control(P) (CHECK_TAG((P), 3) + 2)
|
|
|
154 |
#define cmd_cond_true_code(P) (CHECK_TAG((P), 3) + 3)
|
|
|
155 |
#define cmd_cond_false_code(P) (CHECK_TAG((P), 3) + 4)
|
2 |
7u83 |
156 |
|
6 |
7u83 |
157 |
#define MAKE_cmd_cond(line_, control_, true_code_, false_code_, tdf_cmd)\
|
2 |
7u83 |
158 |
{\
|
6 |
7u83 |
159 |
tdf *x111_ = GEN_tdf(5, TYPEID_cmd);\
|
|
|
160 |
x111_->ag_tag = 3;\
|
|
|
161 |
COPY_int(x111_ + 1, (line_));\
|
|
|
162 |
COPY_string(x111_ + 2, (control_));\
|
|
|
163 |
COPY_cmd(x111_ + 3, (true_code_));\
|
|
|
164 |
COPY_cmd(x111_ + 4, (false_code_));\
|
|
|
165 |
(tdf_cmd) = x111_;\
|
2 |
7u83 |
166 |
}
|
|
|
167 |
|
6 |
7u83 |
168 |
#define DECONS_cmd_cond(line_, control_, true_code_, false_code_, tdf_cmd)\
|
2 |
7u83 |
169 |
{\
|
6 |
7u83 |
170 |
tdf *x112_ = CHECK_TAG((tdf_cmd), 3);\
|
|
|
171 |
(line_) = DEREF_int(x112_ + 1);\
|
|
|
172 |
(control_) = DEREF_string(x112_ + 2);\
|
|
|
173 |
(true_code_) = DEREF_cmd(x112_ + 3);\
|
|
|
174 |
(false_code_) = DEREF_cmd(x112_ + 4);\
|
2 |
7u83 |
175 |
}
|
|
|
176 |
|
6 |
7u83 |
177 |
#define DESTROY_cmd_cond(destroyer_, line_, control_, true_code_, false_code_, tdf_cmd)\
|
2 |
7u83 |
178 |
{\
|
6 |
7u83 |
179 |
tdf *x113_ = CHECK_TAG((tdf_cmd), 3);\
|
|
|
180 |
(line_) = DEREF_int(x113_ + 1);\
|
|
|
181 |
(control_) = DEREF_string(x113_ + 2);\
|
|
|
182 |
(true_code_) = DEREF_cmd(x113_ + 3);\
|
|
|
183 |
(false_code_) = DEREF_cmd(x113_ + 4);\
|
|
|
184 |
(destroyer_)(x113_, (unsigned)5);\
|
2 |
7u83 |
185 |
}
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
/* Operations for field use of union COMMAND */
|
|
|
189 |
|
6 |
7u83 |
190 |
#define cmd_use_tag ((unsigned)4)
|
|
|
191 |
#define IS_cmd_use(P) (CHECK_NULL(P)->ag_tag == 4)
|
2 |
7u83 |
192 |
|
6 |
7u83 |
193 |
#define cmd_use_sort(P) (CHECK_TAG((P), 4) + 2)
|
|
|
194 |
#define cmd_use_cons(P) (CHECK_TAG((P), 4) + 3)
|
2 |
7u83 |
195 |
|
6 |
7u83 |
196 |
#define MAKE_cmd_use(line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
197 |
{\
|
6 |
7u83 |
198 |
tdf *x114_ = GEN_tdf(4, TYPEID_cmd);\
|
|
|
199 |
x114_->ag_tag = 4;\
|
|
|
200 |
COPY_int(x114_ + 1, (line_));\
|
|
|
201 |
COPY_string(x114_ + 2, (sort_));\
|
|
|
202 |
COPY_string(x114_ + 3, (cons_));\
|
|
|
203 |
(tdf_cmd) = x114_;\
|
2 |
7u83 |
204 |
}
|
|
|
205 |
|
6 |
7u83 |
206 |
#define DECONS_cmd_use(line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
207 |
{\
|
6 |
7u83 |
208 |
tdf *x115_ = CHECK_TAG((tdf_cmd), 4);\
|
|
|
209 |
(line_) = DEREF_int(x115_ + 1);\
|
|
|
210 |
(sort_) = DEREF_string(x115_ + 2);\
|
|
|
211 |
(cons_) = DEREF_string(x115_ + 3);\
|
2 |
7u83 |
212 |
}
|
|
|
213 |
|
6 |
7u83 |
214 |
#define DESTROY_cmd_use(destroyer_, line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
215 |
{\
|
6 |
7u83 |
216 |
tdf *x116_ = CHECK_TAG((tdf_cmd), 4);\
|
|
|
217 |
(line_) = DEREF_int(x116_ + 1);\
|
|
|
218 |
(sort_) = DEREF_string(x116_ + 2);\
|
|
|
219 |
(cons_) = DEREF_string(x116_ + 3);\
|
|
|
220 |
(destroyer_)(x116_, (unsigned)4);\
|
2 |
7u83 |
221 |
}
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
/* Operations for field special of union COMMAND */
|
|
|
225 |
|
6 |
7u83 |
226 |
#define cmd_special_tag ((unsigned)5)
|
|
|
227 |
#define IS_cmd_special(P) (CHECK_NULL(P)->ag_tag == 5)
|
2 |
7u83 |
228 |
|
6 |
7u83 |
229 |
#define cmd_special_sort(P) (CHECK_TAG((P), 5) + 2)
|
|
|
230 |
#define cmd_special_cons(P) (CHECK_TAG((P), 5) + 3)
|
2 |
7u83 |
231 |
|
6 |
7u83 |
232 |
#define MAKE_cmd_special(line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
233 |
{\
|
6 |
7u83 |
234 |
tdf *x117_ = GEN_tdf(4, TYPEID_cmd);\
|
|
|
235 |
x117_->ag_tag = 5;\
|
|
|
236 |
COPY_int(x117_ + 1, (line_));\
|
|
|
237 |
COPY_string(x117_ + 2, (sort_));\
|
|
|
238 |
COPY_string(x117_ + 3, (cons_));\
|
|
|
239 |
(tdf_cmd) = x117_;\
|
2 |
7u83 |
240 |
}
|
|
|
241 |
|
6 |
7u83 |
242 |
#define DECONS_cmd_special(line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
243 |
{\
|
6 |
7u83 |
244 |
tdf *x118_ = CHECK_TAG((tdf_cmd), 5);\
|
|
|
245 |
(line_) = DEREF_int(x118_ + 1);\
|
|
|
246 |
(sort_) = DEREF_string(x118_ + 2);\
|
|
|
247 |
(cons_) = DEREF_string(x118_ + 3);\
|
2 |
7u83 |
248 |
}
|
|
|
249 |
|
6 |
7u83 |
250 |
#define DESTROY_cmd_special(destroyer_, line_, sort_, cons_, tdf_cmd)\
|
2 |
7u83 |
251 |
{\
|
6 |
7u83 |
252 |
tdf *x119_ = CHECK_TAG((tdf_cmd), 5);\
|
|
|
253 |
(line_) = DEREF_int(x119_ + 1);\
|
|
|
254 |
(sort_) = DEREF_string(x119_ + 2);\
|
|
|
255 |
(cons_) = DEREF_string(x119_ + 3);\
|
|
|
256 |
(destroyer_)(x119_, (unsigned)4);\
|
2 |
7u83 |
257 |
}
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
#endif
|