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.

64 lines
1.9 KiB

  1. #ifndef __INCLUDE_PATH
  2. #define __INCLUDE_PATH
  3. #define CSTROKE_MAX 511
  4. #define CCHAR_MAX 255
  5. #define CCHAR_WORD 64
  6. #define MAX_FRAME_GLYPH 30 // max strokes per glyph
  7. #define SyvFromSYM(s) (((s) == SYM_UNKNOWN) ? SYV_NULL : SyvKanjiToSymbol(s))
  8. #define SymFromSYV(s) (((s) == SYV_NULL) ? SYM_UNKNOWN : (SYM)WSyvToKanji(s))
  9. #define IsDigitSYM(s) ((s) >= 0x824f && (s) <= 0x8258)
  10. #define IsUpperSYM(s) ((s) >= 0x8260 && (s) <= 0x8279)
  11. #define IsLowerSYM(s) ((s) >= 0x8281 && (s) <= 0x829a)
  12. #define IsAlphaSYM(s) (IsLowerSYM(s) || IsUpperSYM(s))
  13. #define IsPuncSYM(s) (FALSE) // TODO: fix this
  14. #define ToLowerSYM(s) (IsUpperSYM(s) ? (s) + 0x0021 : (s))
  15. #define ToUpperSYM(s) (IsLowerSYM(s) ? (s) - 0x0021 : (s))
  16. int PUBLIC StrlenSYM(LPSYM lpsym);
  17. int PUBLIC StrncmpSYM(LPSYM lpsym1, LPSYM lpsym2, int len);
  18. VOID PUBLIC StrrevSYM(LPSYM lpsym);
  19. VOID PUBLIC StrlwrSYM(LPSYM lpsym);
  20. #define SYM_NULL (SYM)0
  21. #define IsSpaceSYM(s) ((s) == SYM_SPACE || (s) == SYM_TAB || (s) == SYM_RETURN)
  22. #define INIT 1
  23. #define NOINIT 0
  24. #define INDEX_NULL -1
  25. #define SYM_UNKNOWN ((SYM)0xFFFE)
  26. #define ENGINE_ERROR -1
  27. #define AddCOST(a,b) ((a) + (b))
  28. #define IncCOST(a,b) ((a) += (b))
  29. #define DecCOST(a,b) ((a) -= (b))
  30. #define SubCOST(a,b) ((a) - (b))
  31. #define MultCOST(a,b) MultFIXED(a,b)
  32. #define MultAddCOST(c,a,b) ((c) += MultFIXED((a),(b)))
  33. #define NegCOST(a) (-(a))
  34. #define AbsCOST(a) ((a > 0.0) ? a : NegCOST(a))
  35. #define SquareCOST(a) SquareFIXED(a)
  36. // #define DivCOST(a,b) DivFIXED(a,b)
  37. typedef unsigned PWMODE;
  38. #define PW_PREVIOUS 0x0001
  39. #define PW_CURRENT 0x0002
  40. #define PW_END 0x0004
  41. typedef unsigned SMODE;
  42. #define SMODE_DICTIONARY 0x0001
  43. #define SMODE_RELAX_COERCION 0x0002
  44. #define SMODE_STRICT_COERCION 0x0004
  45. typedef struct tagRECSTATUS
  46. {
  47. int cframeHgm; // # of frames processed by HGM
  48. } RECSTATUS;
  49. #endif //__INCLUDE_PATH