/src/freetype/include/freetype/ftmoderr.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 156 lines · 52 code · 30 blank · 74 comment · 0 complexity · 5bdf77a9e3ebe8bd5abad1ec3dab8872 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* ftmoderr.h */
  4. /* */
  5. /* FreeType module error offsets (specification). */
  6. /* */
  7. /* Copyright 2001, 2002, 2003, 2004, 2005, 2010 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. /* This file is used to define the FreeType module error offsets. */
  20. /* */
  21. /* The lower byte gives the error code, the higher byte gives the */
  22. /* module. The base module has error offset 0. For example, the error */
  23. /* `FT_Err_Invalid_File_Format' has value 0x003, the error */
  24. /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */
  25. /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */
  26. /* */
  27. /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
  28. /* to make the higher byte always zero (disabling the module error */
  29. /* mechanism). */
  30. /* */
  31. /* It can also be used to create a module error message table easily */
  32. /* with something like */
  33. /* */
  34. /* { */
  35. /* #undef __FTMODERR_H__ */
  36. /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */
  37. /* #define FT_MODERR_START_LIST { */
  38. /* #define FT_MODERR_END_LIST { 0, 0 } }; */
  39. /* */
  40. /* const struct */
  41. /* { */
  42. /* int mod_err_offset; */
  43. /* const char* mod_err_msg */
  44. /* } ft_mod_errors[] = */
  45. /* */
  46. /* #include FT_MODULE_ERRORS_H */
  47. /* } */
  48. /* */
  49. /* To use such a table, all errors must be ANDed with 0xFF00 to remove */
  50. /* the error code. */
  51. /* */
  52. /*************************************************************************/
  53. #ifndef __FTMODERR_H__
  54. #define __FTMODERR_H__
  55. /*******************************************************************/
  56. /*******************************************************************/
  57. /***** *****/
  58. /***** SETUP MACROS *****/
  59. /***** *****/
  60. /*******************************************************************/
  61. /*******************************************************************/
  62. #undef FT_NEED_EXTERN_C
  63. #ifndef FT_MODERRDEF
  64. #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
  65. #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v,
  66. #else
  67. #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0,
  68. #endif
  69. #define FT_MODERR_START_LIST enum {
  70. #define FT_MODERR_END_LIST FT_Mod_Err_Max };
  71. #ifdef __cplusplus
  72. #define FT_NEED_EXTERN_C
  73. extern "C" {
  74. #endif
  75. #endif /* !FT_MODERRDEF */
  76. /*******************************************************************/
  77. /*******************************************************************/
  78. /***** *****/
  79. /***** LIST MODULE ERROR BASES *****/
  80. /***** *****/
  81. /*******************************************************************/
  82. /*******************************************************************/
  83. #ifdef FT_MODERR_START_LIST
  84. FT_MODERR_START_LIST
  85. #endif
  86. FT_MODERRDEF( Base, 0x000, "base module" )
  87. FT_MODERRDEF( Autofit, 0x100, "autofitter module" )
  88. FT_MODERRDEF( BDF, 0x200, "BDF module" )
  89. FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" )
  90. FT_MODERRDEF( Cache, 0x400, "cache module" )
  91. FT_MODERRDEF( CFF, 0x500, "CFF module" )
  92. FT_MODERRDEF( CID, 0x600, "CID module" )
  93. FT_MODERRDEF( Gzip, 0x700, "Gzip module" )
  94. FT_MODERRDEF( LZW, 0x800, "LZW module" )
  95. FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" )
  96. FT_MODERRDEF( PCF, 0xA00, "PCF module" )
  97. FT_MODERRDEF( PFR, 0xB00, "PFR module" )
  98. FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" )
  99. FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" )
  100. FT_MODERRDEF( PSnames, 0xE00, "PS names module" )
  101. FT_MODERRDEF( Raster, 0xF00, "raster module" )
  102. FT_MODERRDEF( SFNT, 0x1000, "SFNT module" )
  103. FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" )
  104. FT_MODERRDEF( TrueType, 0x1200, "TrueType module" )
  105. FT_MODERRDEF( Type1, 0x1300, "Type 1 module" )
  106. FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
  107. FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
  108. #ifdef FT_MODERR_END_LIST
  109. FT_MODERR_END_LIST
  110. #endif
  111. /*******************************************************************/
  112. /*******************************************************************/
  113. /***** *****/
  114. /***** CLEANUP *****/
  115. /***** *****/
  116. /*******************************************************************/
  117. /*******************************************************************/
  118. #ifdef FT_NEED_EXTERN_C
  119. }
  120. #endif
  121. #undef FT_MODERR_START_LIST
  122. #undef FT_MODERR_END_LIST
  123. #undef FT_MODERRDEF
  124. #undef FT_NEED_EXTERN_C
  125. #endif /* __FTMODERR_H__ */
  126. /* END */