Annotation of 43BSD/contrib/icon/rt/cvcset.c, revision 1.1

1.1     ! root        1: #include "../h/rt.h"
        !             2: 
        !             3: /*
        !             4:  * cvcset(d, cs, csbuf) - convert d to a cset and
        !             5:  *  make cs point to it, using csbuf as a buffer if necessary.
        !             6:  */
        !             7: 
        !             8: cvcset(d, cs, csbuf)
        !             9: register struct descrip *d;
        !            10: int **cs, *csbuf;
        !            11:    {
        !            12:    register char *s;
        !            13:    register int l;
        !            14:    char sbuf[MAXSTRING];
        !            15: 
        !            16:       DeRef(*d)
        !            17: 
        !            18:    if (!QUAL(*d) && TYPE(*d) == T_CSET) {
        !            19:       *cs = BLKLOC(*d)->cset.bits;
        !            20:       return (T_CSET);
        !            21:       }
        !            22: 
        !            23:    if (cvstr(d, sbuf) == NULL)
        !            24:       return (NULL);
        !            25: 
        !            26:    for (l = 0; l < CSETSIZE; l++)
        !            27:       csbuf[l] = 0;
        !            28: 
        !            29:    s = STRLOC(*d);
        !            30:    l = STRLEN(*d);
        !            31:    while (l--) {
        !            32:       setb(*s, csbuf);
        !            33:       s++;
        !            34:       }
        !            35:    *cs = csbuf;
        !            36:    return (1);
        !            37:    }

unix.superglobalmegacorp.com

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