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 CAPSULE_INCLUDED
|
|
|
32 |
#define CAPSULE_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
TDF CAPSULE OUTPUT DECLARATIONS
|
|
|
37 |
|
|
|
38 |
The routines in this module describe the top level TDF output.
|
|
|
39 |
*/
|
|
|
40 |
|
|
|
41 |
extern void init_capsule PROTO_S ( ( void ) ) ;
|
|
|
42 |
extern void init_diag PROTO_S ( ( void ) ) ;
|
|
|
43 |
extern void write_capsule PROTO_S ( ( void ) ) ;
|
|
|
44 |
extern void output_option PROTO_S ( ( string ) ) ;
|
|
|
45 |
extern BITSTREAM *enc_version PROTO_S ( ( BITSTREAM * ) ) ;
|
|
|
46 |
|
|
|
47 |
extern int output_tdf ;
|
|
|
48 |
extern int output_capsule ;
|
|
|
49 |
extern int output_all ;
|
|
|
50 |
extern int output_bugs ;
|
|
|
51 |
extern int output_builtin ;
|
|
|
52 |
extern int output_date ;
|
|
|
53 |
extern int output_diag ;
|
|
|
54 |
extern int output_except ;
|
|
|
55 |
extern int output_init ;
|
|
|
56 |
extern int output_inline ;
|
|
|
57 |
extern int output_new_diag ;
|
|
|
58 |
extern int output_order ;
|
|
|
59 |
extern int output_partial ;
|
|
|
60 |
extern int output_rtti ;
|
|
|
61 |
extern int output_shared ;
|
|
|
62 |
extern int output_std ;
|
|
|
63 |
extern int output_term ;
|
|
|
64 |
extern int output_tokdec ;
|
|
|
65 |
extern int output_unused ;
|
|
|
66 |
extern int output_virtual ;
|
|
|
67 |
|
|
|
68 |
#if TDF_OUTPUT
|
|
|
69 |
|
|
|
70 |
extern int capsule_id PROTO_S ( ( IDENTIFIER, int ) ) ;
|
|
|
71 |
extern ulong capsule_no PROTO_S ( ( string, int ) ) ;
|
|
|
72 |
extern ulong capsule_name PROTO_S ( ( ulong, string *, int ) ) ;
|
|
|
73 |
extern ulong unit_no PROTO_S ( ( BITSTREAM *, IDENTIFIER, int, int ) ) ;
|
|
|
74 |
extern ulong link_no PROTO_S ( ( BITSTREAM *, ulong, int ) ) ;
|
|
|
75 |
extern void clear_no PROTO_S ( ( IDENTIFIER ) ) ;
|
|
|
76 |
extern ulong no_labels PROTO_S ( ( BITSTREAM * ) ) ;
|
|
|
77 |
extern void record_usage PROTO_S ( ( ulong, int, unsigned ) ) ;
|
|
|
78 |
extern void clear_usage PROTO_S ( ( ulong, int ) ) ;
|
|
|
79 |
extern unsigned find_usage PROTO_S ( ( ulong, int ) ) ;
|
|
|
80 |
extern void set_diag_tag PROTO_S ( ( IDENTIFIER, int, ulong ) ) ;
|
|
|
81 |
extern ulong get_diag_tag PROTO_S ( ( IDENTIFIER, int ) ) ;
|
|
|
82 |
extern void count_item PROTO_S ( ( BITSTREAM * ) ) ;
|
|
|
83 |
extern void clear_params PROTO_S ( ( void ) ) ;
|
|
|
84 |
|
|
|
85 |
extern BITSTREAM *tokdec_unit, *tokdef_unit ;
|
|
|
86 |
extern BITSTREAM *tagdec_unit, *tagdef_unit ;
|
|
|
87 |
extern BITSTREAM *aldef_unit, *linkinfo_unit ;
|
|
|
88 |
extern BITSTREAM *diagtype_unit, *diagdef_unit, *diagcomp_unit ;
|
|
|
89 |
extern BITSTREAM *init_func, *term_func, *term_static_func ;
|
|
|
90 |
extern ulong init_no, term_no ;
|
|
|
91 |
extern CLASS_TYPE last_class ;
|
|
|
92 |
extern ulong last_params [] ;
|
|
|
93 |
extern int last_conts [] ;
|
|
|
94 |
|
|
|
95 |
#endif
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
/*
|
|
|
99 |
CAPSULE VARIABLE TYPES
|
|
|
100 |
|
|
|
101 |
These values correspond to the various types of linkable entity and
|
|
|
102 |
entity groups within a TDF capsule. They are used as arguments to
|
|
|
103 |
capsule_id, unit_no etc. VAR_label is a dummy value used for labels.
|
|
|
104 |
*/
|
|
|
105 |
|
|
|
106 |
#define EQN_tld 0
|
|
|
107 |
#define EQN_versions 1
|
|
|
108 |
#define EQN_tokdec 2
|
|
|
109 |
#define EQN_tokdef 3
|
|
|
110 |
#define EQN_aldef 4
|
|
|
111 |
#define EQN_diagtype 5
|
|
|
112 |
#define EQN_tagdec 6
|
|
|
113 |
#define EQN_diagdef 7
|
|
|
114 |
#define EQN_dgcomp 8
|
|
|
115 |
#define EQN_tagdef 9
|
|
|
116 |
#define EQN_linkinfo 10
|
|
|
117 |
#define EQN_no 11
|
|
|
118 |
|
|
|
119 |
#define VAR_tag 0
|
|
|
120 |
#define VAR_token 1
|
|
|
121 |
#define VAR_alignment 2
|
|
|
122 |
#define VAR_diagtag 3
|
|
|
123 |
#define VAR_dgtag 4
|
|
|
124 |
#define VAR_no 5
|
|
|
125 |
|
|
|
126 |
#define VAR_label 5
|
|
|
127 |
#define VAR_total 6
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
/*
|
|
|
131 |
USAGE INFORMATION
|
|
|
132 |
|
|
|
133 |
These values are used to record the usage information for external
|
|
|
134 |
identifiers.
|
|
|
135 |
*/
|
|
|
136 |
|
|
|
137 |
#define USAGE_NONE ( ( unsigned ) 0x00 )
|
|
|
138 |
#define USAGE_USE ( ( unsigned ) 0x01 )
|
|
|
139 |
#define USAGE_DECL ( ( unsigned ) 0x02 )
|
|
|
140 |
#define USAGE_DEFN ( ( unsigned ) 0x04 )
|
|
|
141 |
#define USAGE_COMMON ( ( unsigned ) 0x08 )
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
/*
|
|
|
145 |
DUMMY TAG NUMBERS
|
|
|
146 |
|
|
|
147 |
These values give the codes for the dummy tag numbers stored in
|
|
|
148 |
last_params. The values 0-9 give the function parameter numbers.
|
|
|
149 |
*/
|
|
|
150 |
|
|
|
151 |
#define DUMMY_this 0
|
|
|
152 |
#define DUMMY_first 0
|
|
|
153 |
#define DUMMY_second 1
|
|
|
154 |
|
|
|
155 |
#define DUMMY_return 10
|
|
|
156 |
#define DUMMY_copy 11
|
|
|
157 |
#define DUMMY_extra 12
|
|
|
158 |
#define DUMMY_ellipsis 13
|
|
|
159 |
#define DUMMY_count 14
|
|
|
160 |
#define DUMMY_catch 15
|
|
|
161 |
#define DUMMY_token 16
|
|
|
162 |
|
|
|
163 |
#define DUMMY_params 10
|
|
|
164 |
#define DUMMY_max 20
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
#endif
|