Subversion Repositories tendra.SVN

Rev

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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 FTYPE_OPS_H_INCLUDED
36
#define FTYPE_OPS_H_INCLUDED
37
 
38
/* Operations for union FLOAT_TYPE */
39
 
6 7u83 40
#define TAG_ftype(P)			(CHECK_NULL(P)->ag_tag)
2 7u83 41
 
42
 
43
/* Operations for component arg_prom of union FLOAT_TYPE */
44
 
6 7u83 45
#define ftype_arg_prom(P)		(CHECK_NULL(P) + 1)
2 7u83 46
 
47
 
48
/* Operations for component ftok of union FLOAT_TYPE */
49
 
6 7u83 50
#define ftype_ftok(P)			(CHECK_NULL(P) + 2)
2 7u83 51
 
52
 
53
/* Operations for component ntok of union FLOAT_TYPE */
54
 
6 7u83 55
#define ftype_ntok(P)			(CHECK_NULL(P) + 3)
2 7u83 56
 
57
 
58
/* Operations for component diag of union FLOAT_TYPE */
59
 
6 7u83 60
#define ftype_diag(P)			(CHECK_NULL(P) + 4)
2 7u83 61
 
62
 
63
/* Operations for component small of union FLOAT_TYPE */
64
 
6 7u83 65
#define ftype_small(P)			(CHECK_NULL(P) + 5)
2 7u83 66
 
67
 
68
/* Operations for field basic of union FLOAT_TYPE */
69
 
6 7u83 70
#define ftype_basic_tag			((unsigned)0)
71
#define IS_ftype_basic(P)		(CHECK_NULL(P)->ag_tag == 0)
2 7u83 72
 
6 7u83 73
#define ftype_basic_rep(P)		(CHECK_TAG((P), 0) + 6)
74
#define ftype_basic_no(P)		(CHECK_TAG((P), 0) + 7)
2 7u83 75
 
6 7u83 76
#define MAKE_ftype_basic(arg_prom_, rep_, no_, c_class_ftype)\
2 7u83 77
    {\
6 7u83 78
	c_class *x187_ = GEN_c_class(8, TYPEID_ftype);\
79
	x187_->ag_tag = 0;\
80
	COPY_type(x187_ + 1, (arg_prom_));\
81
	COPY_ulong(x187_ + 2, LINK_NONE);\
82
	COPY_ulong(x187_ + 3, LINK_NONE);\
83
	COPY_ulong(x187_ + 4, LINK_NONE);\
84
	COPY_list(x187_ + 5, NULL_list ( FLOAT ));\
85
	COPY_btype(x187_ + 6, (rep_));\
86
	COPY_ntype(x187_ + 7, (no_));\
87
	(c_class_ftype) = x187_;\
2 7u83 88
    }
89
 
6 7u83 90
#define DECONS_ftype_basic(arg_prom_, ftok_, ntok_, diag_, small_, rep_, no_, c_class_ftype)\
2 7u83 91
    {\
6 7u83 92
	c_class *x188_ = CHECK_TAG((c_class_ftype), 0);\
93
	(arg_prom_) = DEREF_type(x188_ + 1);\
94
	(ftok_) = DEREF_ulong(x188_ + 2);\
95
	(ntok_) = DEREF_ulong(x188_ + 3);\
96
	(diag_) = DEREF_ulong(x188_ + 4);\
97
	(small_) = DEREF_list(x188_ + 5);\
98
	(rep_) = DEREF_btype(x188_ + 6);\
99
	(no_) = DEREF_ntype(x188_ + 7);\
2 7u83 100
    }
101
 
6 7u83 102
#define DESTROY_ftype_basic(destroyer_, arg_prom_, ftok_, ntok_, diag_, small_, rep_, no_, c_class_ftype)\
2 7u83 103
    {\
6 7u83 104
	c_class *x189_ = CHECK_TAG((c_class_ftype), 0);\
105
	(arg_prom_) = DEREF_type(x189_ + 1);\
106
	(ftok_) = DEREF_ulong(x189_ + 2);\
107
	(ntok_) = DEREF_ulong(x189_ + 3);\
108
	(diag_) = DEREF_ulong(x189_ + 4);\
109
	(small_) = DEREF_list(x189_ + 5);\
110
	(rep_) = DEREF_btype(x189_ + 6);\
111
	(no_) = DEREF_ntype(x189_ + 7);\
112
	(destroyer_)(x189_, (unsigned)8);\
2 7u83 113
    }
114
 
115
 
