]> git.sur5r.net Git - cc65/commitdiff
Removed unnecessary include files.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 3 Jun 2012 14:32:15 +0000 (14:32 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 3 Jun 2012 14:32:15 +0000 (14:32 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5674 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/cbm/dir.h
libsrc/cbm/opendir.c
libsrc/cbm/readdir.c

index c7c9ae21beaae16b90d26451463b722b6faf05e6..f3239c4aa949ef1164d74fce6a0cbeacef9d9bea 100644 (file)
 
 
 
+#include <dirent.h>
+
+
+
 /*****************************************************************************/
 /*                                  Data                                    */
 /*****************************************************************************/
index 569c4918a34c975446af369262cf69e4b7d26706..8b2334da9e10ba7720ad94461634cc0dcd11b4ea 100644 (file)
@@ -4,7 +4,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
@@ -13,7 +12,7 @@
 
 
 DIR* __fastcall__ opendir (const char*)
-{                           
+{
     unsigned char buf[32];
     DIR* dir = 0;
     DIR d;
@@ -21,7 +20,7 @@ DIR* __fastcall__ opendir (const char*)
     /* 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);
index 58c244de6639c3e8e0c6bb517f9025a4095a5857..0a20bdd06660504a296d40bcd2a79cd95964efd0 100644 (file)
@@ -4,9 +4,6 @@
 
 
 
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
@@ -36,7 +33,7 @@ struct dirent* __fastcall__ readdir (register DIR* dir)
         goto exitpoint;
     }
     dir->off += 2;
-                                
+
     /* Read the number of blocks */
     if (!_dirread (dir, &entry.d_blocks, sizeof (entry.d_blocks))) {
         goto exitpoint;