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 |
Copyright (c) 1993 Open Software Foundation, Inc.
|
32 |
Copyright (c) 1993 Open Software Foundation, Inc.
|
3 |
|
33 |
|
4 |
|
34 |
|
5 |
All Rights Reserved
|
35 |
All Rights Reserved
|
6 |
|
36 |
|
7 |
|
37 |
|
8 |
Permission to use, copy, modify, and distribute this software
|
38 |
Permission to use, copy, modify, and distribute this software
|
9 |
and its documentation for any purpose and without fee is hereby
|
39 |
and its documentation for any purpose and without fee is hereby
|
10 |
granted, provided that the above copyright notice appears in all
|
40 |
granted, provided that the above copyright notice appears in all
|
11 |
copies and that both the copyright notice and this permission
|
41 |
copies and that both the copyright notice and this permission
|
12 |
notice appear in supporting documentation.
|
42 |
notice appear in supporting documentation.
|
Line 14... |
Line 44... |
14 |
|
44 |
|
15 |
OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
|
45 |
OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
|
16 |
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
46 |
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
17 |
PARTICULAR PURPOSE.
|
47 |
PARTICULAR PURPOSE.
|
18 |
|
48 |
|
19 |
|
49 |
|
20 |
IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
|
50 |
IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
|
21 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
51 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
22 |
LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
|
52 |
LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
|
23 |
NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
53 |
NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
24 |
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
54 |
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
25 |
*/
|
55 |
*/
|
26 |
|
56 |
|
27 |
/*
|
57 |
/*
|
28 |
Crown Copyright (c) 1997
|
58 |
Crown Copyright (c) 1997
|
29 |
|
59 |
|
30 |
This TenDRA(r) Computer Program is subject to Copyright
|
60 |
This TenDRA(r) Computer Program is subject to Copyright
|
31 |
owned by the United Kingdom Secretary of State for Defence
|
61 |
owned by the United Kingdom Secretary of State for Defence
|
32 |
acting through the Defence Evaluation and Research Agency
|
62 |
acting through the Defence Evaluation and Research Agency
|
33 |
(DERA). It is made available to Recipients with a
|
63 |
(DERA). It is made available to Recipients with a
|
34 |
royalty-free licence for its use, reproduction, transfer
|
64 |
royalty-free licence for its use, reproduction, transfer
|
35 |
to other parties and amendment for any purpose not excluding
|
65 |
to other parties and amendment for any purpose not excluding
|
36 |
product development provided that any such use et cetera
|
66 |
product development provided that any such use et cetera
|
37 |
shall be deemed to be acceptance of the following conditions:-
|
67 |
shall be deemed to be acceptance of the following conditions:-
|
38 |
|
68 |
|
39 |
(1) Its Recipients shall ensure that this Notice is
|
69 |
(1) Its Recipients shall ensure that this Notice is
|
40 |
reproduced upon any copies or amended versions of it;
|
70 |
reproduced upon any copies or amended versions of it;
|
41 |
|
71 |
|
42 |
(2) Any amended version of it shall be clearly marked to
|
72 |
(2) Any amended version of it shall be clearly marked to
|
43 |
show both the nature of and the organisation responsible
|
73 |
show both the nature of and the organisation responsible
|
44 |
for the relevant amendment or amendments;
|
74 |
for the relevant amendment or amendments;
|
45 |
|
75 |
|
46 |
(3) Its onward transfer from a recipient to another
|
76 |
(3) Its onward transfer from a recipient to another
|
47 |
party shall be deemed to be that party's acceptance of
|
77 |
party shall be deemed to be that party's acceptance of
|
48 |
these conditions;
|
78 |
these conditions;
|
49 |
|
79 |
|
50 |
(4) DERA gives no warranty or assurance as to its
|
80 |
(4) DERA gives no warranty or assurance as to its
|
51 |
quality or suitability for any purpose and DERA accepts
|
81 |
quality or suitability for any purpose and DERA accepts
|
52 |
no liability whatsoever in relation to any use to which
|
82 |
no liability whatsoever in relation to any use to which
|
53 |
it may be put.
|
83 |
it may be put.
|
54 |
*/
|
84 |
*/
|
Line 72... |
Line 102... |
72 |
**********************************************************************/
|
102 |
**********************************************************************/
|
73 |
|
103 |
|
74 |
|
104 |
|
75 |
#ifndef ERROR_H
|
105 |
#ifndef ERROR_H
|
76 |
#define ERROR_H
|
106 |
#define ERROR_H
|
77 |
extern void init_proc_errors PROTO_S ((exp));
|
107 |
extern void init_proc_errors(exp);
|
78 |
extern void output_error_labels PROTO_S ((void));
|
108 |
extern void output_error_labels(void);
|
79 |
extern long get_nil_access_lab PROTO_S ((void));
|
109 |
extern long get_nil_access_lab(void);
|
80 |
extern long get_overflow_lab PROTO_S ((void));
|
110 |
extern long get_overflow_lab(void);
|
81 |
extern long get_stack_overflow_lab PROTO_S ((void));
|
111 |
extern long get_stack_overflow_lab(void);
|
82 |
|
112 |
|
83 |
/* integer error treatments */
|
113 |
/* integer error treatments */
|
84 |
extern int abs_error_treatment PROTO_S ((exp,space,where));
|
114 |
extern int abs_error_treatment(exp,space,where);
|
85 |
extern int chvar_error_treatment PROTO_S ((exp,space,where));
|
115 |
extern int chvar_error_treatment(exp,space,where);
|
86 |
extern void div_error_treatment PROTO_S ((int,int,exp));
|
116 |
extern void div_error_treatment(int,int,exp);
|
87 |
extern int minus_error_treatment PROTO_S ((exp,space,where));
|
117 |
extern int minus_error_treatment(exp,space,where);
|
88 |
extern int mult_error_treatment PROTO_S ((exp,space,where));
|
118 |
extern int mult_error_treatment(exp,space,where);
|
89 |
extern int neg_error_treatment PROTO_S ((exp,space,where));
|
119 |
extern int neg_error_treatment(exp,space,where);
|
90 |
extern int plus_error_treatment PROTO_S ((exp,space,where));
|
120 |
extern int plus_error_treatment(exp,space,where);
|
91 |
extern void rem_error_treatment PROTO_S ((int,int,exp));
|
121 |
extern void rem_error_treatment(int,int,exp);
|
92 |
extern void round_error_treatment PROTO_S ((exp *));
|
122 |
extern void round_error_treatment(exp *);
|
93 |
|
123 |
|
94 |
/* floating error treatments */
|
124 |
/* floating error treatments */
|
95 |
extern void chfl_error_treatment PROTO_S ((exp,int));
|
125 |
extern void chfl_error_treatment(exp,int);
|
96 |
extern void do_fmop_error_jump PROTO_S ((exp,int,int));
|
126 |
extern void do_fmop_error_jump(exp,int,int);
|
97 |
extern void do_fop_error_jump PROTO_S ((exp,int,int,int));
|
127 |
extern void do_fop_error_jump(exp,int,int,int);
|
98 |
extern void do_trap PROTO_S ((exp));
|
128 |
extern void do_trap(exp);
|
99 |
|
129 |
|
100 |
/* macros */
|
130 |
/* macros */
|
101 |
#define NO_ERROR_TREATMENT(x) (optop(x)!=0)
|
131 |
#define NO_ERROR_TREATMENT(x)(optop(x)!=0)
|
102 |
#define ERROR_TREATMENT(x) (optop(x)==0)
|
132 |
#define ERROR_TREATMENT(x)(optop(x) ==0)
|
103 |
#define ERROR_TREATMENT_IS_TRAP(x) ((errhandle(x)&3)==3)
|
133 |
#define ERROR_TREATMENT_IS_TRAP(x)((errhandle(x) &3) ==3)
|
104 |
#endif
|
134 |
#endif
|