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 ERR_OPS_H_INCLUDED
36
#define ERR_OPS_H_INCLUDED
37
 
38
/* Operations for union ERROR */
39
 
6 7u83 40
#define TAG_err(P)			(CHECK_NULL(P)->ag_tag)
2 7u83 41
 
42
 
43
/* Operations for component severity of union ERROR */
44
 
6 7u83 45
#define err_severity(P)			(CHECK_NULL(P) + 1)
2 7u83 46
 
47
 
48
/* Operations for field simple of union ERROR */
49
 
6 7u83 50
#define err_simple_tag			((unsigned)0)
51
#define IS_err_simple(P)		(CHECK_NULL(P)->ag_tag == 0)
2 7u83 52
 
6 7u83 53
#define err_simple_number(P)		(CHECK_TAG((P), 0) + 2)
54
#define err_simple_size(P)		(CHECK_TAG((P), 0) + 3)
2 7u83 55
 
6 7u83 56
#define MAKE_err_simple(severity_, number_, c_class_err)\
2 7u83 57
    {\
6 7u83 58
	c_class *x857_ = GEN_c_class(4, TYPEID_err);\
59
	x857_->ag_tag = 0;\
60
	COPY_int(x857_ + 1, (severity_));\
61
	COPY_int(x857_ + 2, (number_));\
62
	COPY_unsigned(x857_ + 3, 0);\
63
	(c_class_err) = x857_;\
2 7u83 64
    }
65
 
6 7u83 66
#define DECONS_err_simple(severity_, number_, size_, c_class_err)\
2 7u83 67
    {\
6 7u83 68
	c_class *x858_ = CHECK_TAG((c_class_err), 0);\
69
	(severity_) = DEREF_int(x858_ + 1);\
70
	(number_) = DEREF_int(x858_ + 2);\
71
	(size_) = DEREF_unsigned(x858_ + 3);\
2 7u83 72
    }
73
 
6 7u83 74
#define DESTROY_err_simple(destroyer_, severity_, number_, size_, c_class_err)\
2 7u83 75
    {\
6 7u83 76
	c_class *x859_ = CHECK_TAG((c_class_err), 0);\
77
	(severity_) = DEREF_int(x859_ + 1);\
78
	(number_) = DEREF_int(x859_ + 2);\
79
	(size_) = DEREF_unsigned(x859_ + 3);\
80
	(destroyer_)(x859_, (unsigned)4);\
2 7u83 81
    }
82
 
83
 
84
/* Operations for field compound of union ERROR */
85
 
6 7u83 86
#define err_compound_tag		((unsigned)1)
87
#define IS_err_compound(P)		(CHECK_NULL(P)->ag_tag == 1)
2 7u83 88
 
6 7u83 89
#define err_compound_head(P)		(CHECK_TAG((P), 1) + 2)
90
#define err_compound_tail(P)		(CHECK_TAG((P), 1) + 3)
2 7u83 91
 
6 7u83 92
#define MAKE_err_compound(severity_, head_, tail_, c_class_err)\
2 7u83 93
    {\
6 7u83 94
	c_class *x860_ = GEN_c_class(4, TYPEID_err);\
95
	x860_->ag_tag = 1;\
96
	COPY_int(x860_ + 1, (severity_));\
97
	COPY_err(x860_ + 2, (head_));\
98
	COPY_err(x860_ + 3, (tail_));\
99
	(c_class_err) = x860_;\
2 7u83 100
    }
101
 
6 7u83 102
#define DECONS_err_compound(severity_, head_, tail_, c_class_err)\
2 7u83 103
    {\
6 7u83 104
	c_class *x861_ = CHECK_TAG((c_class_err), 1);\
105
	(severity_) = DEREF_int(x861_ + 1);\
106
	(head_) = DEREF_err(x861_ + 2);\
107
	(tail_) = DEREF_err(x861_ + 3);\
2 7u83 108
    }
109
 
6 7u83 110
#define DESTROY_err_compound(destroyer_, severity_, head_, tail_, c_class_err)\
2 7u83 111
    {\
6 7u83 112
	c_class *x862_ = CHECK_TAG((c_class_err), 1);\
113
	(severity_) = DEREF_int(x862_ + 1);\
114
	(head_) = DEREF_err(x862_ + 2);\
115
	(tail_) = DEREF_err(x862_ + 3);\
116
	(destroyer_)(x862_, (unsigned)4);\
2 7u83 117
    }
118
 
119
 
120
#endif