static int iscacheableprojection(DCEprojection* proj) { int i,cacheable; if(proj->discrim != CES_VAR) return 0; cacheable = 1; /* assume so */ for(i=0;i<nclistlength(proj->var->segments);i++) { DCEsegment* segment = (DCEsegment*)nclistget(proj->var->segments,i); if(!iswholesegment(segment)) {cacheable = 0; break;} } return cacheable; }
int iswholeprojection(DCEprojection* proj) { int i,whole; ASSERT((proj->discrim == CES_VAR)); whole = 1; /* assume so */ for(i=0;i<nclistlength(proj->var->segments);i++) { DCEsegment* segment = (DCEsegment*)nclistget(proj->var->segments,i); if(!iswholesegment(segment)) {whole = 0; break;} } return whole; }