Mercurial > hg > octave-terminal
changeset 505:f264c1454c2b
[project @ 1994-07-09 06:02:45 by jwe]
author | jwe |
---|---|
date | Sat, 09 Jul 1994 06:04:22 +0000 |
parents | be155b3d5a2f |
children | 0f388340e607 |
files | configure.in src/sysdep.cc |
diffstat | 2 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ dnl along with Octave; see the file COPYING. If not, write to the Free dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. dnl -AC_REVISION($Revision: 1.32 $)dnl +AC_REVISION($Revision: 1.33 $)dnl AC_PREREQ(1.8)dnl AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -474,6 +474,12 @@ ;; esac done +dnl +AC_COMPILE_CHECK([struct exception in math.h], +[#include <math.h>], +[struct exception *x; x->type; x->name;], +AC_DEFINE(EXCEPTION_IN_MATH, 1), [])dnl +dnl AC_SUBST(TERMLIBS) dnl dnl Define VOID_SIGHANDLER for readline.
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -113,6 +113,35 @@ #endif } + +#if defined (EXCEPTION_IN_MATH) +extern "C" +{ +int +matherr (struct exception *x) +{ +// Possibly print our own message someday. Should probably be +// user-switchable. + + switch (x->type) + { + case DOMAIN: + case SING: + case OVERFLOW: + case UNDERFLOW: + case TLOSS: + case PLOSS: + default: + break; + } + +// But don't print the system message. + + return 1; +} +} +#endif + void sysdep_init (void) {