Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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