]> git.sur5r.net Git - cc65/blobdiff - include/dirent.h
Added functional Atari directory classification macros for file types from struct...
[cc65] / include / dirent.h
index 857aad4db1e7b6291f7aa0792a5fed713ad2f264..010db6a117cefbe858d8ff75aecccf2a27997c79 100644 (file)
@@ -81,11 +81,12 @@ struct dirent {
 #elif defined(__ATARI__)
 
 struct dirent {
-    char d_name[13];  /* 8.3 + trailing 0 */
+    char          d_name[13];  /* 8.3 + trailing 0 */
+    unsigned char d_type;
 };
 
-#define _DE_ISREG(t)  (1)
-#define _DE_ISDIR(t)  (0)
+#define _DE_ISREG(t)  ((t) != 0xC4)
+#define _DE_ISDIR(t)  ((t) == 0xC4)
 #define _DE_ISLBL(t)  (0)
 #define _DE_ISLNK(t)  (0)