Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. fmdebug.h
  5. Abstract:
  6. Font module Debugging header file.
  7. Environment:
  8. Windows NT Unidrv driver
  9. Revision History:
  10. 12/30/96 -ganeshp-
  11. Created
  12. dd-mm-yy -author-
  13. description
  14. --*/
  15. #ifndef _FMDEBUG_H
  16. #define _FMDEBUG_H
  17. #if DBG
  18. #ifdef PUBLIC_GDWDEBUGFONT
  19. DWORD gdwDebugFont;
  20. #else
  21. extern DWORD gdwDebugFont;
  22. #endif //PUBLIC_GDWDEBUGFONT
  23. /* Debugging Macroes */
  24. #define IFTRACE(b, xxx) {if((b)) {VERBOSE((xxx));}}
  25. #define PRINTVAL( Val, format) {\
  26. if (gdwDebugFont == DBG_TRACE) \
  27. DbgPrint("Value of "#Val " is "#format "\n",Val );\
  28. }
  29. #define TRACE( Val ) {\
  30. if (gdwDebugFont == DBG_TRACE) \
  31. DbgPrint(#Val"\n");\
  32. }
  33. #define DBGP(x) DbgPrint x
  34. /* Debugging Flags */
  35. #define DBG_FD_GLYPHSET 0x00000001 /* To Dump the FD_GLYPHSET of a font */
  36. #define DBG_UNI_GLYPHSETDATA 0x00000002 /* To Dump the UNI_GLYPHSET of a font */
  37. #define DBG_FONTMAP 0x00000004 /* To Dump the FONTMAP of a font */
  38. #define DBG_TRACE 0x00000008 /* To TRACE */
  39. #define DBG_IFIMETRICS 0x00000010 /* To Dump the IFIMETRICS of a font */
  40. #define DBG_TEXTSTRING 0x00000020 /* To Dump the Input Text string */
  41. /* Debugging Helper Function prototypes. Always use the Macro version of
  42. * the Call.This will make sure that no extra code is compiled in retail build.
  43. */
  44. VOID
  45. VDbgDumpUCGlyphData(
  46. FONTMAP *pFM
  47. );
  48. VOID
  49. VDbgDumpGTT(
  50. PUNI_GLYPHSETDATA pGly);
  51. VOID
  52. VDbgDumpFONTMAP(
  53. FONTMAP *pFM);
  54. VOID
  55. VDbgDumpIFIMETRICS(
  56. IFIMETRICS *pFM);
  57. VOID
  58. VPrintString(
  59. STROBJ *pstro
  60. );
  61. /* Function Macroes */
  62. #define VDBGDUMPUCGLYPHDATA(pFM) VDbgDumpUCGlyphData(pFM)
  63. #define VDBGDUMPGTT(pGly) VDbgDumpGTT(pGly)
  64. #define VDBGDUMPFONTMAP(pFM) VDbgDumpFONTMAP(pFM)
  65. #define VDBGDUMPIFIMETRICS(pIFI) VDbgDumpIFIMETRICS(pIFI)
  66. #define VPRINTSTRING(pstro) VPrintString(pstro)
  67. #else //!DBG Retail Build
  68. /* Debugging Macroes */
  69. #define IFTRACE(b, xxx)
  70. #define PRINTVAL( Val, format)
  71. #define TRACE( Val )
  72. #define DBGP(x) DBGP
  73. /* Function Macroes */
  74. #define VDBGDUMPUCGLYPHDATA(pFM)
  75. #define VDBGDUMPGTT(pGly)
  76. #define VDBGDUMPFONTMAP(pFM)
  77. #define VDBGDUMPIFIMETRICS(pIFI)
  78. #define VPRINTSTRING(pstro)
  79. #endif //DBG
  80. // Macroes for file lavel tracing. Define FILETRACE at the of the file
  81. // before including font.h.
  82. #if DBG
  83. #ifdef FILETRACE
  84. #define FTST( Val, format) DbgPrint("[UniFont!FTST] Value of "#Val " is "#format "\n",Val );
  85. #define FTRC( Val ) DbgPrint("[UniFont!FTRC] "#Val);\
  86. #else //FILETRACE
  87. #define FTST( Val, format)
  88. #define FTRC( Val )
  89. #endif //FILETRACE
  90. #else //DBG
  91. #define FTST( Val, format)
  92. #define FTRC( Val )
  93. #endif //DBG
  94. #endif // !_FMDEBUG_H