OLD | NEW |
1 /* | 1 /* |
2 ** 2015 November 30 | 2 ** 2015 November 30 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 char d_name[NAME_MAX + 1]; /* Name within the directory. */ | 86 char d_name[NAME_MAX + 1]; /* Name within the directory. */ |
87 }; | 87 }; |
88 | 88 |
89 struct DIR { | 89 struct DIR { |
90 intptr_t d_handle; /* Value returned by "_findfirst". */ | 90 intptr_t d_handle; /* Value returned by "_findfirst". */ |
91 DIRENT d_first; /* DIRENT constructed based on "_findfirst". */ | 91 DIRENT d_first; /* DIRENT constructed based on "_findfirst". */ |
92 DIRENT d_next; /* DIRENT constructed based on "_findnext". */ | 92 DIRENT d_next; /* DIRENT constructed based on "_findnext". */ |
93 }; | 93 }; |
94 | 94 |
95 /* | 95 /* |
| 96 ** Provide a macro, for use by the implementation, to determine if a |
| 97 ** particular directory entry should be skipped over when searching for |
| 98 ** the next directory entry that should be returned by the readdir() or |
| 99 ** readdir_r() functions. |
| 100 */ |
| 101 |
| 102 #ifndef is_filtered |
| 103 # define is_filtered(a) ((((a).attrib)&_A_HIDDEN) || (((a).attrib)&_A_SYSTEM)) |
| 104 #endif |
| 105 |
| 106 /* |
| 107 ** Provide the function prototype for the POSIX compatiable getenv() |
| 108 ** function. This function is not thread-safe. |
| 109 */ |
| 110 |
| 111 extern const char *windirent_getenv(const char *name); |
| 112 |
| 113 /* |
96 ** Finally, we can provide the function prototypes for the opendir(), | 114 ** Finally, we can provide the function prototypes for the opendir(), |
97 ** readdir(), readdir_r(), and closedir() POSIX functions. | 115 ** readdir(), readdir_r(), and closedir() POSIX functions. |
98 */ | 116 */ |
99 | 117 |
100 extern LPDIR opendir(const char *dirname); | 118 extern LPDIR opendir(const char *dirname); |
101 extern LPDIRENT readdir(LPDIR dirp); | 119 extern LPDIRENT readdir(LPDIR dirp); |
102 extern INT readdir_r(LPDIR dirp, LPDIRENT entry, LPDIRENT *result); | 120 extern INT readdir_r(LPDIR dirp, LPDIRENT entry, LPDIRENT *result); |
103 extern INT closedir(LPDIR dirp); | 121 extern INT closedir(LPDIR dirp); |
104 | 122 |
105 #endif /* defined(WIN32) && defined(_MSC_VER) */ | 123 #endif /* defined(WIN32) && defined(_MSC_VER) */ |
OLD | NEW |