116
/* Operations for field arg_promote of union FLOAT_TYPE */
117
 
6 7u83 118
#define ftype_arg_promote_tag		((unsigned)1)
119
#define IS_ftype_arg_promote(P)		(CHECK_NULL(P)->ag_tag == 1)
2 7u83 120
 
6 7u83 121
#define ftype_arg_promote_arg(P)	(CHECK_TAG((P), 1) + 6)
2 7u83 122
 
6 7u83 123
#define MAKE_ftype_arg_promote(arg_prom_, arg_, c_class_ftype)\
2 7u83 124
    {\
6 7u83 125
	c_class *x190_ = GEN_c_class(7, TYPEID_ftype);\
126
	x190_->ag_tag = 1;\
127
	COPY_type(x190_ + 1, (arg_prom_));\
128
	COPY_ulong(x190_ + 2, LINK_NONE);\
129
	COPY_ulong(x190_ + 3, LINK_NONE);\
130
	COPY_ulong(x190_ + 4, LINK_NONE);\
131
	COPY_list(x190_ + 5, NULL_list ( FLOAT ));\
132
	COPY_ftype(x190_ + 6, (arg_));\
133
	(c_class_ftype) = x190_;\
2 7u83 134
    }
135
 
6 7u83 136
#define DECONS_ftype_arg_promote(arg_prom_, ftok_, ntok_, diag_, small_, arg_, c_class_ftype)\
2 7u83 137
    {\
6 7u83 138
	c_class *x191_ = CHECK_TAG((c_class_ftype), 1);\
139
	(arg_prom_) = DEREF_type(x191_ + 1);\
140
	(ftok_) = DEREF_ulong(x191_ + 2);\
141
	(ntok_) = DEREF_ulong(x191_ + 3);\
142
	(diag_) = DEREF_ulong(x191_ + 4);\
143
	(small_) = DEREF_list(x191_ + 5);\
144
	(arg_) = DEREF_ftype(x191_ + 6);\
2 7u83 145
    }
146
 
6 7u83 147
#define DESTROY_ftype_arg_promote(destroyer_, arg_prom_, ftok_, ntok_, diag_, small_, arg_, c_class_ftype)\
2 7u83 148
    {\
6 7u83 149
	c_class *x192_ = CHECK_TAG((c_class_ftype), 1);\
150
	(arg_prom_) = DEREF_type(x192_ + 1);\
151
	(ftok_) = DEREF_ulong(x192_ + 2);\
152
	(ntok_) = DEREF_ulong(x192_ + 3);\
153
	(diag_) = DEREF_ulong(x192_ + 4);\
154
	(small_) = DEREF_list(x192_ + 5);\
155
	(arg_) = DEREF_ftype(x192_ + 6);\
156
	(destroyer_)(x192_, (unsigned)7);\
2 7u83 157
    }
158
 
159
 
160
/* Operations for field arith of union FLOAT_TYPE */
161
 
6 7u83 162
#define ftype_arith_tag			((unsigned)2)
163
#define IS_ftype_arith(P)		(CHECK_NULL(P)->ag_tag == 2)
2 7u83 164
 
6 7u83 165
#define ftype_arith_arg1(P)		(CHECK_TAG((P), 2) + 6)
166
#define ftype_arith_arg2(P)		(CHECK_TAG((P), 2) + 7)
2 7u83 167
 
6 7u83 168
#define MAKE_ftype_arith(arg_prom_, arg1_, arg2_, c_class_ftype)\
2 7u83 169
    {\
6 7u83 170
	c_class *x193_ = GEN_c_class(8, TYPEID_ftype);\
171
	x193_->ag_tag = 2;\
172
	COPY_type(x193_ + 1, (arg_prom_));\
173
	COPY_ulong(x193_ + 2, LINK_NONE);\
174
	COPY_ulong(x193_ + 3, LINK_NONE);\
175
	COPY_ulong(x193_ + 4, LINK_NONE);\
176
	COPY_list(x193_ + 5, NULL_list ( FLOAT ));\
177
	COPY_ftype(x193_ + 6, (arg1_));\
178
	COPY_ftype(x193_ + 7, (arg2_));\
179
	(c_class_ftype) = x193_;\
2 7u83 180
    }
181
 
