2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997, 1998
|
|
|
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 c_class (VERSION 1.1)
|
|
|
32 |
BY calculus (VERSION 1.2)
|
|
|
33 |
*/
|
|
|
34 |
|
|
|
35 |
#ifndef NAT_OPS_H_INCLUDED
|
|
|
36 |
#define NAT_OPS_H_INCLUDED
|
|
|
37 |
|
|
|
38 |
/* Operations for union NAT */
|
|
|
39 |
|
|
|
40 |
#define TAG_nat( P ) ( CHECK_NULL ( P )->ag_tag )
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
/* Operations for field small of union NAT */
|
|
|
44 |
|
|
|
45 |
#define nat_small_tag ( ( unsigned ) 0 )
|
|
|
46 |
#define IS_nat_small( P ) ( CHECK_NULL ( P )->ag_tag == 0 )
|
|
|
47 |
|
|
|
48 |
#define nat_small_value( P ) ( CHECK_TAG ( ( P ), 0 ) + 1 )
|
|
|
49 |
|
|
|
50 |
#define MAKE_nat_small( value_, c_class_nat )\
|
|
|
51 |
{\
|
|
|
52 |
c_class *x465_ = GEN_c_class ( 2, TYPEID_nat ) ;\
|
|
|
53 |
x465_->ag_tag = 0 ;\
|
|
|
54 |
COPY_unsigned ( x465_ + 1, ( value_ ) ) ;\
|
|
|
55 |
( c_class_nat ) = x465_ ;\
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
#define DECONS_nat_small( value_, c_class_nat )\
|
|
|
59 |
{\
|
|
|
60 |
c_class *x466_ = CHECK_TAG ( ( c_class_nat ), 0 ) ;\
|
|
|
61 |
( value_ ) = DEREF_unsigned ( x466_ + 1 ) ;\
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
#define DESTROY_nat_small( destroyer_, value_, c_class_nat )\
|
|
|
65 |
{\
|
|
|
66 |
c_class *x467_ = CHECK_TAG ( ( c_class_nat ), 0 ) ;\
|
|
|
67 |
( value_ ) = DEREF_unsigned ( x467_ + 1 ) ;\
|
|
|
68 |
( destroyer_ ) ( x467_, ( unsigned ) 2 ) ;\
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
/* Operations for field large of union NAT */
|
|
|
73 |
|
|
|
74 |
#define nat_large_tag ( ( unsigned ) 1 )
|
|
|
75 |
#define IS_nat_large( P ) ( CHECK_NULL ( P )->ag_tag == 1 )
|
|
|
76 |
|
|
|
77 |
#define nat_large_values( P ) ( CHECK_TAG ( ( P ), 1 ) + 1 )
|
|
|
78 |
|
|
|
79 |
#define MAKE_nat_large( values_, c_class_nat )\
|
|
|
80 |
{\
|
|
|
81 |
c_class *x468_ = GEN_c_class ( 2, TYPEID_nat ) ;\
|
|
|
82 |
x468_->ag_tag = 1 ;\
|
|
|
83 |
COPY_list ( x468_ + 1, ( values_ ) ) ;\
|
|
|
84 |
( c_class_nat ) = x468_ ;\
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
#define DECONS_nat_large( values_, c_class_nat )\
|
|
|
88 |
{\
|
|
|
89 |
c_class *x469_ = CHECK_TAG ( ( c_class_nat ), 1 ) ;\
|
|
|
90 |
( values_ ) = DEREF_list ( x469_ + 1 ) ;\
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
#define DESTROY_nat_large( destroyer_, values_, c_class_nat )\
|
|
|
94 |
{\
|
|
|
95 |
c_class *x470_ = CHECK_TAG ( ( c_class_nat ), 1 ) ;\
|
|
|
96 |
( values_ ) = DEREF_list ( x470_ + 1 ) ;\
|
|
|
97 |
( destroyer_ ) ( x470_, ( unsigned ) 2 ) ;\
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
/* Operations for field calc of union NAT */
|
|
|
102 |
|
|
|
103 |
#define nat_calc_tag ( ( unsigned ) 2 )
|
|
|
104 |
#define IS_nat_calc( P ) ( CHECK_NULL ( P )->ag_tag == 2 )
|
|
|
105 |
|
|
|
106 |
#define nat_calc_value( P ) ( CHECK_TAG ( ( P ), 2 ) + 1 )
|
|
|
107 |
#define nat_calc_tok( P ) ( CHECK_TAG ( ( P ), 2 ) + 2 )
|
|
|
108 |
|
|
|
109 |
#define MAKE_nat_calc( value_, c_class_nat )\
|
|
|
110 |
{\
|
|
|
111 |
c_class *x471_ = GEN_c_class ( 3, TYPEID_nat ) ;\
|
|
|
112 |
x471_->ag_tag = 2 ;\
|
|
|
113 |
COPY_exp ( x471_ + 1, ( value_ ) ) ;\
|
|
|
114 |
COPY_ulong ( x471_ + 2, LINK_NONE ) ;\
|
|
|
115 |
( c_class_nat ) = x471_ ;\
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
#define DECONS_nat_calc( value_, tok_, c_class_nat )\
|
|
|
119 |
{\
|
|
|
120 |
c_class *x472_ = CHECK_TAG ( ( c_class_nat ), 2 ) ;\
|
|
|
121 |
( value_ ) = DEREF_exp ( x472_ + 1 ) ;\
|
|
|
122 |
( tok_ ) = DEREF_ulong ( x472_ + 2 ) ;\
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
#define DESTROY_nat_calc( destroyer_, value_, tok_, c_class_nat )\
|
|
|
126 |
{\
|
|
|
127 |
c_class *x473_ = CHECK_TAG ( ( c_class_nat ), 2 ) ;\
|
|
|
128 |
( value_ ) = DEREF_exp ( x473_ + 1 ) ;\
|
|
|
129 |
( tok_ ) = DEREF_ulong ( x473_ + 2 ) ;\
|
|
|
130 |
( destroyer_ ) ( x473_, ( unsigned ) 3 ) ;\
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
/* Operations for field neg of union NAT */
|
|
|
135 |
|
|
|
136 |
#define nat_neg_tag ( ( unsigned ) 3 )
|
|
|
137 |
#define IS_nat_neg( P ) ( CHECK_NULL ( P )->ag_tag == 3 )
|
|
|
138 |
|
|
|
139 |
#define nat_neg_arg( P ) ( CHECK_TAG ( ( P ), 3 ) + 1 )
|
|
|
140 |
|
|
|
141 |
#define MAKE_nat_neg( arg_, c_class_nat )\
|
|
|
142 |
{\
|
|
|
143 |
c_class *x474_ = GEN_c_class ( 2, TYPEID_nat ) ;\
|
|
|
144 |
x474_->ag_tag = 3 ;\
|
|
|
145 |
COPY_nat ( x474_ + 1, ( arg_ ) ) ;\
|
|
|
146 |
( c_class_nat ) = x474_ ;\
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
#define DECONS_nat_neg( arg_, c_class_nat )\
|
|
|
150 |
{\
|
|
|
151 |
c_class *x475_ = CHECK_TAG ( ( c_class_nat ), 3 ) ;\
|
|
|
152 |
( arg_ ) = DEREF_nat ( x475_ + 1 ) ;\
|
|
|
153 |
}
|
|
|
154 |
|
|
|
155 |
#define DESTROY_nat_neg( destroyer_, arg_, c_class_nat )\
|
|
|
156 |
{\
|
|
|
157 |
c_class *x476_ = CHECK_TAG ( ( c_class_nat ), 3 ) ;\
|
|
|
158 |
( arg_ ) = DEREF_nat ( x476_ + 1 ) ;\
|
|
|
159 |
( destroyer_ ) ( x476_, ( unsigned ) 2 ) ;\
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
/* Operations for field token of union NAT */
|
|
|
164 |
|
|
|
165 |
#define nat_token_tag ( ( unsigned ) 4 )
|
|
|
166 |
#define IS_nat_token( P ) ( CHECK_NULL ( P )->ag_tag == 4 )
|
|
|
167 |
|
|
|
168 |
#define nat_token_tok( P ) ( CHECK_TAG ( ( P ), 4 ) + 1 )
|
|
|
169 |
#define nat_token_args( P ) ( CHECK_TAG ( ( P ), 4 ) + 2 )
|
|
|
170 |
|
|
|
171 |
#define MAKE_nat_token( tok_, args_, c_class_nat )\
|
|
|
172 |
{\
|
|
|
173 |
c_class *x477_ = GEN_c_class ( 3, TYPEID_nat ) ;\
|
|
|
174 |
x477_->ag_tag = 4 ;\
|
|
|
175 |
COPY_id ( x477_ + 1, ( tok_ ) ) ;\
|
|
|
176 |
COPY_list ( x477_ + 2, ( args_ ) ) ;\
|
|
|
177 |
( c_class_nat ) = x477_ ;\
|
|
|
178 |
}
|
|
|
179 |
|
|
|
180 |
#define DECONS_nat_token( tok_, args_, c_class_nat )\
|
|
|
181 |
{\
|
|
|
182 |
c_class *x478_ = CHECK_TAG ( ( c_class_nat ), 4 ) ;\
|
|
|
183 |
( tok_ ) = DEREF_id ( x478_ + 1 ) ;\
|
|
|
184 |
( args_ ) = DEREF_list ( x478_ + 2 ) ;\
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
#define DESTROY_nat_token( destroyer_, tok_, args_, c_class_nat )\
|
|
|
188 |
{\
|
|
|
189 |
c_class *x479_ = CHECK_TAG ( ( c_class_nat ), 4 ) ;\
|
|
|
190 |
( tok_ ) = DEREF_id ( x479_ + 1 ) ;\
|
|
|
191 |
( args_ ) = DEREF_list ( x479_ + 2 ) ;\
|
|
|
192 |
( destroyer_ ) ( x479_, ( unsigned ) 3 ) ;\
|
|
|
193 |
}
|
|
|
194 |
|
|
|
195 |
|
|
|
196 |
#endif
|