static void looksrc(char *cp) { if (Sflag == 0) findv(srcdirs, ARRAY_SIZE(srcdirs)-1, cp); else findv(Sflag, Scnt, cp); }
static void lookman(char *cp) { if (Mflag == 0) findv(mandirs, ARRAY_SIZE(mandirs)-1, cp); else findv(Mflag, Mcnt, cp); }
static void lookbin(char *cp) { if (Bflag == 0) findv(bindirs, ARRAY_SIZE(bindirs)-1, cp); else findv(Bflag, Bcnt, cp); }
static void lookbin(char *cp) { if (Bflag == 0) { findv(bindirs, ARRAY_SIZE(bindirs)-1, cp); while (*dirp) findin(*dirp++, cp); /* look $PATH */ } else findv(Bflag, Bcnt, cp); }
void lookman(char *cp) { if (Mflag == 0) { find(mandirs, cp); } else findv(Mflag, Mcnt, cp); }
void lookbin(char *cp) { if (Bflag == 0) find(bindirs, cp); else findv(Bflag, Bcnt, cp); }
void looksrc(char *cp) { if (Sflag == 0) { find(srcdirs, cp); } else findv(Sflag, Scnt, cp); }
factor *colorFactor (int nv, cvertex * vl) { /* - calculate color weight (two int n,d) - 08/01/90 */ cgraph * cg; int n0,i,j; factor *f=(factor *)malloc(sizeof(factor)); cgraph model; fct_init(f); SIZE= sizeof(model) + (nv)*((char*)&model.vl[1]-(char*)&model.vl[0]); MAXGLEN=nv+2; cg = (cgraph *) malloc(SIZE); initcg(cg); cg->gl=nv; cg->next=NULL; cg->en=0; for(i=0; i<nv; i++) { cg->vl[i]=vl[i]; for(j=0; j<3; j++) if(vl[i].e[j]>cg->en) cg->en=vl[i].e[j]; } # if (CDEBLEV > DEBLEV) wrcg(cg); # endif remtv(cg); # if (CDEBLEV > DEBLEV) wrcg(cg); # endif while(cg) { cgraph * pgl; while (cg->gl && cg->sgn) if (findv(qg,cg,&n0)) remg(n0,&(cg)); else if (findv(g3,cg,&n0)) exp3g(n0,&(cg)); else cerror(251,"CWTarG: Invalid type of vertex."); pgl = cg; if(pgl->sgn) add_fct(f,pgl->sgn,pgl->pow2,pgl->powN,pgl->powNN_1); cg = cg->next; free(pgl); } return f; }
static void remtv(cgraph * pgl ) { /* Remove transfered vertex from all C-graphs - 06/01/90 */ int n, n1; int vt0; /* Original type */ int ee; /* v0 */ /* -->--*-->--v1 */ #if (CDEBLEV > DEBLEV) /* */ fprintf(stderr,".......RemTV........\n");/* */ #endif /* v0 */ /* .....*.....v1 */ while (findv(tv,pgl,&n) || findv(g2,pgl,&n)) { # if (CDEBLEV > DEBLEV) if (pgl != NULL) wrcg(pgl); # endif vt0 = pgl->vl[n-1].vt; pgl->vl[n-1].vt = zv; pgl->gl--; if (istadpole(n,pgl)) if (pgl->vl[n-1].e[0] != 0) pgl->powNN_1++; else pgl->powN++; else if (pgl->vl[n-1].e[0] != 0) { n1 = findl(1,n,pgl); if (pgl->vl[n1-1].vt == g2 && pgl->vl[n1-1].e[0] != pgl->vl[n-1].e[0]) { ee = pgl->vl[n1-1].e[0]; pgl->vl[n1-1].e[0] = pgl->vl[n1-1].e[1]; pgl->vl[n1-1].e[1] = ee; } else if (pgl->vl[n1-1].vt == g3) rev3g(pgl->vl[n-1].e[0],&pgl->vl[n1-1]); pgl->vl[n1-1].e[0] = pgl->vl[n-1].e[1]; } else { n1 = findl(2,n,pgl); pgl->vl[n1-1].e[2] = pgl->vl[n-1].e[2]; } } }