Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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 INFO_OPS_H_INCLUDED
36
#define INFO_OPS_H_INCLUDED
37
 
38
/* Operations for union SORT_INFO */
39
 
40
#define TAG_info( P )			( CHECK_NULL ( P )->ag_tag )
41
 
42
 
43
/* Operations for component name of union SORT_INFO */
44
 
45
#define info_name( P )			( CHECK_NULL ( P ) + 1 )
46
 
47
 
48
/* Operations for field builtin of union SORT_INFO */
49
 
50
#define info_builtin_tag		( ( unsigned ) 0 )
51
#define IS_info_builtin( P )		( CHECK_NULL ( P )->ag_tag == 0 )
52
 
53
 
54
#define MAKE_info_builtin( name_, tdf_info )\
55
    {\
56
	tdf *x71_ = GEN_tdf ( 2, TYPEID_info ) ;\
57
	x71_->ag_tag = 0 ;\
58
	COPY_string ( x71_ + 1, ( name_ ) ) ;\
59
	( tdf_info ) = x71_ ;\
60
    }
61
 
62
#define DECONS_info_builtin( name_, tdf_info )\
63
    {\
64
	tdf *x72_ = CHECK_TAG ( ( tdf_info ), 0 ) ;\
65
	( name_ ) = DEREF_string ( x72_ + 1 ) ;\
66
    }
67
 
68
#define DESTROY_info_builtin( destroyer_, name_, tdf_info )\
69
    {\
70
	tdf *x73_ = CHECK_TAG ( ( tdf_info ), 0 ) ;\
71
	( name_ ) = DEREF_string ( x73_ + 1 ) ;\
72
	( destroyer_ ) ( x73_, ( unsigned ) 2 ) ;\
73
    }
74
 
75
 
76
/* Operations for field basic of union SORT_INFO */
77
 
78
#define info_basic_tag			( ( unsigned ) 1 )
79
#define IS_info_basic( P )		( CHECK_NULL ( P )->ag_tag == 1 )
80
 
81
#define info_basic_bits( P )		( CHECK_TAG ( ( P ), 1 ) + 2 )
82
#define info_basic_extend( P )		( CHECK_TAG ( ( P ), 1 ) + 3 )
83
#define info_basic_max( P )		( CHECK_TAG ( ( P ), 1 ) + 4 )
84
#define info_basic_cons( P )		( CHECK_TAG ( ( P ), 1 ) + 5 )
85
#define info_basic_sortname( P )	( CHECK_TAG ( ( P ), 1 ) + 6 )
86
 
87
#define MAKE_info_basic( name_, bits_, extend_, max_, cons_, sortname_, tdf_info )\
88
    {\
89
	tdf *x74_ = GEN_tdf ( 7, TYPEID_info ) ;\
90
	x74_->ag_tag = 1 ;\
91
	COPY_string ( x74_ + 1, ( name_ ) ) ;\
92
	COPY_unsigned ( x74_ + 2, ( bits_ ) ) ;\
93
	COPY_unsigned ( x74_ + 3, ( extend_ ) ) ;\
94
	COPY_unsigned ( x74_ + 4, ( max_ ) ) ;\
95
	COPY_list ( x74_ + 5, ( cons_ ) ) ;\
96
	COPY_cons ( x74_ + 6, ( sortname_ ) ) ;\
97
	( tdf_info ) = x74_ ;\
98
    }
99
 
100
#define DECONS_info_basic( name_, bits_, extend_, max_, cons_, sortname_, tdf_info )\
101
    {\
102
	tdf *x75_ = CHECK_TAG ( ( tdf_info ), 1 ) ;\
103
	( name_ ) = DEREF_string ( x75_ + 1 ) ;\
104
	( bits_ ) = DEREF_unsigned ( x75_ + 2 ) ;\
105
	( extend_ ) = DEREF_unsigned ( x75_ + 3 ) ;\
106
	( max_ ) = DEREF_unsigned ( x75_ + 4 ) ;\
107
	( cons_ ) = DEREF_list ( x75_ + 5 ) ;\
108
	( sortname_ ) = DEREF_cons ( x75_ + 6 ) ;\
109
    }
110
 
111
#define DESTROY_info_basic( destroyer_, name_, bits_, extend_, max_, cons_, sortname_, tdf_info )\
112
    {\
113
	tdf *x76_ = CHECK_TAG ( ( tdf_info ), 1 ) ;\
114
	( name_ ) = DEREF_string ( x76_ + 1 ) ;\
115
	( bits_ ) = DEREF_unsigned ( x76_ + 2 ) ;\
116
	( extend_ ) = DEREF_unsigned ( x76_ + 3 ) ;\
117
	( max_ ) = DEREF_unsigned ( x76_ + 4 ) ;\
118
	( cons_ ) = DEREF_list ( x76_ + 5 ) ;\
119
	( sortname_ ) = DEREF_cons ( x76_ + 6 ) ;\
120
	( destroyer_ ) ( x76_, ( unsigned ) 7 ) ;\
121
    }
