comparison src/floatfns.c @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents c5d627a313b1
children e11d67e05968
comparison
equal deleted inserted replaced
283:fa3d41851a08 284:558f606b08ae
927 /* Another idea was to replace the library function `infnan' 927 /* Another idea was to replace the library function `infnan'
928 where SIGILL is signaled. */ 928 where SIGILL is signaled. */
929 929
930 #endif /* FLOAT_CATCH_SIGILL */ 930 #endif /* FLOAT_CATCH_SIGILL */
931 931
932 /* In C++, it is impossible to determine what type matherr expects
933 without some more configure magic.
934 We shouldn't be using matherr anyways - it's a non-standard SYSVism. */
932 #if defined (HAVE_MATHERR) && !defined(__cplusplus) 935 #if defined (HAVE_MATHERR) && !defined(__cplusplus)
933 int 936 int
934 matherr (struct exception *x) 937 matherr (struct exception *x)
935 { 938 {
936 Lisp_Object args; 939 Lisp_Object args;
945 ((in_float == 2) 948 ((in_float == 2)
946 ? Fcons (make_float (x->arg2), Qnil) 949 ? Fcons (make_float (x->arg2), Qnil)
947 : Qnil))); 950 : Qnil)));
948 switch (x->type) 951 switch (x->type)
949 { 952 {
950 case DOMAIN: Fsignal (Qdomain_error, args); break; 953 case DOMAIN: Fsignal (Qdomain_error, args); break;
951 case SING: Fsignal (Qsingularity_error, args); break; 954 case SING: Fsignal (Qsingularity_error, args); break;
952 case OVERFLOW: Fsignal (Qoverflow_error, args); break; 955 case OVERFLOW: Fsignal (Qoverflow_error, args); break;
953 case UNDERFLOW: Fsignal (Qunderflow_error, args); break; 956 case UNDERFLOW: Fsignal (Qunderflow_error, args); break;
954 default: Fsignal (Qarith_error, args); break; 957 default: Fsignal (Qarith_error, args); break;
955 } 958 }
956 return 1; /* don't set errno or print a message */ 959 return 1; /* don't set errno or print a message */
957 } 960 }
958 #endif /* HAVE_MATHERR */ 961 #endif /* HAVE_MATHERR */
959 #endif /* LISP_FLOAT_TYPE */ 962 #endif /* LISP_FLOAT_TYPE */