Lines Matching refs:mode
82 if (state->mode == GZ_READ) { /* for reading ... */
94 local gzFile gz_open(path, fd, mode)
97 const char *mode;
121 /* interpret mode */
122 state->mode = GZ_NONE;
126 while (*mode) {
127 if (*mode >= '0' && *mode <= '9')
128 state->level = *mode - '0';
130 switch (*mode) {
132 state->mode = GZ_READ;
136 state->mode = GZ_WRITE;
139 state->mode = GZ_APPEND;
175 mode++;
179 if (state->mode == GZ_NONE) {
185 if (state->mode == GZ_READ) {
233 (state->mode == GZ_READ ?
239 (state->mode == GZ_WRITE ?
254 if (state->mode == GZ_APPEND)
255 state->mode = GZ_WRITE; /* simplify later checks */
258 if (state->mode == GZ_READ) {
271 gzFile ZEXPORT gzopen(path, mode)
273 const char *mode;
275 return gz_open(path, -1, mode);
279 gzFile ZEXPORT gzopen64(path, mode)
281 const char *mode;
283 return gz_open(path, -1, mode);
287 gzFile ZEXPORT gzdopen(fd, mode)
289 const char *mode;
301 gz = gz_open(path, fd, mode);
308 gzFile ZEXPORT gzopen_w(path, mode)
310 const char *mode;
312 return gz_open(path, -2, mode);
327 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
353 if (state->mode != GZ_READ ||
378 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
397 if (state->mode == GZ_READ && state->how == COPY &&
414 if (state->mode != GZ_READ) /* writing -- can't go backwards */
424 if (state->mode == GZ_READ) {
463 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
491 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
498 if (state->mode == GZ_READ) /* reading */
523 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
527 return state->mode == GZ_READ ? state->past : 0;
541 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
561 if (state->mode != GZ_READ && state->mode != GZ_WRITE)
565 if (state->mode == GZ_READ) {