122
 
123
 
124
/* Operations for field dummy of union SORT_INFO */
125
 
126
#define info_dummy_tag			( ( unsigned ) 2 )
127
#define IS_info_dummy( P )		( CHECK_NULL ( P )->ag_tag == 2 )
128
 
129
#define info_dummy_cons( P )		( CHECK_TAG ( ( P ), 2 ) + 2 )
130
 
131
#define MAKE_info_dummy( name_, cons_, tdf_info )\
132
    {\
133
	tdf *x77_ = GEN_tdf ( 3, TYPEID_info ) ;\
134
	x77_->ag_tag = 2 ;\
135
	COPY_string ( x77_ + 1, ( name_ ) ) ;\
136
	COPY_cons ( x77_ + 2, ( cons_ ) ) ;\
137
	( tdf_info ) = x77_ ;\
138
    }
139
 
140
#define DECONS_info_dummy( name_, cons_, tdf_info )\
141
    {\
142
	tdf *x78_ = CHECK_TAG ( ( tdf_info ), 2 ) ;\
143
	( name_ ) = DEREF_string ( x78_ + 1 ) ;\
144
	( cons_ ) = DEREF_cons ( x78_ + 2 ) ;\
145
    }
146
 
147
#define DESTROY_info_dummy( destroyer_, name_, cons_, tdf_info )\
148
    {\
149
	tdf *x79_ = CHECK_TAG ( ( tdf_info ), 2 ) ;\
150
	( name_ ) = DEREF_string ( x79_ + 1 ) ;\
151
	( cons_ ) = DEREF_cons ( x79_ + 2 ) ;\
152
	( destroyer_ ) ( x79_, ( unsigned ) 3 ) ;\
153
    }
154
 
155
 
156
/* Operations for field set clist_etc of union SORT_INFO */
157
 
158
#define info_clist_etc_tag		( ( unsigned ) 6 )
159
#define IS_info_clist_etc( P )		( ( unsigned ) ( CHECK_NULL ( P )->ag_tag - 3 ) < ( unsigned ) 3 )
160
 
161
#define info_clist_etc_arg( P )		( CHECK_TAG_ETC ( ( P ), 3, 6 ) + 2 )
162
 
163
#define MAKE_info_clist_etc( tag, name_, arg_, tdf_info )\
164
    {\
165
	tdf *x80_ = GEN_tdf ( 3, TYPEID_info ) ;\
166
	x80_->ag_tag = ( tag ) ;\
167
	COPY_string ( x80_ + 1, ( name_ ) ) ;\
168
	COPY_sort ( x80_ + 2, ( arg_ ) ) ;\
169
	( tdf_info ) = CHECK_TAG_ETC ( x80_, 3, 6 ) ;\
170
    }
171
 
172
#define MODIFY_info_clist_etc( tag, tdf_info )\
173
    {\
174
	tdf *x81_ = CHECK_TAG_ETC ( ( tdf_info ), 3, 6 ) ;\
175
	x81_->ag_tag = ( tag ) ;\
176
	( void ) CHECK_TAG_ETC ( x81_, 3, 6 ) ;\
177
    }
178
 
179
#define DECONS_info_clist_etc( name_, arg_, tdf_info )\
180
    {\
181
	tdf *x82_ = CHECK_TAG_ETC ( ( tdf_info ), 3, 6 ) ;\
182
	( name_ ) = DEREF_string ( x82_ + 1 ) ;\
183
	( arg_ ) = DEREF_sort ( x82_ + 2 ) ;\
184
    }
185
 
186
#define DESTROY_info_clist_etc( destroyer_, name_, arg_, tdf_info )\
187
    {\
188
	tdf *x83_ = CHECK_TAG_ETC ( ( tdf_info ), 3, 6 ) ;\
189
	( name_ ) = DEREF_string ( x83_ + 1 ) ;\
190
	( arg_ ) = DEREF_sort ( x83_ + 2 ) ;\
191
	( destroyer_ ) ( x83_, ( unsigned ) 3 ) ;\
192
    }
193
 
194
 
195
/* Operations for field clist of union SORT_INFO */
196
 
197
#define info_clist_tag			( ( unsigned ) 3 )
198
#define IS_info_clist( P )		( CHECK_NULL ( P )->ag_tag == 3 )
199
 
200
#define info_clist_arg( P )		( CHECK_TAG ( ( P ), 3 ) + 2 )
201
 
