+#include <dirent.h>
+
+
+
/*****************************************************************************/
/* Data */
/*****************************************************************************/
#include <stdlib.h>
#include <string.h>
-#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
DIR* __fastcall__ opendir (const char*)
-{
+{
unsigned char buf[32];
DIR* dir = 0;
DIR d;
/* Setup file name and offset */
d.name[0] = '$';
d.name[1] = '\0';
- d.off = 0;
+ d.off = sizeof (buf);
/* Open the directory on disk for reading */
d.fd = open (d.name, O_RDONLY);
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
goto exitpoint;
}
dir->off += 2;
-
+
/* Read the number of blocks */
if (!_dirread (dir, &entry.d_blocks, sizeof (entry.d_blocks))) {
goto exitpoint;