|
|
@ -28,13 +28,13 @@ static char * mkcname(char what, char *v1, char *v2); |
|
|
* be lost, but that's no great loss. |
|
|
* be lost, but that's no great loss. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
static sigjmp_buf matherrbuf; |
|
|
|
|
|
|
|
|
static JMP_BUF matherrbuf; |
|
|
|
|
|
|
|
|
static RETSIGTYPE |
|
|
static RETSIGTYPE |
|
|
sig_matherr(void) |
|
|
sig_matherr(void) |
|
|
{ |
|
|
{ |
|
|
fprintf(cp_err, "Error: argument out of range for math function\n"); |
|
|
fprintf(cp_err, "Error: argument out of range for math function\n"); |
|
|
siglongjmp(matherrbuf, 1); |
|
|
|
|
|
|
|
|
LONGJMP(matherrbuf, 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -221,7 +221,7 @@ doop(char what, |
|
|
/* Some of the math routines generate SIGILL if the argument is |
|
|
/* Some of the math routines generate SIGILL if the argument is |
|
|
* out of range. Catch this here. |
|
|
* out of range. Catch this here. |
|
|
*/ |
|
|
*/ |
|
|
if (sigsetjmp(matherrbuf, 1)) { |
|
|
|
|
|
|
|
|
if (SETJMP(matherrbuf, 1)) { |
|
|
return (NULL); |
|
|
return (NULL); |
|
|
} |
|
|
} |
|
|
(void) signal(SIGILL, (SIGNAL_FUNCTION) sig_matherr); |
|
|
(void) signal(SIGILL, (SIGNAL_FUNCTION) sig_matherr); |
|
|
@ -701,7 +701,7 @@ apply_func(struct func *func, struct pnode *arg) |
|
|
/* Some of the math routines generate SIGILL if the argument is |
|
|
/* Some of the math routines generate SIGILL if the argument is |
|
|
* out of range. Catch this here. |
|
|
* out of range. Catch this here. |
|
|
*/ |
|
|
*/ |
|
|
if (sigsetjmp(matherrbuf, 1)) { |
|
|
|
|
|
|
|
|
if (SETJMP(matherrbuf, 1)) { |
|
|
(void) signal(SIGILL, SIG_DFL); |
|
|
(void) signal(SIGILL, SIG_DFL); |
|
|
return (NULL); |
|
|
return (NULL); |
|
|
} |
|
|
} |
|
|
|