Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | 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
 
7 7u83 40
#define TAG_info(P)			(CHECK_NULL(P)->ag_tag)
2 7u83 41
 
42
 
43
/* Operations for component name of union SORT_INFO */
44
 
7 7u83 45
#define info_name(P)			(CHECK_NULL(P) + 1)
2 7u83 46
 
47
 
48
/* Operations for field builtin of union SORT_INFO */
49
 
7 7u83 50
#define info_builtin_tag		((unsigned)0)
51
#define IS_info_builtin(P)		(CHECK_NULL(P)->ag_tag == 0)
2 7u83 52
 
53
 
7 7u83 54
#define MAKE_info_builtin(name_, tdf_info)\
2 7u83 55
    {\
7 7u83 56
	tdf *x71_ = GEN_tdf(2, TYPEID_info);\
57
	x71_->ag_tag = 0;\
58
	COPY_string(x71_ + 1, (name_));\
59
	(tdf_info) = x71_;\
2 7u83 60
    }
61
 
7 7u83 62
#define DECONS_info_builtin(name_, tdf_info)\
2 7u83 63
    {\
7 7u83 64
	tdf *x72_ = CHECK_TAG((tdf_info), 0);\
65
	(name_) = DEREF_string(x72_ + 1);\
2 7u83 66
    }
67
 
7 7u83 68
#define DESTROY_info_builtin(destroyer_, name_, tdf_info)\
2 7u83 69
    {\
7 7u83 70
	tdf *x73_ = CHECK_TAG((tdf_info), 0);\
71
	(name_) = DEREF_string(x73_ + 1);\
72
	(destroyer_)(x73_, (unsigned)2);\
2 7u83 73
    }
74
 
75
 
76
/* Operations for field basic of union SORT_INFO */
77
 
7 7u83 78
#define info_basic_tag			((unsigned)1)
79
#define IS_info_basic(P)		(CHECK_NULL(P)->ag_tag == 1)
2 7u83 80
 
7 7u83 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)
2 7u83 86
 
7 7u83 87
#define MAKE_info_basic(name_, bits_, extend_, max_, cons_, sortname_, tdf_info)\
2 7u83 88
    {\
7 7u83 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_;\
2 7u83 98
    }
99
 
7 7u83 100
#define DECONS_info_basic(name_, bits_, extend_, max_, cons_, sortname_, tdf_info)\
2 7u83 101
    {\
7 7u83 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);\
2 7u83 109
    }
110
 
7 7u83 111
#define DESTROY_info_basic(destroyer_, name_, bits_, extend_, max_, cons_, sortname_, tdf_info)\
2 7u83 112
    {\
7 7u83 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);\
2 7u83 121
    }
122
 
123
 
124
/* Operations for field dummy of union SORT_INFO */
125
 
7 7u83 126
#define info_dummy_tag			((unsigned)2)
127
#define IS_info_dummy(P)		(CHECK_NULL(P)->ag_tag == 2)
2 7u83 128
 
7 7u83 129
#define info_dummy_cons(P)		(CHECK_TAG((P), 2) + 2)
2 7u83 130
 
7 7u83 131
#define MAKE_info_dummy(name_, cons_, tdf_info)\
2 7u83 132
    {\
7 7u83 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_;\
2 7u83 138
    }
139
 
7 7u83 140
#define DECONS_info_dummy(name_, cons_, tdf_info)\
2 7u83 141
    {\
7 7u83 142
	tdf *x78_ = CHECK_TAG((tdf_info), 2);\
143
	(name_) = DEREF_string(x78_ + 1);\
144
	(cons_) = DEREF_cons(x78_ + 2);\
2 7u83 145
    }
146
 
7 7u83 147
#define DESTROY_info_dummy(destroyer_, name_, cons_, tdf_info)\
2 7u83 148
    {\
7 7u83 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);\
2 7u83 153
    }
154
 
155
 
156
/* Operations for field set clist_etc of union SORT_INFO */
157
 
7 7u83 158
#define info_clist_etc_tag		((unsigned)6)
159
#define IS_info_clist_etc(P)		((unsigned)(CHECK_NULL(P)->ag_tag - 3) < (unsigned)3)
2 7u83 160
 
7 7u83 161
#define info_clist_etc_arg(P)		(CHECK_TAG_ETC((P), 3, 6) + 2)
2 7u83 162
 
7 7u83 163
#define MAKE_info_clist_etc(tag, name_, arg_, tdf_info)\
2 7u83 164
    {\
7 7u83 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);\
2 7u83 170
    }
