3067
|
1 /* |
|
2 |
|
3 Copyright (C) 1997 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
3067
|
21 |
|
22 */ |
|
23 |
|
24 #ifdef HAVE_CONFIG_H |
|
25 #include <config.h> |
|
26 #endif |
|
27 |
3068
|
28 #if defined (EXCEPTION_IN_MATH) |
3067
|
29 |
3068
|
30 #include <math.h> |
|
31 |
3067
|
32 int |
|
33 matherr (struct exception *x) |
|
34 { |
|
35 /* Possibly print our own message someday. Should probably be |
|
36 user-switchable. */ |
|
37 |
|
38 switch (x->type) |
|
39 { |
|
40 case DOMAIN: |
|
41 case SING: |
|
42 case OVERFLOW: |
|
43 case UNDERFLOW: |
|
44 case TLOSS: |
|
45 case PLOSS: |
|
46 default: |
|
47 break; |
|
48 } |
|
49 |
|
50 /* But don't print the system message. */ |
|
51 |
|
52 return 1; |
|
53 } |
|
54 #endif |
|
55 |
|
56 /* |
|
57 ;;; Local Variables: *** |
|
58 ;;; mode: C *** |
|
59 ;;; End: *** |
|
60 */ |