Lines Matching defs:buf
14 local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
27 ret = read(state->fd, buf + *have, get);
300 /* Read len bytes into buf from file, or less than len up to the end of the
304 local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len)
324 /* get len bytes to buf, or less than len if at the end */
340 memcpy(buf, state->x.next, n);
366 if (gz_load(state, (unsigned char *)buf, n, &n) == -1)
375 state->strm.next_out = (unsigned char *)buf;
386 buf = (char *)buf + n;
396 int ZEXPORT gzread(gzFile file, voidp buf, unsigned len)
421 /* read len or fewer bytes to buf */
422 len = (unsigned)gz_read(state, buf, len);
435 z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file)
461 /* read len or fewer bytes to buf, return the number of full items read */
462 return len ? gz_read(state, buf, len) / size : 0;
473 unsigned char buf[1];
498 return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
580 char * ZEXPORT gzgets(gzFile file, char *buf, int len)
588 if (file == NULL || buf == NULL || len < 1)
613 str = buf;
635 memcpy(buf, state->x.next, n);
640 buf += n;
644 if (buf == str)
648 buf[0] = 0;