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 |
manipulation of the basic C and C++ types.
|
69 |
manipulation of the basic C and C++ types.
|
40 |
*/
|
70 |
*/
|
41 |
|
71 |
|
42 |
extern void init_types PROTO_S ( ( void ) ) ;
|
72 |
extern void init_types(void);
|
43 |
extern TYPE make_base_type PROTO_S ( ( BASE_TYPE ) ) ;
|
73 |
extern TYPE make_base_type(BASE_TYPE);
|
44 |
extern BASE_TYPE join_pre_types PROTO_S ( ( BASE_TYPE, BASE_TYPE ) ) ;
|
74 |
extern BASE_TYPE join_pre_types(BASE_TYPE, BASE_TYPE);
|
45 |
extern TYPE complete_pre_type PROTO_S ( ( BASE_TYPE, TYPE, CV_SPEC, int ) ) ;
|
75 |
extern TYPE complete_pre_type(BASE_TYPE, TYPE, CV_SPEC, int);
|
46 |
extern TYPE empty_complete_pre_type PROTO_S ( ( BASE_TYPE, TYPE, CV_SPEC, int ) ) ;
|
76 |
extern TYPE empty_complete_pre_type(BASE_TYPE, TYPE, CV_SPEC, int);
|
47 |
extern TYPE inject_pre_type PROTO_S ( ( TYPE, TYPE, int ) ) ;
|
77 |
extern TYPE inject_pre_type(TYPE, TYPE, int);
|
48 |
extern TYPE copy_typedef PROTO_S ( ( IDENTIFIER, TYPE, CV_SPEC ) ) ;
|
78 |
extern TYPE copy_typedef(IDENTIFIER, TYPE, CV_SPEC);
|
49 |
extern TYPE qualify_type PROTO_S ( ( TYPE, CV_SPEC, int ) ) ;
|
79 |
extern TYPE qualify_type(TYPE, CV_SPEC, int);
|
50 |
extern TYPE lvalue_type PROTO_S ( ( TYPE ) ) ;
|
80 |
extern TYPE lvalue_type(TYPE);
|
51 |
extern TYPE rvalue_type PROTO_S ( ( TYPE ) ) ;
|
81 |
extern TYPE rvalue_type(TYPE);
|
52 |
extern TYPE check_bitfield_type PROTO_S ( ( CV_SPEC, TYPE, BASE_TYPE, NAT, int ) ) ;
|
82 |
extern TYPE check_bitfield_type(CV_SPEC, TYPE, BASE_TYPE, NAT, int);
|
53 |
extern BASE_TYPE get_bitfield_rep PROTO_S ( ( TYPE, BASE_TYPE ) ) ;
|
83 |
extern BASE_TYPE get_bitfield_rep(TYPE, BASE_TYPE);
|
54 |
extern TYPE find_bitfield_type PROTO_S ( ( TYPE ) ) ;
|
84 |
extern TYPE find_bitfield_type(TYPE);
|
55 |
extern TYPE make_bitfield_type PROTO_S ( ( TYPE, BASE_TYPE, EXP, int ) ) ;
|
85 |
extern TYPE make_bitfield_type(TYPE, BASE_TYPE, EXP, int);
|
56 |
extern int check_int_type PROTO_S ( ( TYPE, BASE_TYPE ) ) ;
|
86 |
extern int check_int_type(TYPE, BASE_TYPE);
|
57 |
extern ERROR report_inferred_type PROTO_S ( ( TYPE, int ) ) ;
|
87 |
extern ERROR report_inferred_type(TYPE, int);
|
58 |
extern TYPE clean_inferred_type PROTO_S ( ( TYPE ) ) ;
|
88 |
extern TYPE clean_inferred_type(TYPE);
|
59 |
extern int is_type_inferred PROTO_S ( ( TYPE ) ) ;
|
89 |
extern int is_type_inferred(TYPE);
|
60 |
extern NAT check_array_dim PROTO_S ( ( NAT ) ) ;
|
90 |
extern NAT check_array_dim(NAT);
|
61 |
extern NAT make_array_dim PROTO_S ( ( EXP ) ) ;
|
91 |
extern NAT make_array_dim(EXP);
|
62 |
extern void accept_argument PROTO_S ( ( TYPE, TYPE ) ) ;
|
92 |
extern void accept_argument(TYPE, TYPE);
|
63 |
extern void accept_ellipsis PROTO_S ( ( TYPE ) ) ;
|
93 |
extern void accept_ellipsis(TYPE);
|
64 |
extern TYPE eq_argument PROTO_S ( ( TYPE, TYPE, int ) ) ;
|
94 |
extern TYPE eq_argument(TYPE, TYPE, int);
|
65 |
extern TYPE eq_ellipsis PROTO_S ( ( TYPE ) ) ;
|
95 |
extern TYPE eq_ellipsis(TYPE);
|
66 |
extern void set_compatible_type PROTO_S ( ( TYPE, TYPE, unsigned ) ) ;
|
96 |
extern void set_compatible_type(TYPE, TYPE, unsigned);
|
67 |
|
97 |
|
68 |
|
98 |
|
69 |
/*
|
99 |
/*
|
70 |
BASE TYPES
|
100 |
BASE TYPES
|
71 |
|
101 |
|
72 |
These variables give the built-in C and C++ types.
|
102 |
These variables give the built-in C and C++ types.
|
73 |
*/
|
103 |
*/
|
74 |
|
104 |
|
75 |
extern TYPE type_builtin [ ORDER_ntype ] ;
|
105 |
extern TYPE type_builtin[ORDER_ntype];
|
76 |
extern TYPE ptr_type_builtin [ ORDER_ntype ] ;
|
106 |
extern TYPE ptr_type_builtin[ORDER_ntype];
|
77 |
extern TYPE type_func_void ;
|
107 |
extern TYPE type_func_void;
|
78 |
extern TYPE type_temp_func ;
|
108 |
extern TYPE type_temp_func;
|
79 |
extern TYPE type_ellipsis ;
|
109 |
extern TYPE type_ellipsis;
|
80 |
extern TYPE type_error ;
|
110 |
extern TYPE type_error;
|
81 |
|
111 |
|
82 |
#define type_inferred ( type_builtin [ ntype_none ] )
|
112 |
#define type_inferred (type_builtin[ntype_none])
|
83 |
#define type_char ( type_builtin [ ntype_char ] )
|
113 |
#define type_char (type_builtin[ntype_char])
|
84 |
#define type_schar ( type_builtin [ ntype_schar ] )
|
114 |
#define type_schar (type_builtin[ntype_schar])
|
85 |
#define type_uchar ( type_builtin [ ntype_uchar ] )
|
115 |
#define type_uchar (type_builtin[ntype_uchar])
|
86 |
#define type_sshort ( type_builtin [ ntype_sshort ] )
|
116 |
#define type_sshort (type_builtin[ntype_sshort])
|
87 |
#define type_ushort ( type_builtin [ ntype_ushort ] )
|
117 |
#define type_ushort (type_builtin[ntype_ushort])
|
88 |
#define type_sint ( type_builtin [ ntype_sint ] )
|
118 |
#define type_sint (type_builtin[ntype_sint])
|
89 |
#define type_uint ( type_builtin [ ntype_uint ] )
|
119 |
#define type_uint (type_builtin[ntype_uint])
|
90 |
#define type_slong ( type_builtin [ ntype_slong ] )
|
120 |
#define type_slong (type_builtin[ntype_slong])
|
91 |
#define type_ulong ( type_builtin [ ntype_ulong ] )
|
121 |
#define type_ulong (type_builtin[ntype_ulong])
|
92 |
#define type_sllong ( type_builtin [ ntype_sllong ] )
|
122 |
#define type_sllong (type_builtin[ntype_sllong])
|
93 |
#define type_ullong ( type_builtin [ ntype_ullong ] )
|
123 |
#define type_ullong (type_builtin[ntype_ullong])
|
94 |
#define type_float ( type_builtin [ ntype_float ] )
|
124 |
#define type_float (type_builtin[ntype_float])
|
95 |
#define type_double ( type_builtin [ ntype_double ] )
|
125 |
#define type_double (type_builtin[ntype_double])
|
96 |
#define type_ldouble ( type_builtin [ ntype_ldouble ] )
|
126 |
#define type_ldouble (type_builtin[ntype_ldouble])
|
97 |
#define type_void ( type_builtin [ ntype_void ] )
|
127 |
#define type_void (type_builtin[ntype_void])
|
98 |
#define type_bottom ( type_builtin [ ntype_bottom ] )
|
128 |
#define type_bottom (type_builtin[ntype_bottom])
|
99 |
#define type_bool ( type_builtin [ ntype_bool ] )
|
129 |
#define type_bool (type_builtin[ntype_bool])
|
100 |
#define type_ptrdiff_t ( type_builtin [ ntype_ptrdiff_t ] )
|
130 |
#define type_ptrdiff_t (type_builtin[ntype_ptrdiff_t])
|
101 |
#define type_size_t ( type_builtin [ ntype_size_t ] )
|
131 |
#define type_size_t (type_builtin[ntype_size_t])
|
102 |
#define type_wchar_t ( type_builtin [ ntype_wchar_t ] )
|
132 |
#define type_wchar_t (type_builtin[ntype_wchar_t])
|
103 |
#define type_any ( type_builtin [ ntype_ellipsis ] )
|
133 |
#define type_any (type_builtin[ntype_ellipsis])
|
104 |
|
134 |
|
105 |
#define type_temp_star ( ptr_type_builtin [ ntype_none ] )
|
135 |
#define type_temp_star (ptr_type_builtin[ntype_none])
|
106 |
#define type_char_star ( ptr_type_builtin [ ntype_char ] )
|
136 |
#define type_char_star (ptr_type_builtin[ntype_char])
|
107 |
#define type_void_star ( ptr_type_builtin [ ntype_void ] )
|
137 |
#define type_void_star (ptr_type_builtin[ntype_void])
|
108 |
|
138 |
|
109 |
|
139 |
|
110 |
/*
|
140 |
/*
|
111 |
RETURN VALUES FOR INFERRED TYPES
|
141 |
RETURN VALUES FOR INFERRED TYPES
|
112 |
|
142 |
|