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.

59 lines
1.5 KiB

  1. /*
  2. * @doc
  3. *
  4. * @module _clasfyc.H -- character classification |
  5. *
  6. * Authors: <nl>
  7. * Jon Matousek
  8. *
  9. * Copyright (c) 1995-1998 Microsoft Corporation. All rights reserved.
  10. */
  11. #ifndef _CLASFYC_H
  12. #define _CLASFYC_H
  13. extern const INT g_cKinsokuCategories;
  14. void BatchClassify(const WCHAR *ch, INT cch, WORD *pcType3,
  15. INT *kinsokuClassifications, WORD *pwRes);
  16. BOOL CanBreak(INT class1, INT class2);
  17. WORD ClassifyChar(TCHAR ch);
  18. INT GetKinsokuClass(WCHAR ch);
  19. BOOL InitKinsokuClassify();
  20. BOOL IsSameClass(WORD currType1, WORD startType1,
  21. WORD currType3, WORD startType3);
  22. BOOL IsURLDelimiter(WCHAR ch);
  23. void UninitKinsokuClassify();
  24. #define MAX_CLASSIFY_CHARS (256L)
  25. #define brkclsQuote 0
  26. #define brkclsOpen 1
  27. #define brkclsClose 2
  28. #define brkclsGlueA 3
  29. #define brkclsExclaInterr 4
  30. #define brkclsSlash 6
  31. #define brkclsInseparable 7
  32. #define brkclsPrefix 8
  33. #define brkclsPostfix 9
  34. #define brkclsNoStartIdeo 10
  35. #define brkclsIdeographic 11
  36. #define brkclsNumeral 12
  37. #define brkclsSpaceN 14
  38. #define brkclsAlpha 15
  39. // Korean Unicode ranges
  40. #define IsKoreanJamo(ch) IN_RANGE(0x1100, ch, 0x11FF)
  41. #define IsKorean(ch) IN_RANGE(0xAC00, ch, 0xD7FF)
  42. // Thai Unicode range
  43. #define IsThai(ch) IN_RANGE(0x0E00, ch, 0x0E7F)
  44. // -FUTURE- This should be moved to richedit.h
  45. #define WBF_KOREAN 0x0080
  46. #define WBF_WORDBREAKAFTER 0x0400 // Break word after this character (for language such as Thai)
  47. #endif