• Home
  • Raw
  • Download

Lines Matching refs:dp

72 cupsDirClose(cups_dir_t *dp)		/* I - Directory pointer */  in cupsDirClose()  argument
78 if (!dp) in cupsDirClose()
85 if (dp->dir != INVALID_HANDLE_VALUE) in cupsDirClose()
86 FindClose(dp->dir); in cupsDirClose()
92 free(dp); in cupsDirClose()
105 cups_dir_t *dp; /* Directory */ in cupsDirOpen() local
119 dp = (cups_dir_t *)calloc(1, sizeof(cups_dir_t)); in cupsDirOpen()
120 if (!dp) in cupsDirOpen()
127 dp->dir = INVALID_HANDLE_VALUE; in cupsDirOpen()
129 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen()
135 return (dp); in cupsDirOpen()
146 cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRead() argument
155 if (!dp) in cupsDirRead()
162 if (dp->dir == INVALID_HANDLE_VALUE) in cupsDirRead()
168 dp->dir = FindFirstFileA(dp->directory, &entry); in cupsDirRead()
169 if (dp->dir == INVALID_HANDLE_VALUE) in cupsDirRead()
172 else if (!FindNextFileA(dp->dir, &entry)) in cupsDirRead()
179 strlcpy(dp->entry.filename, entry.cFileName, sizeof(dp->entry.filename)); in cupsDirRead()
182 dp->entry.fileinfo.st_mode = 0755 | S_IFDIR; in cupsDirRead()
184 dp->entry.fileinfo.st_mode = 0644; in cupsDirRead()
186 dp->entry.fileinfo.st_atime = _cups_dir_time(entry.ftLastAccessTime); in cupsDirRead()
187 dp->entry.fileinfo.st_ctime = _cups_dir_time(entry.ftCreationTime); in cupsDirRead()
188 dp->entry.fileinfo.st_mtime = _cups_dir_time(entry.ftLastWriteTime); in cupsDirRead()
189dp->entry.fileinfo.st_size = entry.nFileSizeLow + ((unsigned long long)entry.nFileSizeHigh << 32); in cupsDirRead()
195 return (&(dp->entry)); in cupsDirRead()
206 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRewind() argument
212 if (!dp) in cupsDirRewind()
219 if (dp->dir != INVALID_HANDLE_VALUE) in cupsDirRewind()
221 FindClose(dp->dir); in cupsDirRewind()
222 dp->dir = INVALID_HANDLE_VALUE; in cupsDirRewind()
256 cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirClose() argument
258 DEBUG_printf(("cupsDirClose(dp=%p)", (void *)dp)); in cupsDirClose()
264 if (!dp) in cupsDirClose()
271 closedir(dp->dir); in cupsDirClose()
272 free(dp); in cupsDirClose()
285 cups_dir_t *dp; /* Directory */ in cupsDirOpen() local
301 dp = (cups_dir_t *)calloc(1, sizeof(cups_dir_t)); in cupsDirOpen()
302 if (!dp) in cupsDirOpen()
309 dp->dir = opendir(directory); in cupsDirOpen()
310 if (!dp->dir) in cupsDirOpen()
312 free(dp); in cupsDirOpen()
320 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen()
326 return (dp); in cupsDirOpen()
337 cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRead() argument
343 DEBUG_printf(("2cupsDirRead(dp=%p)", (void *)dp)); in cupsDirRead()
349 if (!dp) in cupsDirRead()
362 if ((entry = readdir(dp->dir)) == NULL) in cupsDirRead()
381 strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename)); in cupsDirRead()
383 snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name); in cupsDirRead()
385 if (stat(filename, &(dp->entry.fileinfo))) in cupsDirRead()
396 return (&(dp->entry)); in cupsDirRead()
408 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRewind() argument
410 DEBUG_printf(("cupsDirRewind(dp=%p)", (void *)dp)); in cupsDirRewind()
416 if (!dp) in cupsDirRewind()
423 rewinddir(dp->dir); in cupsDirRewind()