=========================================================================== Read a byte from a gz_stream; update next_in and avail_in. Return EOF for end of file. IN assertion: the stream s has been sucessfully opened for reading. */
(s)
| 264 | IN assertion: the stream s has been sucessfully opened for reading. |
| 265 | */ |
| 266 | local int get_byte(s) |
| 267 | gz_stream *s; |
| 268 | { |
| 269 | if (s->z_eof) return EOF; |
| 270 | if (s->stream.avail_in == 0) { |
| 271 | errno = 0; |
| 272 | s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); |
| 273 | if (s->stream.avail_in == 0) { |
| 274 | s->z_eof = 1; |
| 275 | if (ferror(s->file)) s->z_err = Z_ERRNO; |
| 276 | return EOF; |
| 277 | } |
| 278 | s->stream.next_in = s->inbuf; |
| 279 | } |
| 280 | s->stream.avail_in--; |
| 281 | return *(s->stream.next_in)++; |
| 282 | } |
| 283 | |
| 284 | /* =========================================================================== |
| 285 | Check the gzip header of a gz_stream opened for reading. Set the stream |
no outgoing calls
no test coverage detected