27 #define DIRENT_MALLOC(sz) malloc(sz)
30 #define DIRENT_FREE(p) free(p)
106 size_t base_length = strlen(name);
109 const char *all = strchr(
"/\\", name[base_length - 1]) ?
"*" :
"/*";
114 strcat(strcpy(dir->
name, name), all);
145 if (dir->
handle != -1) result = _findclose(dir->
handle);
152 if (result == -1) errno = EBADF;
159 struct dirent *result = 0;
161 if (dir && dir->
handle != -1)
176 if (dir && dir->
handle != -1)
ptrdiff_t handle_type
Implementation of POSIX directory browsing functions and types for Win32.
DIR * opendir(const char *name)
struct dirent * readdir(DIR *dir)
#define DIRENT_MALLOC(sz)
Declaration of POSIX directory browsing functions and types for Win32.