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.

113 lines
4.0 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. #define MAKEBSTR(name, count, strdata) \
  12. extern "C" CDECL const WORD DATA_##name [] = {(count * sizeof(OLECHAR)), 0x00, L##strdata}; \
  13. extern "C" CDECL BSTR name = (BSTR)& DATA_##name[2];
  14. #define STR_GLOBAL(x,y) extern "C" CDECL const TCHAR x[] = TEXT(y)
  15. #define STR_GLOBAL_ANSI(x,y) extern "C" CDECL const char x[] = y
  16. #define STR_GLOBAL_WIDE(x,y) extern "C" CDECL const WCHAR x[] = L##y
  17. #else
  18. #define MAKEBSTR(name, count, strdata) extern "C" CDECL LPCWSTR name
  19. #define STR_GLOBAL(x,y) extern "C" CDECL const TCHAR x[]
  20. #define STR_GLOBAL_ANSI(x,y) extern "C" CDECL const char x[]
  21. #define STR_GLOBAL_WIDE(x,y) extern "C" CDECL const WCHAR x[]
  22. #endif
  23. #else // !WIN16 || !__WATCOMC__
  24. #ifdef DEFINE_STRING_CONSTANTS
  25. #define MAKEBSTR(name, count, strdata) \
  26. extern "C" const char CDECL DATA_##name [] = {(count * sizeof(OLECHAR)), 0x00, strdata}; \
  27. extern "C" BSTR CDECL name = (BSTR)& DATA_##name[2];
  28. #define STR_GLOBAL(x,y) extern "C" const TCHAR CDECL x[] = TEXT(y)
  29. #define STR_GLOBAL_ANSI(x,y) extern "C" const char CDECL x[] = y
  30. #define STR_GLOBAL_WIDE(x,y) extern "C" const WCHAR CDECL x[] = y
  31. #else
  32. #define MAKEBSTR(name, count, strdata) extern "C" LPCWSTR CDECL name
  33. #define STR_GLOBAL(x,y) extern "C" const TCHAR CDECL x[]
  34. #define STR_GLOBAL_ANSI(x,y) extern "C" const char CDECL x[]
  35. #define STR_GLOBAL_WIDE(x,y) extern "C" const WCHAR CDECL x[]
  36. #endif
  37. #endif // !WIN16 || !__WATCOMC__
  38. STR_GLOBAL(c_szHtml_DivOpen, "<DIV>");
  39. STR_GLOBAL(c_szHtml_DivClose, "</DIV>");
  40. STR_GLOBAL_WIDE(c_wszHtml_DivOpen, "<DIV>");
  41. STR_GLOBAL_WIDE(c_wszHtml_DivClose, "</DIV>");
  42. //STR_GLOBAL(c_szHtml_FontOpen, "<FONT>");
  43. STR_GLOBAL(c_szHtml_FontClose, "</FONT>");
  44. STR_GLOBAL(c_szHtml_BoldOpen, "<B>");
  45. STR_GLOBAL(c_szHtml_BoldClose, "</B>");
  46. //STR_GLOBAL(c_szHtml_UnderlineOpen, "<U>");
  47. //STR_GLOBAL(c_szHtml_UnderlineClose, "</U>");
  48. //STR_GLOBAL(c_szHtml_ItallicOpen, "<I>");
  49. //STR_GLOBAL(c_szHtml_ItallicClose, "</I>");
  50. STR_GLOBAL(c_szHtml_Break, "<BR>");
  51. //fSTR_GLOBAL(c_szHtml_MetaTagf, "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=%s\">\r\n");
  52. STR_GLOBAL(c_szHtml_HtmlOpenCR, "<HTML>\r\n");
  53. STR_GLOBAL(c_szHtml_HtmlCloseCR, "</HTML>\r\n");
  54. STR_GLOBAL(c_szHtml_HeadOpenCR, "<HEAD>\r\n<STYLE>\r\n");
  55. STR_GLOBAL(c_szHtml_HeadCloseCR, "</STYLE>\r\n</HEAD>\r\n");
  56. STR_GLOBAL(c_szHtml_BodyOpenNbspCR, "<BODY>\r\n&nbsp;");
  57. STR_GLOBAL(c_szHtml_BodyOpenBgCR, "<BODY BACKGROUND=\"%s\">\r\n&nbsp;\r\n");
  58. STR_GLOBAL(c_szHtml_BodyCloseCR, "</BODY>\r\n");
  59. MAKEBSTR(c_bstr_AfterBegin, 10, "AfterBegin");
  60. MAKEBSTR(c_bstr_BeforeEnd, 9, "BeforeEnd");
  61. MAKEBSTR(c_bstr_TabChar, 4, "\xA0\xA0\xA0\x20");
  62. MAKEBSTR(c_bstr_SRC, 3, "src");
  63. //MAKEBSTR(c_bstr_HREF, 4, "HREF");
  64. MAKEBSTR(c_bstr_IMG, 3, "IMG");
  65. MAKEBSTR(c_bstr_BASE, 4, "BASE");
  66. MAKEBSTR(c_bstr_OBJECT, 6, "OBJECT");
  67. MAKEBSTR(c_bstr_STYLE, 5, "STYLE");
  68. MAKEBSTR(c_bstr_ANCHOR, 1, "A");
  69. MAKEBSTR(c_bstr_LEFTMARGIN, 10, "leftmargin");
  70. MAKEBSTR(c_bstr_TOPMARGIN, 9, "topmargin");
  71. MAKEBSTR(c_bstr_Word, 4, "Word");
  72. MAKEBSTR(c_bstr_Character, 9, "Character");
  73. MAKEBSTR(c_bstr_StartToEnd, 10, "StartToEnd");
  74. MAKEBSTR(c_bstr_EndToEnd, 8, "EndToEnd");
  75. MAKEBSTR(c_bstr_StartToStart, 12, "StartToStart");
  76. MAKEBSTR(c_bstr_EndToStart, 10, "EndToStart");
  77. //MAKEBSTR(c_bstr_ANCHOR, 1, "A");
  78. MAKEBSTR(c_bstr_BLOCKQUOTE, 10, "BLOCKQUOTE");
  79. MAKEBSTR(c_bstr_1, 1, "1");
  80. MAKEBSTR(c_bstr_NOSEND, 6, "NOSEND");
  81. MAKEBSTR(c_bstr_BGSOUND, 7, "BGSOUND");
  82. MAKEBSTR(c_bstr_BGSOUND_TAG, 9, "<BGSOUND>");
  83. MAKEBSTR(c_bstr_MonoSpace, 9, "monospace");
  84. #endif //_HTMLSTR_H