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 |
#ifndef ERR_EXT_INCLUDED
|
|
|
32 |
#define ERR_EXT_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
ERROR OPERATIONS
|
|
|
37 |
|
|
|
38 |
This file describes the operations on errors. It includes the simple
|
|
|
39 |
operations generated by the calculus tool and extends them by a number
|
|
|
40 |
of hand crafted operations. This file is automatically generated from
|
|
|
41 |
algebra %X (version %V) by %ZX (version %ZV).
|
|
|
42 |
*/
|
|
|
43 |
|
|
|
44 |
#include "err_ops.h"
|
|
|
45 |
@if token
|
|
|
46 |
|
|
|
47 |
#pragma token PROC (\
|
|
|
48 |
EXP : int : sev,\
|
|
|
49 |
EXP : int : no,\
|
|
|
50 |
EXP : unsigned : sz,\
|
|
|
51 |
EXP lvalue : ERROR : e\
|
|
|
52 |
) STATEMENT MAKE_err_simple_args #
|
|
|
53 |
|
|
|
54 |
#pragma token PROC (\
|
|
|
55 |
EXP : ERROR : e\
|
|
|
56 |
) STATEMENT DESTROY_err_simple_args #
|
|
|
57 |
|
|
|
58 |
#pragma token PROC (\
|
|
|
59 |
EXP : ERROR : e,\
|
|
|
60 |
EXP : unsigned : n,\
|
|
|
61 |
TYPE t\
|
|
|
62 |
) EXP : PTR ( t ) : err_arg #
|
|
|
63 |
|
|
|
64 |
#pragma interface MAKE_err_simple_args DESTROY_err_simple_args err_arg
|
|
|
65 |
|
|
|
66 |
@else
|
|
|
67 |
|
|
|
68 |
#define SIZE_err_simple 4
|
|
|
69 |
|
|
|
70 |
#define MAKE_err_simple_args( A, B, C, E )\
|
|
|
71 |
{\
|
|
|
72 |
unsigned sz_ = ( C ) ;\
|
|
|
73 |
c_class *err_ = GEN_c_class ( SIZE_err_simple + sz_, TYPEID_err ) ;\
|
|
|
74 |
err_->ag_tag = err_simple_tag ;\
|
|
|
75 |
COPY_int ( err_severity ( err_ ), ( A ) ) ;\
|
|
|
76 |
COPY_int ( err_simple_number ( err_ ), ( B ) ) ;\
|
|
|
77 |
COPY_unsigned ( err_simple_size ( err_ ), sz_ ) ;\
|
|
|
78 |
( E ) = err_ ;\
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
#define DESTROY_err_simple_args( E )\
|
|
|
82 |
{\
|
|
|
83 |
ERROR err_ = ( E ) ;\
|
|
|
84 |
unsigned sz_ = DEREF_unsigned ( err_simple_size ( err_ ) ) ;\
|
|
|
85 |
destroy_c_class ( err_, SIZE_err_simple + sz_ ) ;\
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
#define err_arg( E, A, T )\
|
|
|
89 |
( ( E ) + ( SIZE_err_simple + ( A ) ) )
|
|
|
90 |
|
|
|
91 |
@endif
|
|
|
92 |
|
|
|
93 |
#endif
|