Source code of Windows XP (NT5)
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.

94 lines
2.2 KiB

  1. /*
  2. ** rtf.h - definitions for the character codes used by RTF. |
  3. **
  4. ** Copyright <C> 1987, Microsoft Corporation
  5. **
  6. ** Purpose:
  7. **
  8. ** Revision History:
  9. **
  10. ** [] 17-Dec-1987 LN: Stolen from Excel code
  11. **
  12. */
  13. #define cRTFMinus '-'
  14. #define cRTFPlus '+'
  15. #define cRTFTilda '~'
  16. #define cRTFDash '-'
  17. #define cRTFUnder '_'
  18. #define cRTFSemi ';'
  19. #define cRTFq '\''
  20. #define cRTFlb '{'
  21. #define cRTFrb '}'
  22. #define cRTFbs '\\'
  23. #define cRTFv 'v'
  24. /*
  25. ** defines for primary symbol type
  26. */
  27. #define SK_NORMAL 0 /* normal type, check token */
  28. #define SK_SKIPDEST 1 /* skip entire destination */
  29. #define SK_SKIPVALUE 2 /* skip the value */
  30. #define SK_SPECIAL 4 /* special character */
  31. #define SK_REPLACE 5 /* replace RTF token */
  32. #define SK_NIL 0xff /* nil type */
  33. /*
  34. ** defines for symbols we actually care about
  35. */
  36. #define TK_OFF 0x80 /* high bit is on/off flag */
  37. #define TK_NIL 0
  38. #define TK_ANSI 1
  39. #define TK_BITMAP 2 /* compressed bitmap filename follows? */
  40. #define TK_BLUE 3
  41. #define TK_BOLD 4
  42. #define TK_BORDERB 5
  43. #define TK_BORDERL 6
  44. #define TK_BORDERR 7
  45. #define TK_BORDERT 8
  46. #define TK_BOX 9
  47. #define TK_CENTERED 10
  48. #define TK_COLORBACK 11
  49. #define TK_COLORFORE 12
  50. #define TK_COLORTABLE 13
  51. #define TK_FIRSTLINE 14
  52. #define TK_FONTSIZE 15
  53. #define TK_FORMULA 16
  54. #define TK_GREEN 17
  55. #define TK_HEX 18
  56. #define TK_INVISIBLE 19 /* hidden text is filename: note/topic/bitmap */
  57. #define TK_ITALIC 20
  58. #define TK_JUSTIFY 21
  59. #define TK_LEFT 22
  60. #define TK_LEFTINDENT 23
  61. #define TK_LINE 24
  62. #define TK_MACCHARS 25
  63. #define TK_NEWLINE 26
  64. #define TK_NONBREAKINGDASH 27
  65. #define TK_NONBREAKINGSPACE 28
  66. #define TK_NONREQUIREDDASH 29
  67. #define TK_PARADEFAULT 30
  68. #define TK_PCCHARS 31
  69. #define TK_PLAIN 32
  70. #define TK_RED 33
  71. #define TK_RIGHT 34
  72. #define TK_RIGHTINDENT 35
  73. #define TK_RTAB 36
  74. #define TK_SIDEBYSIDE 37
  75. #define TK_SPACEAFTER 38
  76. #define TK_SPACEBEFORE 39
  77. #define TK_SPACELINE 40
  78. #define TK_STRIKEOUT 41 /* strikeout is hotspot for Topic */
  79. #define TK_TABCHAR 42
  80. #define TK_TABSTOP 43
  81. #define TK_UNDERLINE 44 /* underline is hotspot for Definition */
  82. /*
  83. ** structure definition for parse table
  84. */
  85. struct tsnPE
  86. {
  87. uchar *pch; // pointer to symbol string
  88. uchar sk; // primary symbol kind
  89. ushort tk; // token - one of the above TK_, or FM_
  90. };
  91. typedef struct tsnPE PE;