Annotation of 43BSDReno/contrib/isode-beta/dsap/common/integer.c, revision 1.1

1.1     ! root        1: /* LINTLIBRARY */
        !             2: 
        !             3: #include "quipu/util.h"
        !             4: #include "quipu/attr.h"
        !             5: #include "psap.h"
        !             6: 
        !             7: atoi();
        !             8: 
        !             9: static PE intenc (x)
        !            10: int x;
        !            11: {
        !            12:        return (int2prim(x));
        !            13: }
        !            14: 
        !            15: static intdec (pe)
        !            16: PE pe;
        !            17: {
        !            18:         if (! test_prim_pe (pe,PE_CLASS_UNIV,PE_PRIM_INT))
        !            19:                return (0);
        !            20: 
        !            21:        return (prim2num(pe));
        !            22: }
        !            23: 
        !            24: /* ARGSUSED */
        !            25: static intprint (ps,x,format)
        !            26: PS ps;
        !            27: int x,format;
        !            28: {
        !            29:        ps_printf (ps,"%d",x);
        !            30: }
        !            31: 
        !            32: static intdup (x)
        !            33: int x;
        !            34: {
        !            35:        return (x);
        !            36: }
        !            37: 
        !            38: static intcmp (x,y)
        !            39: int x,y;
        !            40: {
        !            41:        return ( x == y ? 0 : (x > y ? 1 : -1) );
        !            42: }
        !            43: 
        !            44: integer_syntax ()
        !            45: {
        !            46:        (void) add_attribute_syntax ("integer",
        !            47:                (IFP) intenc,   (IFP) intdec,
        !            48:                (IFP) atoi,     intprint,
        !            49:                (IFP) intdup,   intcmp,
        !            50:                NULLIFP,        NULLCP,
        !            51:                NULLIFP,        FALSE);
        !            52: }

unix.superglobalmegacorp.com

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