Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
dirent.h
Go to the documentation of this file.
1#pragma once
2#include <dirent.h>
3
4#ifdef _WIN32
5#include <windows.h>
6#include <direct.h>
7
8#define DT_UNKNOWN 0
9#define DT_REG 8
10#define DT_DIR 4
11
12struct dirent_win {
13 char d_name[MAX_PATH];
14 unsigned char d_type;
15};
16typedef struct dirent_win dirent_t;
17
18int scandir_windows(const char *dirpath, dirent_t ***namelist,
19 int (*filter)(const dirent_t *),
20 int (*compar)(const dirent_t **, const dirent_t **));
21int alphasort_portable(const dirent_t **a, const dirent_t **b);
22
23#define scandir(dirpath, namelist, filter, compar) scandir_windows(dirpath, namelist, filter, compar)
24#define alphasort alphasort_portable
25#else
26typedef struct dirent dirent_t;
27#endif
int scandir_windows(const char *dirpath, dirent_t ***namelist, int(*filter)(const dirent_t *), int(*compar)(const dirent_t **, const dirent_t **))
Definition dirent.c:7
int alphasort_portable(const dirent_t **a, const dirent_t **b)
Definition dirent.c:62
struct dirent dirent_t
Definition dirent.h:26