6 7u83 182
#define DECONS_ftype_arith(arg_prom_, ftok_, ntok_, diag_, small_, arg1_, arg2_, c_class_ftype)\
2 7u83 183
    {\
6 7u83 184
	c_class *x194_ = CHECK_TAG((c_class_ftype), 2);\
185
	(arg_prom_) = DEREF_type(x194_ + 1);\
186
	(ftok_) = DEREF_ulong(x194_ + 2);\
187
	(ntok_) = DEREF_ulong(x194_ + 3);\
188
	(diag_) = DEREF_ulong(x194_ + 4);\
189
	(small_) = DEREF_list(x194_ + 5);\
190
	(arg1_) = DEREF_ftype(x194_ + 6);\
191
	(arg2_) = DEREF_ftype(x194_ + 7);\
2 7u83 192
    }
193
 
6 7u83 194
#define DESTROY_ftype_arith(destroyer_, arg_prom_, ftok_, ntok_, diag_, small_, arg1_, arg2_, c_class_ftype)\
2 7u83 195
    {\
6 7u83 196
	c_class *x195_ = CHECK_TAG((c_class_ftype), 2);\
197
	(arg_prom_) = DEREF_type(x195_ + 1);\
198
	(ftok_) = DEREF_ulong(x195_ + 2);\
199
	(ntok_) = DEREF_ulong(x195_ + 3);\
200
	(diag_) = DEREF_ulong(x195_ + 4);\
201
	(small_) = DEREF_list(x195_ + 5);\
202
	(arg1_) = DEREF_ftype(x195_ + 6);\
203
	(arg2_) = DEREF_ftype(x195_ + 7);\
204
	(destroyer_)(x195_, (unsigned)8);\
2 7u83 205
    }
206
 
207
 
208
/* Operations for field token of union FLOAT_TYPE */
209
 
6 7u83 210
#define ftype_token_tag			((unsigned)3)
211
#define IS_ftype_token(P)		(CHECK_NULL(P)->ag_tag == 3)
2 7u83 212
 
6 7u83 213
#define ftype_token_tok(P)		(CHECK_TAG((P), 3) + 6)
214
#define ftype_token_args(P)		(CHECK_TAG((P), 3) + 7)
2 7u83 215
 
6 7u83 216
#define MAKE_ftype_token(arg_prom_, tok_, args_, c_class_ftype)\
2 7u83 217
    {\
6 7u83 218
	c_class *x196_ = GEN_c_class(8, TYPEID_ftype);\
219
	x196_->ag_tag = 3;\
220
	COPY_type(x196_ + 1, (arg_prom_));\
221
	COPY_ulong(x196_ + 2, LINK_NONE);\
222
	COPY_ulong(x196_ + 3, LINK_NONE);\
223
	COPY_ulong(x196_ + 4, LINK_NONE);\
224
	COPY_list(x196_ + 5, NULL_list ( FLOAT ));\
225
	COPY_id(x196_ + 6, (tok_));\
226
	COPY_list(x196_ + 7, (args_));\
227
	(c_class_ftype) = x196_;\
2 7u83 228
    }
229
 
6 7u83 230
#define DECONS_ftype_token(arg_prom_, ftok_, ntok_, diag_, small_, tok_, args_, c_class_ftype)\
2 7u83 231
    {\
6 7u83 232
	c_class *x197_ = CHECK_TAG((c_class_ftype), 3);\
233
	(arg_prom_) = DEREF_type(x197_ + 1);\
234
	(ftok_) = DEREF_ulong(x197_ + 2);\
235
	(ntok_) = DEREF_ulong(x197_ + 3);\
236
	(diag_) = DEREF_ulong(x197_ + 4);\
237
	(small_) = DEREF_list(x197_ + 5);\
238
	(tok_) = DEREF_id(x197_ + 6);\
239
	(args_) = DEREF_list(x197_ + 7);\
2 7u83 240
    }
241
 
6 7u83 242
#define DESTROY_ftype_token(destroyer_, arg_prom_, ftok_, ntok_, diag_, small_, tok_, args_, c_class_ftype)\
2 7u83 243
    {\
6 7u83 244
	c_class *x198_ = CHECK_TAG((c_class_ftype), 3);\
245
	(arg_prom_) = DEREF_type(x198_ + 1);\
246
	(ftok_) = DEREF_ulong(x198_ + 2);\
247
	(ntok_) = DEREF_ulong(x198_ + 3);\
248
	(diag_) = DEREF_ulong(x198_ + 4);\
249
	(small_) = DEREF_list(x198_ + 5);\
250
	(tok_) = DEREF_id(x198_ + 6);\
251
	(args_) = DEREF_list(x198_ + 7);\
252
	(destroyer_)(x198_, (unsigned)8);\
2 7u83 253
    }
254
 
255
 
256
#endif