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
/*
6 7u83 2
 * Copyright (c) 2002-2006 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
6 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
6 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
6 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
6 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
6 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
#ifndef CAPSULE_INCLUDED
62
#define CAPSULE_INCLUDED
63
 
64
 
65
/*
66
    TDF CAPSULE OUTPUT DECLARATIONS
67
 
68
    The routines in this module describe the top level TDF output.
69
*/
70
 
6 7u83 71
extern void init_capsule(void);
72
extern void init_diag(void);
73
extern void write_capsule(void);
74
extern void output_option(string);
75
extern BITSTREAM *enc_version(BITSTREAM *);
2 7u83 76
 
6 7u83 77
extern int output_tdf;
78
extern int output_capsule;
79
extern int output_all;
80
extern int output_bugs;
81
extern int output_builtin;
82
extern int output_date;
83
extern int output_diag;
84
extern int output_except;
85
extern int output_init;
86
extern int output_inline;
87
extern int output_new_diag;
88
extern int output_order;
89
extern int output_partial;
90
extern int output_rtti;
91
extern int output_shared;
92
extern int output_std;
93
extern int output_term;
94
extern int output_tokdec;
95
extern int output_unused;
96
extern int output_virtual;
2 7u83 97
 
98
#if TDF_OUTPUT
99
 
6 7u83 100
extern int capsule_id(IDENTIFIER, int);
101
extern ulong capsule_no(string, int);
102
extern ulong capsule_name(ulong, string *, int);
103
extern ulong unit_no(BITSTREAM *, IDENTIFIER, int, int);
104
extern ulong link_no(BITSTREAM *, ulong, int);
105
extern void clear_no(IDENTIFIER);
106
extern ulong no_labels(BITSTREAM *);
107
extern void record_usage(ulong, int, unsigned);
108
extern void clear_usage(ulong, int);
109
extern unsigned find_usage(ulong, int);
110
extern void set_diag_tag(IDENTIFIER, int, ulong);
111
extern ulong get_diag_tag(IDENTIFIER, int);
112
extern void count_item(BITSTREAM *);
113
extern void clear_params(void);
2 7u83 114
 
6 7u83 115
extern BITSTREAM *tokdec_unit, *tokdef_unit;
116
extern BITSTREAM *tagdec_unit, *tagdef_unit;
117
extern BITSTREAM *aldef_unit, *linkinfo_unit;
118
extern BITSTREAM *diagtype_unit, *diagdef_unit, *diagcomp_unit;
119
extern BITSTREAM *init_func, *term_func, *term_static_func;
120
extern ulong init_no, term_no;
121
extern CLASS_TYPE last_class;
122
extern ulong last_params[];
123
extern int last_conts[];
2 7u83 124
 
125
#endif
126
 
127
 
128
/*
129
    CAPSULE VARIABLE TYPES
130
 
131
    These values correspond to the various types of linkable entity and
132
    entity groups within a TDF capsule.  They are used as arguments to
133
    capsule_id, unit_no etc.  VAR_label is a dummy value used for labels.
134
*/
135
 
136
#define EQN_tld			0
137
#define EQN_versions		1
138
#define EQN_tokdec		2
139
#define EQN_tokdef		3
140
#define EQN_aldef		4
141
#define EQN_diagtype		5
142
#define EQN_tagdec		6
143
#define EQN_diagdef		7
144
#define EQN_dgcomp		8
145
#define EQN_tagdef		9
146
#define EQN_linkinfo		10
147
#define EQN_no			11
148
 
149
#define VAR_tag			0
150
#define VAR_token		1
151
#define VAR_alignment		2
152
#define VAR_diagtag		3
153
#define VAR_dgtag		4
154
#define VAR_no			5
155
 
156
#define VAR_label		5
157
#define VAR_total		6
158
 
159
 
160
/*
161
    USAGE INFORMATION
162
 
163
    These values are used to record the usage information for external
164
    identifiers.
165
*/
166
 
6 7u83 167
#define USAGE_NONE		((unsigned)0x00)
168
#define USAGE_USE		((unsigned)0x01)
169
#define USAGE_DECL		((unsigned)0x02)
170
#define USAGE_DEFN		((unsigned)0x04)
171
#define USAGE_COMMON		((unsigned)0x08)
2 7u83 172
 
173
 
174
/*
175
    DUMMY TAG NUMBERS
176
 
177
    These values give the codes for the dummy tag numbers stored in
178
    last_params.  The values 0-9 give the function parameter numbers.
179
*/
180
 
181
#define DUMMY_this		0
182
#define DUMMY_first		0
183
#define DUMMY_second		1
184
 
185
#define DUMMY_return		10
186
#define DUMMY_copy		11
187
#define DUMMY_extra		12
188
#define DUMMY_ellipsis		13
189
#define DUMMY_count		14
190
#define DUMMY_catch		15
191
#define DUMMY_token		16
192
 
193
#define DUMMY_params		10
194
#define DUMMY_max		20
195
 
196
 
197
#endif