Lines Matching defs:cvt

122 	register Cvt_t*		cvt = (Cvt_t*)pp->discdata;
128 if (cvt->flags & CONVERT)
130 cvt->last->buf = (unsigned char*)data;
132 cp = cvt->chain;
156 if (n > 0 && (cvt->flags & CHECKSUM))
157 cvt->checksum = memsum_4(cvt->checksum, data, n);
171 register Cvt_t* cvt = (Cvt_t*)pp->discdata;
178 if (cvt->flags & CONVERT)
182 else if (!(b = (unsigned char*)sfreserve(sp, cvt->last->convert->to->row, 1)))
184 cvt->last->buf = b;
186 for (cp = cvt->chain; cp; cp = cp->next)
201 if (cvt->flags & CHECKSUM)
202 cvt->checksum = memsum_4(cvt->checksum, data, pp->row);
349 register Cvt_t* cvt;
423 if (!(cvt = (Cvt_t*)pp->discdata))
425 if (!(cvt = vmnewof(pz->vm, 0, Cvt_t, 1, 0)))
427 pp->discdata = (void*)cvt;
432 if ((pz->flags & PZ_READ) && (cvt->flags & (CHECKSUM|CHECKSUM_WARN|CHECKSUM_TAIL)) == (CHECKSUM|CHECKSUM_WARN))
436 (*disc->errorf)(pz, disc, 1, "%s: no checksum -- expected 0x%08I*x", pz->path, sizeof(cvt->checksum), cvt->checksum);
438 if (cvt->flags & CONVERT)
439 for (cp = cvt->chain; cp; cp = cp->next)
496 if (cvt->flags & CONVERT)
497 for (cp = cvt->chain; cp; cp = cp->next)
585 if (cvt->chain = cp)
587 cvt->flags |= CONVERT;
592 cvt->last = cp;
597 if ((cvt->flags |= (state->flags & CHECKSUM)) & (CHECKSUM|CONVERT))
603 if (cvt->flags & CHECKSUM)
605 if (cvt->flags & CONVERT)
607 sfprintf(pz->tmp, "%s", cvt->chain->convert->from->name);
608 for (cp = cvt->chain; cp; cp = cp->next)
616 if (cvt->flags & CHECKSUM)
619 if (cvt->flags & CONVERT)
622 if (cvt->flags & CONVERT)
624 sfprintf(sfstdout, "%s", cvt->chain->convert->from->name);
625 for (cp = cvt->chain; cp; cp = cp->next)
628 if (cvt->flags & (CHECKSUM|CONVERT))
634 cvt->checksum = 0;
635 cvt->flags &= ~CHECKSUM_TAIL;
638 if (cvt->flags & CHECKSUM)
643 cvt->flags |= CHECKSUM_TAIL;
644 if ((k = sfgetu(state->tmp)) != cvt->checksum)
647 (*disc->errorf)(pz, disc, 2, "%s: checksum mismatch -- expected 0x%08I*x != 0x%08I*x", pz->path, sizeof(k), k, sizeof(cvt->checksum), cvt->checksum);
657 if (cvt->flags & CHECKSUM)
659 cvt->flags |= CHECKSUM_TAIL;
662 sfputu(state->tmp, cvt->checksum);