]> git.sur5r.net Git - cc65/blob - include/cbm_filetype.h
Fixed _textcolor definition.
[cc65] / include / cbm_filetype.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                              cbm_filetype.h                               */
4 /*                                                                           */
5 /*                      Definitions for CBM file types                       */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 2012,      Ullrich von Bassewitz                                      */
10 /*                Roemerstrasse 52                                           */
11 /*                D-70794 Filderstadt                                        */
12 /* EMail:         uz@cc65.org                                                */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef _CBM_FILETYPE_H
37 #define _CBM_FILETYPE_H
38
39
40
41 /* Check for errors */
42 #if !defined(__CBM__)
43 #  error This module may be used only when compiling for CBM machines!
44 #endif
45
46
47
48 /*****************************************************************************/
49 /*                                Definitions                                */
50 /*****************************************************************************/
51
52
53
54 /* CBM FILE TYPES. The definitions are used within standard headers, so we
55 ** be careful with identifiers in the user name space.
56 ** "Regular" files have a special bit set so it's easier to pick them out.
57 */
58 #define _CBM_T_REG      0x10U   /* Bit set for regular files */
59 #define _CBM_T_SEQ      0x10U
60 #define _CBM_T_PRG      0x11U
61 #define _CBM_T_USR      0x12U
62 #define _CBM_T_REL      0x13U
63 #define _CBM_T_VRP      0x14U   /* Vorpal fast-loadable format */
64 #define _CBM_T_DEL      0x00U
65 #define _CBM_T_CBM      0x01U   /* 1581 sub-partition */
66 #define _CBM_T_DIR      0x02U   /* IDE64 and CMD sub-directory */
67 #define _CBM_T_LNK      0x03U   /* IDE64 soft-link */
68 #define _CBM_T_OTHER    0x04U   /* File-type not recognized */
69 #define _CBM_T_HEADER   0x05U   /* Disk header / title */
70
71 #if __CC65_STD__ == __CC65_STD_CC65__
72 /* Allow for names without leading underscores */
73 #define CBM_T_DEL       _CBM_T_DEL
74 #define CBM_T_SEQ       _CBM_T_SEQ
75 #define CBM_T_PRG       _CBM_T_PRG
76 #define CBM_T_USR       _CBM_T_USR
77 #define CBM_T_REL       _CBM_T_REL
78 #define CBM_T_CBM       _CBM_T_CBM
79 #define CBM_T_DIR       _CBM_T_DIR
80 #define CBM_T_LNK       _CBM_T_LNK
81 #define CBM_T_VRP       _CBM_T_VRP
82 #define CBM_T_OTHER     _CBM_T_OTHER
83 #define CBM_T_HEADER    _CBM_T_HEADER
84 #endif
85
86
87
88 /*****************************************************************************/
89 /*                                   Code                                    */
90 /*****************************************************************************/
91
92
93
94 unsigned char __fastcall__ _cbm_filetype (unsigned char c);
95 /* Map the start character for a file type to one of the file types above.
96 ** Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
97 ** look at the following character to determine if the file type is actually
98 ** CBM_T_DIR.
99 ** This is a function used by the implementation. There is usually no need
100 ** to call it from user code.
101 */
102
103
104
105 /* End of cbm_filetype.h */
106 #endif
107
108