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 -... Line 1...
-
 
1
/*
-
 
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
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 36... Line 66...
36
    TDF CAPSULE OUTPUT DECLARATIONS
66
    TDF CAPSULE OUTPUT DECLARATIONS
37
 
67
 
38
    The routines in this module describe the top level TDF output.
68
    The routines in this module describe the top level TDF output.
39
*/
69
*/
40
 
70
 
41
extern void init_capsule PROTO_S ( ( void ) ) ;
71
extern void init_capsule(void);
42
extern void init_diag PROTO_S ( ( void ) ) ;
72
extern void init_diag(void);
43
extern void write_capsule PROTO_S ( ( void ) ) ;
73
extern void write_capsule(void);
44
extern void output_option PROTO_S ( ( string ) ) ;
74
extern void output_option(string);
45
extern BITSTREAM *enc_version PROTO_S ( ( BITSTREAM * ) ) ;
75
extern BITSTREAM *enc_version(BITSTREAM *);
46
 
76
 
47
extern int output_tdf ;
77
extern int output_tdf;
48
extern int output_capsule ;
78
extern int output_capsule;
49
extern int output_all ;
79
extern int output_all;
50
extern int output_bugs ;
80
extern int output_bugs;
51
extern int output_builtin ;
81
extern int output_builtin;
52
extern int output_date ;
82
extern int output_date;
53
extern int output_diag ;
83
extern int output_diag;
54
extern int output_except ;
84
extern int output_except;
55
extern int output_init ;
85
extern int output_init;
56
extern int output_inline ;
86
extern int output_inline;
57
extern int output_new_diag ;
87
extern int output_new_diag;
58
extern int output_order ;
88
extern int output_order;
59
extern int output_partial ;
89
extern int output_partial;
60
extern int output_rtti ;
90
extern int output_rtti;
61
extern int output_shared ;
91
extern int output_shared;
62
extern int output_std ;
92
extern int output_std;
63
extern int output_term ;
93
extern int output_term;
64
extern int output_tokdec ;
94
extern int output_tokdec;
65
extern int output_unused ;
95
extern int output_unused;
66
extern int output_virtual ;
96
extern int output_virtual;
67
 
97
 
68
#if TDF_OUTPUT
98
#if TDF_OUTPUT
69
 
99
 
70
extern int capsule_id PROTO_S ( ( IDENTIFIER, int ) ) ;
100
extern int capsule_id(IDENTIFIER, int);
71
extern ulong capsule_no PROTO_S ( ( string, int ) ) ;
101
extern ulong capsule_no(string, int);
72
extern ulong capsule_name PROTO_S ( ( ulong, string *, int ) ) ;
102
extern ulong capsule_name(ulong, string *, int);
73
extern ulong unit_no PROTO_S ( ( BITSTREAM *, IDENTIFIER, int, int ) ) ;
103
extern ulong unit_no(BITSTREAM *, IDENTIFIER, int, int);
74
extern ulong link_no PROTO_S ( ( BITSTREAM *, ulong, int ) ) ;
104
extern ulong link_no(BITSTREAM *, ulong, int);
75
extern void clear_no PROTO_S ( ( IDENTIFIER ) ) ;
105
extern void clear_no(IDENTIFIER);
76
extern ulong no_labels PROTO_S ( ( BITSTREAM * ) ) ;
106
extern ulong no_labels(BITSTREAM *);
77
extern void record_usage PROTO_S ( ( ulong, int, unsigned ) ) ;
107
extern void record_usage(ulong, int, unsigned);
78
extern void clear_usage PROTO_S ( ( ulong, int ) ) ;
108
extern void clear_usage(ulong, int);
79
extern unsigned find_usage PROTO_S ( ( ulong, int ) ) ;
109
extern unsigned find_usage(ulong, int);
80
extern void set_diag_tag PROTO_S ( ( IDENTIFIER, int, ulong ) ) ;
110
extern void set_diag_tag(IDENTIFIER, int, ulong);
81
extern ulong get_diag_tag PROTO_S ( ( IDENTIFIER, int ) ) ;
111
extern ulong get_diag_tag(IDENTIFIER, int);
82
extern void count_item PROTO_S ( ( BITSTREAM * ) ) ;
112
extern void count_item(BITSTREAM *);
83
extern void clear_params PROTO_S ( ( void ) ) ;
113
extern void clear_params(void);
84
 
114
 
85
extern BITSTREAM *tokdec_unit, *tokdef_unit ;
115
extern BITSTREAM *tokdec_unit, *tokdef_unit;
86
extern BITSTREAM *tagdec_unit, *tagdef_unit ;
116
extern BITSTREAM *tagdec_unit, *tagdef_unit;
87
extern BITSTREAM *aldef_unit, *linkinfo_unit ;
117
extern BITSTREAM *aldef_unit, *linkinfo_unit;
88
extern BITSTREAM *diagtype_unit, *diagdef_unit, *diagcomp_unit ;
118
extern BITSTREAM *diagtype_unit, *diagdef_unit, *diagcomp_unit;
89
extern BITSTREAM *init_func, *term_func, *term_static_func ;
119
extern BITSTREAM *init_func, *term_func, *term_static_func;
90
extern ulong init_no, term_no ;
120
extern ulong init_no, term_no;
91
extern CLASS_TYPE last_class ;
121
extern CLASS_TYPE last_class;
92
extern ulong last_params [] ;
122
extern ulong last_params[];
93
extern int last_conts [] ;
123
extern int last_conts[];
94
 
124
 
95
#endif
125
#endif
96
 
126
 
97
 
127
 
98
/*
128
/*
Line 132... Line 162...
132
 
162
 
133
    These values are used to record the usage information for external
163
    These values are used to record the usage information for external
134
    identifiers.
164
    identifiers.
135
*/
165
*/
136
 
166
 
137
#define USAGE_NONE		( ( unsigned ) 0x00 )
167
#define USAGE_NONE		((unsigned)0x00)
138
#define USAGE_USE		( ( unsigned ) 0x01 )
168
#define USAGE_USE		((unsigned)0x01)
139
#define USAGE_DECL		( ( unsigned ) 0x02 )
169
#define USAGE_DECL		((unsigned)0x02)
140
#define USAGE_DEFN		( ( unsigned ) 0x04 )
170
#define USAGE_DEFN		((unsigned)0x04)
141
#define USAGE_COMMON		( ( unsigned ) 0x08 )
171
#define USAGE_COMMON		((unsigned)0x08)
142
 
172
 
143
 
173
 
144
/*
174
/*
145
    DUMMY TAG NUMBERS
175
    DUMMY TAG NUMBERS
146
 
176