171
 
7 7u83 172
#define MODIFY_info_clist_etc(tag, tdf_info)\
2 7u83 173
    {\
7 7u83 174
	tdf *x81_ = CHECK_TAG_ETC ((tdf_info), 3, 6);\
175
	x81_->ag_tag = (tag);\
176
	(void) CHECK_TAG_ETC (x81_, 3, 6);\
2 7u83 177
    }
178
 
7 7u83 179
#define DECONS_info_clist_etc(name_, arg_, tdf_info)\
2 7u83 180
    {\
7 7u83 181
	tdf *x82_ = CHECK_TAG_ETC((tdf_info), 3, 6);\
182
	(name_) = DEREF_string(x82_ + 1);\
183
	(arg_) = DEREF_sort(x82_ + 2);\
2 7u83 184
    }
185
 
7 7u83 186
#define DESTROY_info_clist_etc(destroyer_, name_, arg_, tdf_info)\
2 7u83 187
    {\
7 7u83 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);\
2 7u83 192
    }
193
 
194
 
195
/* Operations for field clist of union SORT_INFO */
196
 
7 7u83 197
#define info_clist_tag			((unsigned)3)
198
#define IS_info_clist(P)		(CHECK_NULL(P)->ag_tag == 3)
2 7u83 199
 
7 7u83 200
#define info_clist_arg(P)		(CHECK_TAG((P), 3) + 2)
2 7u83 201
 
7 7u83 202
#define MAKE_info_clist(name_, arg_, tdf_info)\
2 7u83 203
    {\
7 7u83 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_;\
2 7u83 209
    }
210
 
7 7u83 211
#define DECONS_info_clist(name_, arg_, tdf_info)\
2 7u83 212
    {\
7 7u83 213
	tdf *x85_ = CHECK_TAG((tdf_info), 3);\
214
	(name_) = DEREF_string(x85_ + 1);\
215
	(arg_) = DEREF_sort(x85_ + 2);\
2 7u83 216
    }
217
 
7 7u83 218
#define DESTROY_info_clist(destroyer_, name_, arg_, tdf_info)\
2 7u83 219
    {\
7 7u83 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);\
2 7u83 224
    }
225
 
226
 
227
/* Operations for field slist of union SORT_INFO */
228
 
7 7u83 229
#define info_slist_tag			((unsigned)4)
230
#define IS_info_slist(P)		(CHECK_NULL(P)->ag_tag == 4)
2 7u83 231
 
7 7u83 232
#define info_slist_arg(P)		(CHECK_TAG((P), 4) + 2)
2 7u83 233
 
7 7u83 234
#define MAKE_info_slist(name_, arg_, tdf_info)\
2 7u83 235
    {\
7 7u83 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_;\
2 7u83 241
    }
242
 
7 7u83 243
#define DECONS_info_slist(name_, arg_, tdf_info)\
2 7u83 244
    {\
7 7u83 245
	tdf *x88_ = CHECK_TAG((tdf_info), 4);\
246
	(name_) = DEREF_string(x88_ + 1);\
247
	(arg_) = DEREF_sort(x88_ + 2);\
2 7u83 248
    }
249
 
7 7u83 250
#define DESTROY_info_slist(destroyer_, name_, arg_, tdf_info)\
2 7u83 251
    {\
7 7u83 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);\
2 7u83 256
    }
257
 
258
 
259
/* Operations for field option of union SORT_INFO */
260
 
7 7u83 261
#define info_option_tag			((unsigned)5)
262
#define IS_info_option(P)		(CHECK_NULL(P)->ag_tag == 5)
2 7u83 263
 
7 7u83 264
#define info_option_arg(P)		(CHECK_TAG((P), 5) + 2)
2 7u83 265
 
7 7u83 266
#define MAKE_info_option(name_, arg_, tdf_info)\
2 7u83 267
    {\
7 7u83 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_;\
2 7u83 273
    }
274
 
7 7u83 275
#define DECONS_info_option(name_, arg_, tdf_info)\
2 7u83 276
    {\
7 7u83 277
	tdf *x91_ = CHECK_TAG((tdf_info), 5);\
278
	(name_) = DEREF_string(x91_ + 1);\
279
	(arg_) = DEREF_sort(x91_ + 2);\
2 7u83 280
    }
281
 
7 7u83 282
#define DESTROY_info_option(destroyer_, name_, arg_, tdf_info)\
2 7u83 283
    {\
7 7u83 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);\
2 7u83 288
    }
289
 
290
 
291
#endif