|
|
1.1 ! root 1: #include "mk.h" ! 2: ! 3: Arc * ! 4: newarc(n, r, stem, match) ! 5: Node *n; ! 6: Rule *r; ! 7: char *stem; ! 8: regsubexp *match; ! 9: { ! 10: register Arc *a; ! 11: ! 12: a = (Arc *)Malloc(sizeof(Arc)); ! 13: a->n = n; ! 14: a->r = r; ! 15: a->stem = strdup(stem); ! 16: memcpy((char *)a->match, (char *)match, sizeof a->match); ! 17: a->next = 0; ! 18: a->flag = 0; ! 19: a->prog = r->prog; ! 20: return(a); ! 21: } ! 22: ! 23: dumpa(s, a) ! 24: char *s; ! 25: register Arc *a; ! 26: { ! 27: char buf[1024]; ! 28: ! 29: sprint(buf, "%s ", (*s == ' ')? s:""); ! 30: Fprint(1, "%sArc@%ld: n=%ld r=%ld flag=0x%x stem='%s'", ! 31: s, a, a->n, a->r, a->flag, a->stem); ! 32: if(a->prog) ! 33: Fprint(1, " prog='%s'", a->prog); ! 34: Fprint(1, "\n"); ! 35: if(a->n) ! 36: dumpn(buf, a->n); ! 37: } ! 38: ! 39: nrep() ! 40: { ! 41: register Symtab *sym; ! 42: ! 43: if(sym = symlook("NREP", S_VAR, (char *)0)) ! 44: nreps = atoi(sym->value); ! 45: if(nreps < 1) ! 46: nreps = 1; ! 47: if(DEBUG(D_GRAPH)) ! 48: Fprint(1, "nreps = %d\n", nreps); ! 49: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.