Lines Matching defs:seg
77 Pfseg_t* seg; /* parsed segments in data */
215 Pfseg_t *seg;
222 if((seg = pf->nseg > 0 ? pf->seg + pf->nseg-1 : 0) &&
223 lmt <= (seg->rmt+PFMERGE(blksz)) && rmt >= (seg->lmt-PFMERGE(blksz)) )
224 { if(seg->lmt > lmt)
225 seg->lmt = lmt;
226 if(seg->rmt < rmt)
227 seg->rmt = rmt;
228 seg->rdt = rdt;
229 seg->mtch += mn;
238 { pf->seg = (Pfseg_t*)realloc(pf->seg, (pf->nseg+8)*sizeof(Pfseg_t));
239 if(!pf->seg)
243 seg = pf->seg + pf->nseg; pf->nseg += 1;
244 seg->ldt = ldt; seg->rdt = rdt;
245 seg->lmt = lmt; seg->rmt = rmt;
246 seg->mtch = mn;
313 Pfseg_t *seg;
316 seg = pf->cseg >= pf->nseg ? NIL(Pfseg_t*) : pf->seg+pf->cseg;
319 sz = seg ? (ssize_t)(seg->ldt - pf->dtpos) : pf->dtsz;
320 if(seg && sz > 0 && sz < (seg->rdt - seg->ldt) )
321 { seg->ldt -= sz;
322 if((seg->lmt -= sz) < 0)
323 seg->lmt = 0;
337 pf->cseg += 1; /* will be returning whatever is in seg */
341 sz = (ssize_t)((seg+1)->ldt - seg->rdt);
342 else sz = (ssize_t)((pf->dtpos+pf->dtsz) - seg->rdt);
344 { seg->rdt += sz;
345 if((seg->rmt += sz) > pf->maxo*blksz)
346 seg->rmt = ((Sfoff_t)pf->maxo)*blksz;
350 wm->wpos = seg->lmt;
351 wm->wsize = (ssize_t)(seg->rmt - seg->lmt);
352 if(sfseek(pf->sf, seg->lmt, 0) != seg->lmt ||
359 wm->msize = (ssize_t)(seg->rdt - seg->ldt);
547 { if(pfx->srcf->seg && pfx->srcf->sseg > 0)
548 free(pfx->srcf->seg);
552 { if(pfx->tarf->seg && pfx->tarf->sseg > 0)
553 free(pfx->tarf->seg);