Lines Matching refs:path
88 local gzFile gz_open(const void *path, int fd, const char *mode)
101 if (path == NULL)
184 /* save the path name for error messages */
187 len = wcstombs(NULL, path, 0);
193 len = strlen((const char *)path);
194 state->path = (char *)malloc(len + 1);
195 if (state->path == NULL) {
202 wcstombs(state->path, path, len + 1);
204 *(state->path) = 0;
208 (void)snprintf(state->path, len + 1, "%s", (const char *)path);
210 strcpy(state->path, path);
237 fd == -2 ? _wopen(path, oflag, 0666) :
239 open((const char *)path, oflag, 0666));
241 free(state->path);
264 gzFile ZEXPORT gzopen(const char *path, const char *mode)
266 return gz_open(path, -1, mode);
270 gzFile ZEXPORT gzopen64(const char *path, const char *mode)
272 return gz_open(path, -1, mode);
278 char *path; /* identifier for error messages */
281 if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
284 (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd);
286 sprintf(path, "<fd:%d>", fd); /* for debugging */
288 gz = gz_open(path, fd, mode);
289 free(path);
295 gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode)
297 return gz_open(path, -2, mode);
564 /* construct error message with path */
565 if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
571 (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
572 "%s%s%s", state->path, ": ", msg);
574 strcpy(state->msg, state->path);