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.

106 lines
3.6 KiB

  1. /*
  2. * htmlstr.h
  3. *
  4. * HTML string constants
  5. *
  6. */
  7. #ifndef _HTMLSTR_H
  8. #define _HTMLSTR_H
  9. #if !defined( WIN16 ) || !defined( __WATCOMC__ )
  10. #ifdef DEFINE_STRING_CONSTANTS
  11. #ifndef UNIX
  12. #define MAKEBSTR(name, count, strdata) \
  13. extern "C" CDECL const WORD DATA_##name [] = {(count * sizeof(OLECHAR)), 0x00, L##strdata}; \
  14. extern "C" CDECL BSTR name = (BSTR)& DATA_##name[2];
  15. #else
  16. // IEUNIX : Trying to get same memory layout as above.
  17. struct UNIX_BSTR_FORMAT {
  18. DWORD cbCount; \
  19. WCHAR data[] ; \
  20. };
  21. #define MAKEBSTR(name, count, strdata) \
  22. const struct UNIX_BSTR_FORMAT STRUCT_##name = {(count * sizeof(OLECHAR)), L##strdata}; \
  23. extern "C" CDECL BSTR name = (BSTR) &STRUCT_##name.data;
  24. #endif
  25. #define STR_GLOBAL(x,y) extern "C" CDECL const TCHAR x[] = TEXT(y)
  26. #define STR_GLOBAL_ANSI(x,y) extern "C" CDECL const char x[] = y
  27. #define STR_GLOBAL_WIDE(x,y) extern "C" CDECL const WCHAR x[] = L##y
  28. #else
  29. #define MAKEBSTR(name, count, strdata) extern "C" CDECL LPCWSTR name
  30. #define STR_GLOBAL(x,y) extern "C" CDECL const TCHAR x[]
  31. #define STR_GLOBAL_ANSI(x,y) extern "C" CDECL const char x[]
  32. #define STR_GLOBAL_WIDE(x,y) extern "C" CDECL const WCHAR x[]
  33. #endif
  34. #else // !WIN16 || !__WATCOMC__
  35. #ifdef DEFINE_STRING_CONSTANTS
  36. #define MAKEBSTR(name, count, strdata) \
  37. extern "C" const char CDECL DATA_##name [] = {(count * sizeof(OLECHAR)), 0x00, strdata}; \
  38. extern "C" BSTR CDECL name = (BSTR)& DATA_##name[2];
  39. #define STR_GLOBAL(x,y) extern "C" const TCHAR CDECL x[] = TEXT(y)
  40. #define STR_GLOBAL_ANSI(x,y) extern "C" const char CDECL x[] = y
  41. #define STR_GLOBAL_WIDE(x,y) extern "C" const WCHAR CDECL x[] = y
  42. #else
  43. #define MAKEBSTR(name, count, strdata) extern "C" LPCWSTR CDECL name
  44. #define STR_GLOBAL(x,y) extern "C" const TCHAR CDECL x[]
  45. #define STR_GLOBAL_ANSI(x,y) extern "C" const char CDECL x[]
  46. #define STR_GLOBAL_WIDE(x,y) extern "C" const WCHAR CDECL x[]
  47. #endif
  48. #endif // !WIN16 || !__WATCOMC__
  49. MAKEBSTR(c_bstr_AfterBegin, 10, "AfterBegin");
  50. MAKEBSTR(c_bstr_BeforeEnd, 9, "BeforeEnd");
  51. MAKEBSTR(c_bstr_SRC, 3, "src");
  52. MAKEBSTR(c_bstr_HREF, 4, "HREF");
  53. MAKEBSTR(c_bstr_IMG, 3, "IMG");
  54. MAKEBSTR(c_bstr_BGSOUND, 7, "BGSOUND");
  55. MAKEBSTR(c_bstr_BASE, 4, "BASE");
  56. MAKEBSTR(c_bstr_Word, 4, "Word");
  57. MAKEBSTR(c_bstr_Character, 9, "Character");
  58. MAKEBSTR(c_bstr_StartToEnd, 10, "StartToEnd");
  59. MAKEBSTR(c_bstr_EndToEnd, 8, "EndToEnd");
  60. MAKEBSTR(c_bstr_StartToStart, 12, "StartToStart");
  61. MAKEBSTR(c_bstr_EndToStart, 10, "EndToStart");
  62. MAKEBSTR(c_bstr_ANCHOR, 1, "A");
  63. MAKEBSTR(c_bstr_BLOCKQUOTE,10, "BLOCKQUOTE");
  64. MAKEBSTR(c_bstr_BACKGROUND,10, "background");
  65. MAKEBSTR(c_bstr_BODY, 4, "BODY");
  66. MAKEBSTR(c_bstr_TABLE, 5, "TABLE");
  67. MAKEBSTR(c_bstr_TD, 2, "TD");
  68. MAKEBSTR(c_bstr_TH, 2, "TH");
  69. MAKEBSTR(c_bstr_FRAME, 5, "FRAME");
  70. MAKEBSTR(c_bstr_IFRAME, 6, "IFRAME");
  71. MAKEBSTR(c_bstr_FRAMESET, 8, "FRAMESET");
  72. MAKEBSTR(c_bstr_LINK, 4, "LINK");
  73. MAKEBSTR(c_bstr_REL, 3, "REL");
  74. MAKEBSTR(c_bstr_STYLESHEET, 10, "stylesheet");
  75. MAKEBSTR(c_bstr_DYNSRC, 6, "DYNSRC");
  76. MAKEBSTR(c_bstr_INPUT, 5, "INPUT" );
  77. MAKEBSTR(c_bstr_AREA, 4, "AREA" );
  78. MAKEBSTR(c_bstr_ON, 2, "on" );
  79. MAKEBSTR(c_bstr_SCRIPT, 6, "SCRIPT" );
  80. MAKEBSTR(c_bstr_EMPTY, 0, "");
  81. MAKEBSTR(c_bstr_DesignOff, 3, "off" );
  82. MAKEBSTR(c_bstr_BLANK, 11, "about:blank");
  83. #endif //_HTMLSTR_H