Lines Matching refs:have

21 local int gz_load(state, buf, len, have)

25 unsigned *have;
29 *have = 0;
31 ret = read(state->fd, buf + *have, len - *have);
34 *have += ret;
35 } while (*have < len);
92 /* Look for gzip header, set up for inflate or copy. state->have must be zero.
156 /* we have a gzip header, woo hoo! */
206 state->have = 1;
216 memcpy(state->next + state->have, strm->next_in, strm->avail_in);
217 state->have += strm->avail_in;
227 check value and length (modulo 2^32). state->have and state->next are set
230 stream or raw data, once state->have is depleted. Returns 0 on success, -1
271 state->have = had - strm->avail_out;
272 state->next = strm->next_out - state->have;
273 strm->adler = crc32(strm->adler, state->next, state->have);
289 state->how = LOOK; /* ready for next stream, once have is 0 (leave
297 /* Make data and put in the output buffer. Assumes that state->have == 0.
301 Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY
312 if (state->have) /* got some data from gz_head() */
316 if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1)
339 if (state->have) {
340 n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
341 (unsigned)len : state->have;
342 state->have -= n;
403 if (state->have) {
404 n = state->have > len ? len : state->have;
407 state->have -= n;
437 n = state->have;
438 state->have = 0;
470 if (state->have) {
471 state->have--;
509 if (state->have == 0) {
510 state->have = 1;
517 /* if no room, give up (must have already done a gzungetc()) */
518 if (state->have == (state->size << 1)) {
525 unsigned char *src = state->out + state->have;
531 state->have++;
572 if (state->have == 0) {
575 if (state->have == 0) { /* end of file */
583 n = state->have > left ? left : state->have;
590 state->have -= n;
619 if (state->how == LOOK && state->have == 0)