Annotation of 40BSD/lib/libpc/IN.c, revision 1.1

1.1     ! root        1: /* Copyright (c) 1979 Regents of the University of California */
        !             2: 
        !             3: static char sccsid[] = "@(#)IN.c 1.1 10/29/80";
        !             4: 
        !             5: #include "h00vars.h"
        !             6: 
        !             7: IN(element, lower, upper, setptr)
        !             8: 
        !             9:        int     element;        /* element to check */
        !            10:        int     lower;          /* lowest element of set */
        !            11:        int     upper;          /* upper - lower of set */
        !            12:        char    setptr[];       /* pointer to set */
        !            13: {
        !            14:        int     indx;
        !            15: 
        !            16:        if ((indx = element - lower) < 0 || indx > upper)
        !            17:                return FALSE;
        !            18:        if (setptr[indx / BITSPERBYTE] & (1 << (indx % BITSPERBYTE)))
        !            19:                return TRUE;
        !            20:        return FALSE;
        !            21: }

unix.superglobalmegacorp.com

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