1: static char Sccsid[] = "ax.c @(#)ax.c	1.1	10/1/82 Berkeley ";
   2: #
   3: 
   4: /*
   5:  *	Floating-point initialization and trap service
   6:  *
   7:  *	On the PDP-11's the code in "ax.pdp.s" is preferred
   8:  *	since it enables the FPP for all floating exception
   9:  *	traps and fishes out the cause of an exception from
  10:  *	the FPP error register.
  11:  */
  12: 
  13: #include <signal.h>
  14: 
  15: #ifdef vax
  16: char *fpelist[] = {
  17:     "floating exception",
  18:     "integer overflow",
  19:     "integer divide by zero",
  20:     "floating overflow",
  21:     "floating divide by zero",
  22:     "floating underflow",
  23:     "decimal overflow",
  24:     "subscript range",
  25:     "floating overflow",
  26:     "floating divide by zero",
  27:     "floating underflow"
  28: };
  29: 
  30: fpe(signo, param)
  31: unsigned param;
  32: {
  33:     signal(SIGFPE, fpe);
  34:     if (param >= sizeof fpelist/sizeof fpelist[0])
  35:         error("floating exception");
  36:     else
  37:         error(fpelist[param]);
  38: }
  39: #else
  40: fpe()
  41: {
  42:     signal(SIGFPE, fpe);
  43:     error("floating exception");
  44: }
  45: #endif
  46: 
  47: fppinit()
  48: {
  49:     signal(SIGFPE, fpe);
  50: }

Defined functions

fpe defined in line 40; used 3 times
fppinit defined in line 47; used 1 times

Defined variables

Sccsid defined in line 1; never used
fpelist defined in line 16; used 3 times
Last modified: 1983-06-22
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2343
Valid CSS Valid XHTML 1.0 Strict