-- see zlib.h -- */
(file)
| 344 | |
| 345 | /* -- see zlib.h -- */ |
| 346 | int ZEXPORT gzrewind(file) |
| 347 | gzFile file; |
| 348 | { |
| 349 | gz_statep state; |
| 350 | |
| 351 | /* get internal structure */ |
| 352 | if (file == NULL) |
| 353 | return -1; |
| 354 | state.file = file; |
| 355 | |
| 356 | /* check that we're reading and that there's no error */ |
| 357 | if (state.state->mode != GZ_READ || |
| 358 | (state.state->err != Z_OK && state.state->err != Z_BUF_ERROR)) |
| 359 | return -1; |
| 360 | |
| 361 | /* back up and start over */ |
| 362 | if (LSEEK(state.state->fd, state.state->start, SEEK_SET) == -1) |
| 363 | return -1; |
| 364 | gz_reset(state); |
| 365 | return 0; |
| 366 | } |
| 367 | |
| 368 | /* -- see zlib.h -- */ |
| 369 | z_off64_t ZEXPORT gzseek64(file, offset, whence) |