1 #include "../git-compat-util.h"
6 DIR *opendir(const char *name
)
10 p
= malloc(sizeof(DIR));
14 memset(p
, 0, sizeof(DIR));
15 strncpy(p
->dd_name
, name
, PATH_MAX
);
16 len
= strlen(p
->dd_name
);
17 p
->dd_name
[len
] = '/';
18 p
->dd_name
[len
+1] = '*';
20 p
->dd_handle
= _findfirst(p
->dd_name
, &p
->dd_dta
);
22 if (p
->dd_handle
== -1) {
28 int closedir(DIR *dir
)
30 _findclose(dir
->dd_handle
);