]> git.sur5r.net Git - cc65/blobdiff - include/cbm_filetype.h
Merge pull request #634 from blackystardust/master
[cc65] / include / cbm_filetype.h
index 9192ee3e90d6c8ecd3c591438dae6258731ceb15..e049eb306a58d5811d2bdfa6f63bd250ec272ef5 100644 (file)
 
 
 /* CBM FILE TYPES. The definitions are used within standard headers, so we
- * be careful with identifiers in the user name space.
- */
-#define _CBM_T_DEL      0
-#define _CBM_T_SEQ      1
-#define _CBM_T_PRG      2
-#define _CBM_T_USR      3
-#define _CBM_T_REL      4
-#define _CBM_T_CBM      5       /* 1581 sub-partition */
-#define _CBM_T_DIR      6       /* IDE64 and CMD sub-directory */
-#define _CBM_T_LNK      7       /* IDE64 soft-link */
-#define _CBM_T_VRP      8       /* Vorpal fast-loadable format */
-#define _CBM_T_OTHER    9       /* File-type not recognized */
-#define _CBM_T_HEADER  10       /* Disk header / title */
+** be careful with identifiers in the user name space.
+** "Regular" files have a special bit set so it's easier to pick them out.
+*/
+#define _CBM_T_REG      0x10U   /* Bit set for regular files */
+#define _CBM_T_SEQ      0x10U
+#define _CBM_T_PRG      0x11U
+#define _CBM_T_USR      0x12U
+#define _CBM_T_REL      0x13U
+#define _CBM_T_VRP      0x14U   /* Vorpal fast-loadable format */
+#define _CBM_T_DEL      0x00U
+#define _CBM_T_CBM      0x01U   /* 1581 sub-partition */
+#define _CBM_T_DIR      0x02U   /* IDE64 and CMD sub-directory */
+#define _CBM_T_LNK      0x03U   /* IDE64 soft-link */
+#define _CBM_T_OTHER    0x04U   /* File-type not recognized */
+#define _CBM_T_HEADER   0x05U   /* Disk header / title */
 
 #if __CC65_STD__ == __CC65_STD_CC65__
 /* Allow for names without leading underscores */
 
 unsigned char __fastcall__ _cbm_filetype (unsigned char c);
 /* Map the start character for a file type to one of the file types above.
- * Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
- * look at the following character to determine if the file type is actually
- * CBM_T_DIR.
- * This is a function used by the implementation. There is usually no need
- * to call it from user code.
- */
+** Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
+** look at the following character to determine if the file type is actually
+** CBM_T_DIR.
+** This is a function used by the implementation. There is usually no need
+** to call it from user code.
+*/