|
|
1.1 root 1: # include <ingres.h>
2: # include <symbol.h>
3: # include <tree.h>
4: # include <aux.h>
5: # include "../decomp/globs.h"
6: # include "../ctlmod/pipes.h"
7: # include <signal.h>
8: # include <sccs.h>
9: # include <errors.h>
10: # include <math.h>
11: # include <errno.h>
12:
13: SCCSID(@(#)startovqp.c 8.3 1/31/86)
14:
15: /*
16: ** startovqp is called at the beginning of
17: ** the execution of ovqp.
18: */
19:
20:
21: startovqp()
22: {
23: extern flptexcep();
24:
25: if (Equel)
26: startequel();
27:
28: De.ov_tupsfound = 0; /* counts the number of tuples which sat the qual */
29: De.ov_retrieve = De.ov_bopen = FALSE;
30: /* catch floating point signals */
31: signal(SIGFPE, (int) flptexcep);
32: }
33:
34: /*
35: ** Give a user error for a floating point exceptions
36: */
37: flptexcep()
38: {
39: ov_err(FLOATEXCEP);
40: }
41:
42: /* Someone here in Berkeley thinks this is a good idea. */
43: /* See 4.3 man 3m intro */
44: double
45: infnan(arg)
46: register arg;
47: {
48: extern int errno;
49:
50: switch (arg)
51: {
52: case ERANGE:
53: errno = ERANGE;
54: return(HUGE);
55: case -ERANGE:
56: errno = EDOM;
57: return(-HUGE);
58: case EDOM:
59: errno = EDOM;
60: return(0.0);
61: }
62: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.