Annotation of 43BSD/usr.bin/struct/1.finish.c, revision 1.1

1.1     ! root        1: #ifndef lint
        !             2: static char sccsid[] = "@(#)1.finish.c 4.1     (Berkeley)      2/11/83";
        !             3: #endif not lint
        !             4: 
        !             5: #include <stdio.h>
        !             6: #include "def.h"
        !             7: #include "1.incl.h"
        !             8: 
        !             9: fingraph()
        !            10:        {
        !            11:        /* if any entry statements, add a DUMVX with arcs to all entry statements */
        !            12:        if (ENTLST)
        !            13:                {
        !            14:                ARC(START,0) = addum(ARC(START,0),ENTLST);
        !            15:                freelst(ENTLST);
        !            16:                }
        !            17:        /* if any FMTVX, add a DUMVX with arcs to all FMTVX's */
        !            18:        if (FMTLST)
        !            19:                {
        !            20:                ARC(START,0) = addum(ARC(START,0),FMTLST);
        !            21:                freelst(FMTLST);
        !            22:                }
        !            23:        }
        !            24: 
        !            25: addum(v,lst)
        !            26: VERT v;
        !            27: struct list *lst;
        !            28:        {
        !            29:        VERT new;
        !            30:        int count,i;
        !            31:        struct list *ls;
        !            32:        count = lslen(lst);             /* length of lst */
        !            33:        new = create(DUMVX,1+count);
        !            34:        ARC(new,0) = v;
        !            35:        for (i = count, ls = lst; i >= 1; --i, ls = ls->nxtlist)
        !            36:                {
        !            37:                ASSERT(ls,addum);
        !            38:                ARC(new,i) = ls->elt;
        !            39:                }
        !            40:        ASSERT(!ls, addum);
        !            41:        return(new);
        !            42:        }

unix.superglobalmegacorp.com

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