202
#define MAKE_info_clist( name_, arg_, tdf_info )\
203
    {\
204
	tdf *x84_ = GEN_tdf ( 3, TYPEID_info ) ;\
205
	x84_->ag_tag = 3 ;\
206
	COPY_string ( x84_ + 1, ( name_ ) ) ;\
207
	COPY_sort ( x84_ + 2, ( arg_ ) ) ;\
208
	( tdf_info ) = x84_ ;\
209
    }
210
 
211
#define DECONS_info_clist( name_, arg_, tdf_info )\
212
    {\
213
	tdf *x85_ = CHECK_TAG ( ( tdf_info ), 3 ) ;\
214
	( name_ ) = DEREF_string ( x85_ + 1 ) ;\
215
	( arg_ ) = DEREF_sort ( x85_ + 2 ) ;\
216
    }
217
 
218
#define DESTROY_info_clist( destroyer_, name_, arg_, tdf_info )\
219
    {\
220
	tdf *x86_ = CHECK_TAG ( ( tdf_info ), 3 ) ;\
221
	( name_ ) = DEREF_string ( x86_ + 1 ) ;\
222
	( arg_ ) = DEREF_sort ( x86_ + 2 ) ;\
223
	( destroyer_ ) ( x86_, ( unsigned ) 3 ) ;\
224
    }
225
 
226
 
227
/* Operations for field slist of union SORT_INFO */
228
 
229
#define info_slist_tag			( ( unsigned ) 4 )
230
#define IS_info_slist( P )		( CHECK_NULL ( P )->ag_tag == 4 )
231
 
232
#define info_slist_arg( P )		( CHECK_TAG ( ( P ), 4 ) + 2 )
233
 
234
#define MAKE_info_slist( name_, arg_, tdf_info )\
235
    {\
236
	tdf *x87_ = GEN_tdf ( 3, TYPEID_info ) ;\
237
	x87_->ag_tag = 4 ;\
238
	COPY_string ( x87_ + 1, ( name_ ) ) ;\
239
	COPY_sort ( x87_ + 2, ( arg_ ) ) ;\
240
	( tdf_info ) = x87_ ;\
241
    }
242
 
243
#define DECONS_info_slist( name_, arg_, tdf_info )\
244
    {\
245
	tdf *x88_ = CHECK_TAG ( ( tdf_info ), 4 ) ;\
246
	( name_ ) = DEREF_string ( x88_ + 1 ) ;\
247
	( arg_ ) = DEREF_sort ( x88_ + 2 ) ;\
248
    }
249
 
250
#define DESTROY_info_slist( destroyer_, name_, arg_, tdf_info )\
251
    {\
252
	tdf *x89_ = CHECK_TAG ( ( tdf_info ), 4 ) ;\
253
	( name_ ) = DEREF_string ( x89_ + 1 ) ;\
254
	( arg_ ) = DEREF_sort ( x89_ + 2 ) ;\
255
	( destroyer_ ) ( x89_, ( unsigned ) 3 ) ;\
256
    }
257
 
258
 
259
/* Operations for field option of union SORT_INFO */
260
 
261
#define info_option_tag			( ( unsigned ) 5 )
262
#define IS_info_option( P )		( CHECK_NULL ( P )->ag_tag == 5 )
263
 
264
#define info_option_arg( P )		( CHECK_TAG ( ( P ), 5 ) + 2 )
265
 
266
#define MAKE_info_option( name_, arg_, tdf_info )\
267
    {\
268
	tdf *x90_ = GEN_tdf ( 3, TYPEID_info ) ;\
269
	x90_->ag_tag = 5 ;\
270
	COPY_string ( x90_ + 1, ( name_ ) ) ;\
271
	COPY_sort ( x90_ + 2, ( arg_ ) ) ;\
272
	( tdf_info ) = x90_ ;\
273
    }
274
 
275
#define DECONS_info_option( name_, arg_, tdf_info )\
276
    {\
277
	tdf *x91_ = CHECK_TAG ( ( tdf_info ), 5 ) ;\
278
	( name_ ) = DEREF_string ( x91_ + 1 ) ;\
279
	( arg_ ) = DEREF_sort ( x91_ + 2 ) ;\
280
    }
281
 
282
#define DESTROY_info_option( destroyer_, name_, arg_, tdf_info )\
283
    {\
284
	tdf *x92_ = CHECK_TAG ( ( tdf_info ), 5 ) ;\
285
	( name_ ) = DEREF_string ( x92_ + 1 ) ;\
286
	( arg_ ) = DEREF_sort ( x92_ + 2 ) ;\
287
	( destroyer_ ) ( x92_, ( unsigned ) 3 ) ;\
288
    }
289
 
290
 
291
#endif