|
|
1.1 ! root 1: #include <stdio.h> ! 2: #include "def.h" ! 3: #include "1.incl.h" ! 4: ! 5: fingraph() ! 6: { ! 7: /* if any entry statements, add a DUMVX with arcs to all entry statements */ ! 8: if (ENTLST) ! 9: { ! 10: ARC(START,0) = addum(ARC(START,0),ENTLST); ! 11: freelst(ENTLST); ! 12: } ! 13: /* if any FMTVX, add a DUMVX with arcs to all FMTVX's */ ! 14: if (FMTLST) ! 15: { ! 16: ARC(START,0) = addum(ARC(START,0),FMTLST); ! 17: freelst(FMTLST); ! 18: } ! 19: } ! 20: ! 21: addum(v,lst) ! 22: VERT v; ! 23: struct list *lst; ! 24: { ! 25: VERT new; ! 26: int count,i; ! 27: struct list *ls; ! 28: count = lslen(lst); /* length of lst */ ! 29: new = create(DUMVX,1+count); ! 30: ARC(new,0) = v; ! 31: for (i = count, ls = lst; i >= 1; --i, ls = ls->nxtlist) ! 32: { ! 33: ASSERT(ls,addum); ! 34: ARC(new,i) = ls->elt; ! 35: } ! 36: ASSERT(!ls, addum); ! 37: return(new); ! 38: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.