1 #include "../git-compat-util.h"
6 DIR *opendir(const char *name
)
8 int len
= strlen(name
);
10 p
= malloc(sizeof(DIR) + len
+ 2);
14 memset(p
, 0, sizeof(DIR) + len
+ 2);
15 strcpy(p
->dd_name
, name
);
16 p
->dd_name
[len
] = '/';
17 p
->dd_name
[len
+1] = '*';
19 p
->dd_handle
= _findfirst(p
->dd_name
, &p
->dd_dta
);
21 if (p
->dd_handle
== -1) {
27 int closedir(DIR *dir
)
29 _findclose(dir
->dd_handle
);