Annotation of 43BSD/contrib/apl/src/ax.c, revision 1.1

1.1     ! root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.