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.

62 lines
1.5 KiB

  1. #if !defined(_LEXHEADER_H__INCLUDED_)
  2. #define _LEXHEADER_H__INCLUDED_
  3. #define DEFAULT_LEX_FILE_NAME "IMEKR.LEX" // if no reg found will use this name
  4. #define DICT_HEADER_SIZE 512
  5. #define COPYRIGHT_STR "(C) 1997 Hangul Engineering Team. Microsoft Corp. All rights reserved.\n"
  6. #define LEX_VERSION 0x1100
  7. #define LEX_COMPATIBLE_VERSION_LIMIT 0x2000
  8. #define LEX_FILE_NAME _T("IMEKR.LEX")
  9. #define TOTAL_NUMBER_OF_HANGUL_MAPPING (484 + 18) // K0+K1 + # of symbols(�� - ��)
  10. #define TOTAL_NUMBER_OF_HANJA 7744
  11. #define MAX_NUMBER_OF_HANJA_SAME_PRONUNC 103
  12. #define MAX_SENSE_LENGTH 50
  13. struct _DictHeader {
  14. char COPYRIGHT_HEADER[150];
  15. WORD Version;
  16. UINT NumOfHangulEntry;
  17. UINT MaxNumOfHanja;
  18. DWORD Headersize;
  19. DWORD iBufferStart; // seek point
  20. UINT uiNumofHanja;
  21. DWORD reserved[10];
  22. _DictHeader() {
  23. Version = 0;
  24. iBufferStart = Headersize= 0;
  25. ZeroMemory(reserved, sizeof(reserved));
  26. ZeroMemory(COPYRIGHT_HEADER, sizeof(COPYRIGHT_HEADER));
  27. lstrcpy(COPYRIGHT_HEADER, COPYRIGHT_STR);
  28. COPYRIGHT_HEADER[lstrlen(COPYRIGHT_HEADER)+1] = '\032';
  29. }
  30. };
  31. struct _LexIndex {
  32. WCHAR wcHangul;
  33. WORD wNumOfK0, wNumOfK1;
  34. UINT iOffset;
  35. _LexIndex() {
  36. wcHangul = 0;
  37. wNumOfK0 = wNumOfK1 = 0;
  38. iOffset = 0;
  39. }
  40. };
  41. struct HanjaToHangulIndex
  42. {
  43. WCHAR wchHanja;
  44. WCHAR wchHangul;
  45. UINT iOffset;
  46. HanjaToHangulIndex()
  47. {
  48. wchHanja = wchHangul = 0;
  49. iOffset = 0;
  50. }
  51. };
  52. #endif // !defined(_LEXHEADER_H__INCLUDED_)