Lines Matching refs:path
88 local gzFile gz_open(const void *path, int fd, const char *mode) {
100 if (path == NULL)
183 /* save the path name for error messages */
186 len = wcstombs(NULL, path, 0);
192 len = strlen((const char *)path);
193 state->path = (char *)malloc(len + 1);
194 if (state->path == NULL) {
201 wcstombs(state->path, path, len + 1);
203 *(state->path) = 0;
207 (void)snprintf(state->path, len + 1, "%s", (const char *)path);
209 strcpy(state->path, path);
236 fd == -2 ? _wopen(path, oflag, 0666) :
238 OPEN((const char *)path, oflag, 0666));
240 free(state->path);
263 gzFile ZEXPORT gzopen(const char *path, const char *mode) {
264 return gz_open(path, -1, mode);
268 gzFile ZEXPORT gzopen64(const char *path, const char *mode) {
269 return gz_open(path, -1, mode);
274 char *path; /* identifier for error messages */
277 if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
280 (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd);
282 sprintf(path, "<fd:%d>", fd); /* for debugging */
284 gz = gz_open(path, fd, mode);
285 free(path);
291 gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) {
292 return gz_open(path, -2, mode);
553 /* construct error message with path */
554 if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
560 (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
561 "%s%s%s", state->path, ": ", msg);
563 strcpy(state->msg, state->path);