Line -... |
Line 1... |
- |
|
1 |
/*
|
- |
|
2 |
* Copyright (c) 2002-2005 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 96... |
Line 126... |
96 |
OutputInfoP info;
|
126 |
OutputInfoP info;
|
97 |
struct CCodeT *header1;
|
127 |
struct CCodeT *header1;
|
98 |
struct CCodeT *header2;
|
128 |
struct CCodeT *header2;
|
99 |
struct CCodeT *trailer1;
|
129 |
struct CCodeT *trailer1;
|
100 |
struct CCodeT *trailer2;
|
130 |
struct CCodeT *trailer2;
|
101 |
NStringT prefixes [CPFX_NUM_PREFIXES];
|
131 |
NStringT prefixes[CPFX_NUM_PREFIXES];
|
102 |
BoolT prototypes;
|
132 |
BoolT prototypes;
|
103 |
BoolT ossg;
|
- |
|
104 |
BoolT numeric_ids;
|
133 |
BoolT numeric_ids;
|
105 |
BoolT casts;
|
134 |
BoolT casts;
|
106 |
BoolT unreachable;
|
135 |
BoolT unreachable;
|
107 |
BoolT lines;
|
136 |
BoolT lines;
|
108 |
unsigned split;
|
137 |
unsigned split;
|
109 |
} COutputInfoT, *COutputInfoP;
|
138 |
} COutputInfoT, *COutputInfoP;
|
110 |
|
139 |
|
111 |
/*--------------------------------------------------------------------------*/
|
140 |
/*--------------------------------------------------------------------------*/
|
112 |
|
141 |
|
113 |
extern void c_out_info_init
|
- |
|
114 |
PROTO_S ((COutputInfoP, OutputInfoP));
|
142 |
extern void c_out_info_init(COutputInfoP, OutputInfoP);
|
115 |
extern OutputInfoP c_out_info_info
|
143 |
extern OutputInfoP c_out_info_info(COutputInfoP);
|
116 |
PROTO_S ((COutputInfoP));
|
- |
|
117 |
extern OStreamP c_out_info_ostream
|
144 |
extern OStreamP c_out_info_ostream(COutputInfoP);
|
118 |
PROTO_S ((COutputInfoP));
|
- |
|
119 |
extern CStringP c_out_info_program_name
|
145 |
extern CStringP c_out_info_program_name(COutputInfoP);
|
120 |
PROTO_S ((COutputInfoP));
|
- |
|
121 |
extern CStringP c_out_info_source_name
|
146 |
extern CStringP c_out_info_source_name(COutputInfoP);
|
122 |
PROTO_S ((COutputInfoP));
|
- |
|
123 |
extern CStringP c_out_info_c_source_name
|
147 |
extern CStringP c_out_info_c_source_name(COutputInfoP);
|
124 |
PROTO_S ((COutputInfoP));
|
- |
|
125 |
extern struct CCodeT *c_out_info_get_header1
|
148 |
extern struct CCodeT *c_out_info_get_header1(COutputInfoP);
|
126 |
PROTO_S ((COutputInfoP));
|
- |
|
127 |
extern void c_out_info_set_header1
|
- |
|
128 |
PROTO_S ((COutputInfoP, struct CCodeT *));
|
149 |
extern void c_out_info_set_header1(COutputInfoP, struct CCodeT *);
|
129 |
extern struct CCodeT *c_out_info_get_header2
|
150 |
extern struct CCodeT *c_out_info_get_header2(COutputInfoP);
|
130 |
PROTO_S ((COutputInfoP));
|
- |
|
131 |
extern void c_out_info_set_header2
|
- |
|
132 |
PROTO_S ((COutputInfoP, struct CCodeT *));
|
151 |
extern void c_out_info_set_header2(COutputInfoP, struct CCodeT *);
|
133 |
extern struct CCodeT *c_out_info_get_trailer1
|
152 |
extern struct CCodeT *c_out_info_get_trailer1(COutputInfoP);
|
134 |
PROTO_S ((COutputInfoP));
|
- |
|
135 |
extern void c_out_info_set_trailer1
|
153 |
extern void c_out_info_set_trailer1(COutputInfoP, struct CCodeT *);
|
136 |
PROTO_S ((COutputInfoP, struct CCodeT *));
|
- |
|
137 |
extern struct CCodeT *c_out_info_get_trailer2
|
154 |
extern struct CCodeT *c_out_info_get_trailer2(COutputInfoP);
|
138 |
PROTO_S ((COutputInfoP));
|
- |
|
139 |
extern void c_out_info_set_trailer2
|
155 |
extern void c_out_info_set_trailer2(COutputInfoP, struct CCodeT *);
|
140 |
PROTO_S ((COutputInfoP, struct CCodeT *));
|
- |
|
141 |
extern NStringP c_out_info_type_prefix
|
156 |
extern NStringP c_out_info_type_prefix(COutputInfoP);
|
142 |
PROTO_S ((COutputInfoP));
|
- |
|
143 |
extern NStringP c_out_info_fn_prefix
|
157 |
extern NStringP c_out_info_fn_prefix(COutputInfoP);
|
144 |
PROTO_S ((COutputInfoP));
|
- |
|
145 |
extern NStringP c_out_info_in_prefix
|
158 |
extern NStringP c_out_info_in_prefix(COutputInfoP);
|
146 |
PROTO_S ((COutputInfoP));
|
- |
|
147 |
extern NStringP c_out_info_out_prefix
|
159 |
extern NStringP c_out_info_out_prefix(COutputInfoP);
|
148 |
PROTO_S ((COutputInfoP));
|
- |
|
149 |
extern NStringP c_out_info_label_prefix
|
160 |
extern NStringP c_out_info_label_prefix(COutputInfoP);
|
150 |
PROTO_S ((COutputInfoP));
|
- |
|
151 |
extern NStringP c_out_info_terminal_prefix
|
161 |
extern NStringP c_out_info_terminal_prefix(COutputInfoP);
|
152 |
PROTO_S ((COutputInfoP));
|
- |
|
153 |
extern NStringP c_out_info_prefix
|
162 |
extern NStringP c_out_info_prefix(COutputInfoP, CPrefixT);
|
154 |
PROTO_S ((COutputInfoP, CPrefixT));
|
- |
|
155 |
extern BoolT c_out_info_get_prototypes
|
163 |
extern BoolT c_out_info_get_prototypes(COutputInfoP);
|
156 |
PROTO_S ((COutputInfoP));
|
- |
|
157 |
extern void c_out_info_set_prototypes
|
164 |
extern void c_out_info_set_prototypes(COutputInfoP, BoolT);
|
158 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
159 |
extern BoolT c_out_info_get_ossg
|
- |
|
160 |
PROTO_S ((COutputInfoP));
|
- |
|
161 |
extern void c_out_info_set_ossg
|
- |
|
162 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
163 |
extern BoolT c_out_info_get_numeric_ids
|
165 |
extern BoolT c_out_info_get_numeric_ids(COutputInfoP);
|
164 |
PROTO_S ((COutputInfoP));
|
- |
|
165 |
extern void c_out_info_set_numeric_ids
|
166 |
extern void c_out_info_set_numeric_ids(COutputInfoP, BoolT);
|
166 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
167 |
extern BoolT c_out_info_get_casts
|
167 |
extern BoolT c_out_info_get_casts(COutputInfoP);
|
168 |
PROTO_S ((COutputInfoP));
|
- |
|
169 |
extern void c_out_info_set_casts
|
168 |
extern void c_out_info_set_casts(COutputInfoP, BoolT);
|
170 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
171 |
extern BoolT c_out_info_get_unreachable
|
169 |
extern BoolT c_out_info_get_unreachable(COutputInfoP);
|
172 |
PROTO_S ((COutputInfoP));
|
- |
|
173 |
extern void c_out_info_set_unreachable
|
170 |
extern void c_out_info_set_unreachable(COutputInfoP, BoolT);
|
174 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
175 |
extern BoolT c_out_info_get_lines
|
171 |
extern BoolT c_out_info_get_lines(COutputInfoP);
|
176 |
PROTO_S ((COutputInfoP));
|
- |
|
177 |
extern void c_out_info_set_lines
|
172 |
extern void c_out_info_set_lines(COutputInfoP, BoolT);
|
178 |
PROTO_S ((COutputInfoP, BoolT));
|
- |
|
179 |
extern unsigned c_out_info_get_split
|
173 |
extern unsigned c_out_info_get_split(COutputInfoP);
|
180 |
PROTO_S ((COutputInfoP));
|
- |
|
181 |
extern void c_out_info_set_split
|
174 |
extern void c_out_info_set_split(COutputInfoP, unsigned);
|
182 |
PROTO_S ((COutputInfoP, unsigned));
|
- |
|
183 |
|
175 |
|
184 |
/*--------------------------------------------------------------------------*/
|
176 |
/*--------------------------------------------------------------------------*/
|
185 |
|
177 |
|
186 |
#ifdef FS_FAST
|
178 |
#ifdef FS_FAST
|
187 |
#define c_out_info_info(o) ((o)->info)
|
179 |
#define c_out_info_info(o) ((o)->info)
|
188 |
#define c_out_info_ostream(o) (out_info_get_current_ostream ((o)->info))
|
180 |
#define c_out_info_ostream(o) (out_info_get_current_ostream((o)->info))
|
189 |
#define c_out_info_program_name(o) (out_info_get_prog_name ((o)->info))
|
181 |
#define c_out_info_program_name(o) (out_info_get_prog_name((o)->info))
|
190 |
#define c_out_info_source_name(o) \
|
182 |
#define c_out_info_source_name(o)\
|
191 |
(out_info_get_infile_name ((o)->info, (unsigned) 0))
|
183 |
(out_info_get_infile_name((o)->info, (unsigned)0))
|
192 |
#define c_out_info_c_source_name(o) \
|
184 |
#define c_out_info_c_source_name(o)\
|
193 |
(out_info_get_infile_name ((o)->info, (unsigned) 1))
|
185 |
(out_info_get_infile_name((o)->info, (unsigned)1))
|
194 |
#define c_out_info_get_header1(o) ((o)->header1)
|
186 |
#define c_out_info_get_header1(o) ((o)->header1)
|
195 |
#define c_out_info_set_header1(o, c) ((o)->header1 = (c))
|
187 |
#define c_out_info_set_header1(o, c) ((o)->header1 = (c))
|
196 |
#define c_out_info_get_header2(o) ((o)->header2)
|
188 |
#define c_out_info_get_header2(o) ((o)->header2)
|
197 |
#define c_out_info_set_header2(o, c) ((o)->header2 = (c))
|
189 |
#define c_out_info_set_header2(o, c) ((o)->header2 = (c))
|
198 |
#define c_out_info_get_trailer1(o) ((o)->trailer1)
|
190 |
#define c_out_info_get_trailer1(o) ((o)->trailer1)
|
199 |
#define c_out_info_set_trailer1(o, c) ((o)->trailer1 = (c))
|
191 |
#define c_out_info_set_trailer1(o, c) ((o)->trailer1 = (c))
|
200 |
#define c_out_info_get_trailer2(o) ((o)->trailer2)
|
192 |
#define c_out_info_get_trailer2(o) ((o)->trailer2)
|
201 |
#define c_out_info_set_trailer2(o, c) ((o)->trailer2 = (c))
|
193 |
#define c_out_info_set_trailer2(o, c) ((o)->trailer2 = (c))
|
202 |
#define c_out_info_type_prefix(o) (&((o)->prefixes [CPFX_TYPE]))
|
194 |
#define c_out_info_type_prefix(o) (&((o)->prefixes[CPFX_TYPE]))
|
203 |
#define c_out_info_fn_prefix(o) (&((o)->prefixes [CPFX_FN]))
|
195 |
#define c_out_info_fn_prefix(o) (&((o)->prefixes[CPFX_FN]))
|
204 |
#define c_out_info_in_prefix(o) (&((o)->prefixes [CPFX_IN]))
|
196 |
#define c_out_info_in_prefix(o) (&((o)->prefixes[CPFX_IN]))
|
205 |
#define c_out_info_out_prefix(o) (&((o)->prefixes [CPFX_OUT]))
|
197 |
#define c_out_info_out_prefix(o) (&((o)->prefixes[CPFX_OUT]))
|
206 |
#define c_out_info_label_prefix(o) (&((o)->prefixes [CPFX_LABEL]))
|
198 |
#define c_out_info_label_prefix(o) (&((o)->prefixes[CPFX_LABEL]))
|
207 |
#define c_out_info_terminal_prefix(o) (&((o)->prefixes [CPFX_TERMINAL]))
|
199 |
#define c_out_info_terminal_prefix(o) (&((o)->prefixes[CPFX_TERMINAL]))
|
208 |
#define c_out_info_prefix(o, i) (&((o)->prefixes [(i)]))
|
200 |
#define c_out_info_prefix(o, i) (&((o)->prefixes[(i)]))
|
209 |
#define c_out_info_get_prototypes(o) ((o)->prototypes)
|
201 |
#define c_out_info_get_prototypes(o) ((o)->prototypes)
|
210 |
#define c_out_info_set_prototypes(o, b) ((o)->prototypes = (b))
|
202 |
#define c_out_info_set_prototypes(o, b) ((o)->prototypes = (b))
|
211 |
#define c_out_info_get_ossg(o) ((o)->ossg)
|
- |
|
212 |
#define c_out_info_set_ossg(o, b) ((o)->ossg = (b))
|
- |
|
213 |
#define c_out_info_get_numeric_ids(o) ((o)->numeric_ids)
|
203 |
#define c_out_info_get_numeric_ids(o) ((o)->numeric_ids)
|
214 |
#define c_out_info_set_numeric_ids(o, b) ((o)->numeric_ids = (b))
|
204 |
#define c_out_info_set_numeric_ids(o, b) ((o)->numeric_ids = (b))
|
215 |
#define c_out_info_get_casts(o) ((o)->casts)
|
205 |
#define c_out_info_get_casts(o) ((o)->casts)
|
216 |
#define c_out_info_set_casts(o, b) ((o)->casts = (b))
|
206 |
#define c_out_info_set_casts(o, b) ((o)->casts = (b))
|
217 |
#define c_out_info_get_unreachable(o) ((o)->unreachable)
|
207 |
#define c_out_info_get_unreachable(o) ((o)->unreachable)
|
218 |
#define c_out_info_set_unreachable(o, b) ((o)->unreachable = (b))
|
208 |
#define c_out_info_set_unreachable(o, b) ((o)->unreachable = (b))
|
219 |
#define c_out_info_get_lines(o) ((o)->lines)
|
209 |
#define c_out_info_get_lines(o) ((o)->lines)
|
220 |
#define c_out_info_set_lines(o, b) ((o)->lines = (b))
|
210 |
#define c_out_info_set_lines(o, b) ((o)->lines = (b))
|
221 |
#define c_out_info_get_split(o) ((o)->split)
|
211 |
#define c_out_info_get_split(o) ((o)->split)
|
222 |
#define c_out_info_set_split(o, n) ((o)->split = (n))
|
212 |
#define c_out_info_set_split(o, n) ((o)->split = (n))
|
223 |
#endif /* defined (FS_FAST) */
|
213 |
#endif /* defined (FS_FAST) */
|
224 |
|
214 |
|
225 |
#endif /* !defined (H_C_OUT_INFO) */
|
215 |
#endif /* !defined (H_C_OUT_INFO) */
|
226 |
|
216 |
|
227 |
/*
|
217 |
/*
|