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 37... |
Line 67... |
37 |
|
67 |
|
38 |
The routines in this module are concerned with the construction and
|
68 |
The routines in this module are concerned with the construction and
|
39 |
application of functions.
|
69 |
application of functions.
|
40 |
*/
|
70 |
*/
|
41 |
|
71 |
|
42 |
extern void begin_function PROTO_S ( ( IDENTIFIER ) ) ;
|
72 |
extern void begin_function(IDENTIFIER);
|
43 |
extern EXP end_function PROTO_S ( ( IDENTIFIER, EXP ) ) ;
|
73 |
extern EXP end_function(IDENTIFIER, EXP);
|
44 |
extern void begin_param PROTO_S ( ( IDENTIFIER ) ) ;
|
74 |
extern void begin_param(IDENTIFIER);
|
45 |
extern void end_param PROTO_S ( ( void ) ) ;
|
75 |
extern void end_param(void);
|
46 |
extern void adjust_param PROTO_S ( ( TYPE ) ) ;
|
76 |
extern void adjust_param(TYPE);
|
47 |
extern int function_params PROTO_S ( ( TYPE ) ) ;
|
77 |
extern int function_params(TYPE);
|
48 |
extern TYPE make_param_type PROTO_S ( ( TYPE, int ) ) ;
|
78 |
extern TYPE make_param_type(TYPE, int);
|
49 |
extern TYPE make_func_type PROTO_S ( ( TYPE, int, CV_SPEC, LIST ( TYPE ) ) ) ;
|
79 |
extern TYPE make_func_type(TYPE, int, CV_SPEC, LIST(TYPE));
|
50 |
extern CV_SPEC func_linkage PROTO_S ( ( CV_SPEC ) ) ;
|
80 |
extern CV_SPEC func_linkage(CV_SPEC);
|
51 |
extern void member_func_type PROTO_S ( ( CLASS_TYPE, unsigned, TYPE ) ) ;
|
81 |
extern void member_func_type(CLASS_TYPE, unsigned, TYPE);
|
52 |
extern void check_weak_func PROTO_S ( ( TYPE, int ) ) ;
|
82 |
extern void check_weak_func(TYPE, int);
|
53 |
extern void decl_func_type PROTO_S ( ( IDENTIFIER, TYPE, int ) ) ;
|
83 |
extern void decl_func_type(IDENTIFIER, TYPE, int);
|
54 |
extern TYPE find_func_type PROTO_S ( ( TYPE ) ) ;
|
84 |
extern TYPE find_func_type(TYPE);
|
55 |
extern TYPE redecl_func_type PROTO_S ( ( IDENTIFIER, TYPE, TYPE, int, int ) ) ;
|
85 |
extern TYPE redecl_func_type(IDENTIFIER, TYPE, TYPE, int, int);
|
56 |
extern EXP apply_func_id PROTO_S ( ( IDENTIFIER, QUALIFIER, GRAPH, LIST ( EXP ) ) ) ;
|
86 |
extern EXP apply_func_id(IDENTIFIER, QUALIFIER, GRAPH, LIST(EXP));
|
57 |
extern LIST ( EXP ) convert_args PROTO_S ( ( LIST ( EXP ) ) ) ;
|
87 |
extern LIST(EXP) convert_args(LIST(EXP));
|
58 |
extern EXP make_func_exp PROTO_S ( ( EXP, LIST ( EXP ), int ) ) ;
|
88 |
extern EXP make_func_exp(EXP, LIST(EXP), int);
|
59 |
extern EXP check_inline PROTO_S ( ( IDENTIFIER, LIST ( EXP ), TYPE ) ) ;
|
89 |
extern EXP check_inline(IDENTIFIER, LIST(EXP), TYPE);
|
60 |
extern TYPE check_main PROTO_S ( ( TYPE, HASHID ) ) ;
|
90 |
extern TYPE check_main(TYPE, HASHID);
|
61 |
extern void recheck_main PROTO_S ( ( IDENTIFIER ) ) ;
|
91 |
extern void recheck_main(IDENTIFIER);
|
62 |
extern int pass_complex_type PROTO_S ( ( TYPE ) ) ;
|
92 |
extern int pass_complex_type(TYPE);
|
63 |
extern unsigned min_no_args PROTO_S ( ( TYPE ) ) ;
|
93 |
extern unsigned min_no_args(TYPE);
|
64 |
extern void func_type_defn PROTO_S ( ( int ) ) ;
|
94 |
extern void func_type_defn(int);
|
65 |
extern ERROR check_param_type PROTO_S ( ( IDENTIFIER, TYPE ) ) ;
|
95 |
extern ERROR check_param_type(IDENTIFIER, TYPE);
|
66 |
extern TYPE check_ret_type PROTO_S ( ( TYPE, ERROR *, int ) ) ;
|
96 |
extern TYPE check_ret_type(TYPE, ERROR *, int);
|
67 |
extern int check_func_dargs PROTO_S ( ( TYPE, int, int ) ) ;
|
97 |
extern int check_func_dargs(TYPE, int, int);
|
68 |
extern void object_type PROTO_S ( ( TYPE, unsigned ) ) ;
|
98 |
extern void object_type(TYPE, unsigned);
|
69 |
|
99 |
|
70 |
|
100 |
|
71 |
/*
|
101 |
/*
|
72 |
FUNCTION VARIABLES
|
102 |
FUNCTION VARIABLES
|
73 |
|
103 |
|
74 |
These variables are used to store information about the current
|
104 |
These variables are used to store information about the current
|
75 |
function definition.
|
105 |
function definition.
|
76 |
*/
|
106 |
*/
|
77 |
|
107 |
|
78 |
extern IDENTIFIER crt_func_id ;
|
108 |
extern IDENTIFIER crt_func_id;
|
79 |
extern TYPE crt_func_return ;
|
109 |
extern TYPE crt_func_return;
|
80 |
extern int crt_func_complex ;
|
110 |
extern int crt_func_complex;
|
81 |
extern IDENTIFIER main_function ;
|
111 |
extern IDENTIFIER main_function;
|
82 |
|
112 |
|
83 |
|
113 |
|
84 |
/*
|
114 |
/*
|
85 |
FUNCTION TYPES
|
115 |
FUNCTION TYPES
|
86 |
|
116 |
|
Line 106... |
Line 136... |
106 |
#define FUNC_NONE 0
|
136 |
#define FUNC_NONE 0
|
107 |
#define FUNC_ELLIPSIS 1
|
137 |
#define FUNC_ELLIPSIS 1
|
108 |
#define FUNC_WEAK 2
|
138 |
#define FUNC_WEAK 2
|
109 |
#define FUNC_PARAMS 4
|
139 |
#define FUNC_PARAMS 4
|
110 |
#define FUNC_NO_PARAMS 8
|
140 |
#define FUNC_NO_PARAMS 8
|
111 |
#define FUNC_WEAK_PARAMS ( FUNC_WEAK | FUNC_PARAMS )
|
141 |
#define FUNC_WEAK_PARAMS (FUNC_WEAK | FUNC_PARAMS)
|
112 |
#define FUNC_WEAK_ARGS ( FUNC_WEAK )
|
142 |
#define FUNC_WEAK_ARGS (FUNC_WEAK)
|
113 |
#define FUNC_VAR_PARAMS ( FUNC_ELLIPSIS | FUNC_NO_PARAMS )
|
143 |
#define FUNC_VAR_PARAMS (FUNC_ELLIPSIS | FUNC_NO_PARAMS)
|
114 |
#define FUNC_NON_PROTO ( FUNC_WEAK | FUNC_PARAMS | FUNC_NO_PARAMS )
|
144 |
#define FUNC_NON_PROTO (FUNC_WEAK | FUNC_PARAMS | FUNC_NO_PARAMS)
|
115 |
|
145 |
|
116 |
|
146 |
|
117 |
#endif
|
147 |
#endif
|