Changeset 212 in Main for trunk/Common/dir.c
- Timestamp:
- Oct 3, 2024, 2:44:55 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/dir.c
r150 r212 6 6 7 7 #include <sys/stat.h> 8 #ifndef _MSC_VER 8 9 #include <dirent.h> 10 #endif 9 11 #include <stdlib.h> 10 12 #include <string.h> … … 17 19 18 20 char** cm_scandir(const char* path) { 21 #ifdef _MSC_VER 22 return NULL; 23 #else 19 24 DIR* dir = opendir(path); 20 25 if(dir != NULL) { 21 26 char** r = malloc(sizeof(*r)); 27 struct dirent* d; 22 28 r[0] = NULL; 23 struct dirent* d;24 29 while((d = readdir(dir)) != NULL) { 25 30 if(strcmp(d->d_name, ".") != 0 && strcmp(d->d_name, "..") != 0) { … … 61 66 return NULL; 62 67 } 68 #endif 63 69 }
Note:
See TracChangeset
for help on using the changeset viewer.