]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm/dir.h
Merge pull request #653 from IrgendwerA8/cbm_rw_popptr1
[cc65] / libsrc / cbm / dir.h
index d7a30518ddc9bc70dc61bf0fda040f13d8cbca8b..08cb022a0f617de7050b260a7264fdc65c6396d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Internal include file, do not use directly.
- * Written by Ullrich von Bassewitz. Based on code by Groepaz.
- */
+** Internal include file, do not use directly.
+** Written by Ullrich von Bassewitz. Based on code by Groepaz.
+*/
 
 
 
 
 
 
+#include <dirent.h>
+
+
+
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
 
 struct DIR {
-    int                fd;             /* File descriptor for directory */
+    int         fd;             /* File descriptor for directory */
     unsigned    off;            /* Current byte offset in directory */
     char        name[16+1];     /* Name passed to opendir */
 };
@@ -25,18 +29,22 @@ struct DIR {
 
 
 /*****************************************************************************/
-/*                                  Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
 
-unsigned char __fastcall__ _dirskip (unsigned char count, struct DIR* dir);
-/* Skip bytes from the directory and make sure, errno is set if this isn't
- * possible. Return true if anything is ok and false otherwise. For
- * simplicity we assume that read will never return less than count if there
- * is no error and end-of-file is not reached.
- * Note: count must not be more than 254.
- */
+unsigned char __fastcall__ _dirread (DIR* dir, void* buf, unsigned char count);
+/* Read characters from the directory into the supplied buffer. Makes sure,
+** errno is set in case of a short read. Return true if the read was
+** successful and false otherwise.
+*/
+
+unsigned char __fastcall__ _dirread1 (DIR* dir, void* buf);
+/* Read one byte from the directory into the supplied buffer. Makes sure,
+** errno is set in case of a short read. Return true if the read was
+** successful and false otherwise.
+*/