The BIG graph update
[rrdtool.git] / libraries / freetype-2.0.5 / include / freetype / ftmoderr.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftmoderr.h                                                             */
4 /*                                                                         */
5 /*    FreeType module error offsets (specification).                       */
6 /*                                                                         */
7 /*  Copyright 2001 by                                                      */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17
18
19   /*************************************************************************/
20   /*                                                                       */
21   /* This file is used to define the FreeType module error offsets.        */
22   /*                                                                       */
23   /* The lower byte gives the error code, the higher byte gives the        */
24   /* module.  The base module has error offset 0.  For example, the error  */
25   /* `FT_Err_Invalid_File_Format' has value 0x003, the error               */
26   /* `TT_Err_Invalid_File_Format' has value 0xB03, the error               */
27   /* `T1_Err_Invalid_File_Format' has value 0xC03, etc.                    */
28   /*                                                                       */
29   /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h   */
30   /* to make the higher byte always zero (disabling the module error       */
31   /* mechanism).                                                           */
32   /*                                                                       */
33   /* It can also be used to create a module error message table easily     */
34   /* with something like                                                   */
35   /*                                                                       */
36   /*   {                                                                   */
37   /*     #undef __FTMODERR_H__                                             */
38   /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
39   /*     #define FT_MODERR_START_LIST     {                                */
40   /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
41   /*                                                                       */
42   /*     const struct                                                      */
43   /*     {                                                                 */
44   /*       int          mod_err_offset;                                    */
45   /*       const char*  mod_err_msg                                        */
46   /*     } ft_mod_errors[] =                                               */
47   /*                                                                       */
48   /*     #include FT_MODULE_ERRORS_H                                       */
49   /*   }                                                                   */
50   /*                                                                       */
51   /* To use such a table, all errors must be ANDed with 0xFF00 to remove   */
52   /* the error code.                                                       */
53   /*                                                                       */
54   /*************************************************************************/
55
56
57 #ifndef __FTMODERR_H__
58 #define __FTMODERR_H__
59
60
61   /*******************************************************************/
62   /*******************************************************************/
63   /*****                                                         *****/
64   /*****                       SETUP MACROS                      *****/
65   /*****                                                         *****/
66   /*******************************************************************/
67   /*******************************************************************/
68
69
70 #undef  FT_NEED_EXTERN_C
71
72 #ifndef FT_MODERRDEF
73
74 #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
75 #define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,
76 #else
77 #define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,
78 #endif
79
80 #define FT_MODERR_START_LIST  enum {
81 #define FT_MODERR_END_LIST    FT_Mod_Err_Max };
82
83 #ifdef __cplusplus
84 #define FT_NEED_EXTERN_C
85   extern "C" {
86 #endif
87
88 #endif /* !FT_MODERRDEF */
89
90
91   /*******************************************************************/
92   /*******************************************************************/
93   /*****                                                         *****/
94   /*****               LIST MODULE ERROR BASES                   *****/
95   /*****                                                         *****/
96   /*******************************************************************/
97   /*******************************************************************/
98
99
100 #ifdef FT_MODERR_START_LIST
101   FT_MODERR_START_LIST
102 #endif
103
104
105   FT_MODERRDEF( Base,     0x000, "base module" )
106   FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
107   FT_MODERRDEF( Cache,    0x200, "cache module" )
108   FT_MODERRDEF( CFF,      0x300, "CFF module" )
109   FT_MODERRDEF( CID,      0x400, "CID module" )
110   FT_MODERRDEF( PCF,      0x500, "PCF module" )
111   FT_MODERRDEF( PSaux,    0x600, "PS auxiliary module" )
112   FT_MODERRDEF( PSnames,  0x700, "PS names module" )
113   FT_MODERRDEF( Raster,   0x800, "raster module" )
114   FT_MODERRDEF( SFNT,     0x900, "SFNT module" )
115   FT_MODERRDEF( Smooth,   0xA00, "smooth raster module" )
116   FT_MODERRDEF( TrueType, 0xB00, "TrueType module" )
117   FT_MODERRDEF( Type1,    0xC00, "Type 1 module" )
118   FT_MODERRDEF( Winfonts, 0xD00, "Windows FON/FNT module" )
119
120
121 #ifdef FT_MODERR_END_LIST
122   FT_MODERR_END_LIST
123 #endif
124
125
126   /*******************************************************************/
127   /*******************************************************************/
128   /*****                                                         *****/
129   /*****                      CLEANUP                            *****/
130   /*****                                                         *****/
131   /*******************************************************************/
132   /*******************************************************************/
133
134
135 #ifdef FT_NEED_EXTERN_C
136   }
137 #endif
138
139 #undef FT_MODERR_START_LIST
140 #undef FT_MODERR_END_LIST
141 #undef FT_MODERRDEF
142 #undef FT_NEED_EXTERN_C
143
144
145 #endif /* __FTMODERR_H__ */
146
147
148 /* END */