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 calculus (VERSION 1.2)
|
|
|
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 |
|
|
|
40 |
#define TAG_cmd( P ) ( CHECK_NULL ( P )->ag_tag )
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
/* Operations for component line of union COMMAND */
|
|
|
44 |
|
|
|
45 |
#define cmd_line( P ) ( CHECK_NULL ( P ) + 1 )
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
/* Operations for field simple of union COMMAND */
|
|
|
49 |
|
|
|
50 |
#define cmd_simple_tag ( ( unsigned ) 0 )
|
|
|
51 |
#define IS_cmd_simple( P ) ( CHECK_NULL ( P )->ag_tag == 0 )
|
|
|
52 |
|
|
|
53 |
#define cmd_simple_text( P ) ( CHECK_TAG ( ( P ), 0 ) + 2 )
|
|
|
54 |
|
|
|
55 |
#define MAKE_cmd_simple( line_, text_, calculus_cmd )\
|
|
|
56 |
{\
|
|
|
57 |
calculus *x186_ = GEN_calculus ( 3, TYPEID_cmd ) ;\
|
|
|
58 |
x186_->ag_tag = 0 ;\
|
|
|
59 |
COPY_int ( x186_ + 1, ( line_ ) ) ;\
|
|
|
60 |
COPY_string ( x186_ + 2, ( text_ ) ) ;\
|
|
|
61 |
( calculus_cmd ) = x186_ ;\
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
#define DECONS_cmd_simple( line_, text_, calculus_cmd )\
|
|
|
65 |
{\
|
|
|
66 |
calculus *x187_ = CHECK_TAG ( ( calculus_cmd ), 0 ) ;\
|
|
|
67 |
( line_ ) = DEREF_int ( x187_ + 1 ) ;\
|
|
|
68 |
( text_ ) = DEREF_string ( x187_ + 2 ) ;\
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
#define DESTROY_cmd_simple( destroyer_, line_, text_, calculus_cmd )\
|
|
|
72 |
{\
|
|
|
73 |
calculus *x188_ = CHECK_TAG ( ( calculus_cmd ), 0 ) ;\
|
|
|
74 |
( line_ ) = DEREF_int ( x188_ + 1 ) ;\
|
|
|
75 |
( text_ ) = DEREF_string ( x188_ + 2 ) ;\
|
|
|
76 |
( destroyer_ ) ( x188_, ( unsigned ) 3 ) ;\
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
/* Operations for field compound of union COMMAND */
|
|
|
81 |
|
|
|
82 |
#define cmd_compound_tag ( ( unsigned ) 1 )
|
|
|
83 |
#define IS_cmd_compound( P ) ( CHECK_NULL ( P )->ag_tag == 1 )
|
|
|
84 |
|
|
|
85 |
#define cmd_compound_seq( P ) ( CHECK_TAG ( ( P ), 1 ) + 2 )
|
|
|
86 |
|
|
|
87 |
#define MAKE_cmd_compound( line_, seq_, calculus_cmd )\
|
|
|
88 |
{\
|
|
|
89 |
calculus *x189_ = GEN_calculus ( 3, TYPEID_cmd ) ;\
|
|
|
90 |
x189_->ag_tag = 1 ;\
|
|
|
91 |
COPY_int ( x189_ + 1, ( line_ ) ) ;\
|
|
|
92 |
COPY_list ( x189_ + 2, ( seq_ ) ) ;\
|
|
|
93 |
( calculus_cmd ) = x189_ ;\
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
#define DECONS_cmd_compound( line_, seq_, calculus_cmd )\
|
|
|
97 |
{\
|
|
|
98 |
calculus *x190_ = CHECK_TAG ( ( calculus_cmd ), 1 ) ;\
|
|
|
99 |
( line_ ) = DEREF_int ( x190_ + 1 ) ;\
|
|
|
100 |
( seq_ ) = DEREF_list ( x190_ + 2 ) ;\
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
#define DESTROY_cmd_compound( destroyer_, line_, seq_, calculus_cmd )\
|
|
|
104 |
{\
|
|
|
105 |
calculus *x191_ = CHECK_TAG ( ( calculus_cmd ), 1 ) ;\
|
|
|
106 |
( line_ ) = DEREF_int ( x191_ + 1 ) ;\
|
|
|
107 |
( seq_ ) = DEREF_list ( x191_ + 2 ) ;\
|
|
|
108 |
( destroyer_ ) ( x191_, ( unsigned ) 3 ) ;\
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
/* Operations for field loop of union COMMAND */
|
|
|
113 |
|
|
|
114 |
#define cmd_loop_tag ( ( unsigned ) 2 )
|
|
|
115 |
#define IS_cmd_loop( P ) ( CHECK_NULL ( P )->ag_tag == 2 )
|
|
|
116 |
|
|
|
117 |
#define cmd_loop_control( P ) ( CHECK_TAG ( ( P ), 2 ) + 2 )
|
|
|
118 |
#define cmd_loop_body( P ) ( CHECK_TAG ( ( P ), 2 ) + 3 )
|
|
|
119 |
|
|
|
120 |
#define MAKE_cmd_loop( line_, control_, body_, calculus_cmd )\
|
|
|
121 |
{\
|
|
|
122 |
calculus *x192_ = GEN_calculus ( 4, TYPEID_cmd ) ;\
|
|
|
123 |
x192_->ag_tag = 2 ;\
|
|
|
124 |
COPY_int ( x192_ + 1, ( line_ ) ) ;\
|
|
|
125 |
COPY_string ( x192_ + 2, ( control_ ) ) ;\
|
|
|
126 |
COPY_cmd ( x192_ + 3, ( body_ ) ) ;\
|
|
|
127 |
( calculus_cmd ) = x192_ ;\
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
#define DECONS_cmd_loop( line_, control_, body_, calculus_cmd )\
|
|
|
131 |
{\
|
|
|
132 |
calculus *x193_ = CHECK_TAG ( ( calculus_cmd ), 2 ) ;\
|
|
|
133 |
( line_ ) = DEREF_int ( x193_ + 1 ) ;\
|
|
|
134 |
( control_ ) = DEREF_string ( x193_ + 2 ) ;\
|
|
|
135 |
( body_ ) = DEREF_cmd ( x193_ + 3 ) ;\
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
#define DESTROY_cmd_loop( destroyer_, line_, control_, body_, calculus_cmd )\
|
|
|
139 |
{\
|
|
|
140 |
calculus *x194_ = CHECK_TAG ( ( calculus_cmd ), 2 ) ;\
|
|
|
141 |
( line_ ) = DEREF_int ( x194_ + 1 ) ;\
|
|
|
142 |
( control_ ) = DEREF_string ( x194_ + 2 ) ;\
|
|
|
143 |
( body_ ) = DEREF_cmd ( x194_ + 3 ) ;\
|
|
|
144 |
( destroyer_ ) ( x194_, ( unsigned ) 4 ) ;\
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
/* Operations for field cond of union COMMAND */
|
|
|
149 |
|
|
|
150 |
#define cmd_cond_tag ( ( unsigned ) 3 )
|
|
|
151 |
#define IS_cmd_cond( P ) ( CHECK_NULL ( P )->ag_tag == 3 )
|
|
|
152 |
|
|
|
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 )
|
|
|
156 |
|
|
|
157 |
#define MAKE_cmd_cond( line_, control_, true_code_, false_code_, calculus_cmd )\
|
|
|
158 |
{\
|
|
|
159 |
calculus *x195_ = GEN_calculus ( 5, TYPEID_cmd ) ;\
|
|
|
160 |
x195_->ag_tag = 3 ;\
|
|
|
161 |
COPY_int ( x195_ + 1, ( line_ ) ) ;\
|
|
|
162 |
COPY_string ( x195_ + 2, ( control_ ) ) ;\
|
|
|
163 |
COPY_cmd ( x195_ + 3, ( true_code_ ) ) ;\
|
|
|
164 |
COPY_cmd ( x195_ + 4, ( false_code_ ) ) ;\
|
|
|
165 |
( calculus_cmd ) = x195_ ;\
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
#define DECONS_cmd_cond( line_, control_, true_code_, false_code_, calculus_cmd )\
|
|
|
169 |
{\
|
|
|
170 |
calculus *x196_ = CHECK_TAG ( ( calculus_cmd ), 3 ) ;\
|
|
|
171 |
( line_ ) = DEREF_int ( x196_ + 1 ) ;\
|
|
|
172 |
( control_ ) = DEREF_string ( x196_ + 2 ) ;\
|
|
|
173 |
( true_code_ ) = DEREF_cmd ( x196_ + 3 ) ;\
|
|
|
174 |
( false_code_ ) = DEREF_cmd ( x196_ + 4 ) ;\
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
#define DESTROY_cmd_cond( destroyer_, line_, control_, true_code_, false_code_, calculus_cmd )\
|
|
|
178 |
{\
|
|
|
179 |
calculus *x197_ = CHECK_TAG ( ( calculus_cmd ), 3 ) ;\
|
|
|
180 |
( line_ ) = DEREF_int ( x197_ + 1 ) ;\
|
|
|
181 |
( control_ ) = DEREF_string ( x197_ + 2 ) ;\
|
|
|
182 |
( true_code_ ) = DEREF_cmd ( x197_ + 3 ) ;\
|
|
|
183 |
( false_code_ ) = DEREF_cmd ( x197_ + 4 ) ;\
|
|
|
184 |
( destroyer_ ) ( x197_, ( unsigned ) 5 ) ;\
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
#endif
|