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.

63 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 TEXT("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 of HnagulToHanja Index
  20. UINT uiNumofHanja;
  21. DWORD iHanjaToHangulIndex; // seek point of HanjaToHangul Index
  22. DWORD reserved[10];
  23. _DictHeader() {
  24. Version = 0;
  25. iBufferStart = Headersize= 0;
  26. ZeroMemory(reserved, sizeof(reserved));
  27. ZeroMemory(COPYRIGHT_HEADER, sizeof(COPYRIGHT_HEADER));
  28. lstrcpy(COPYRIGHT_HEADER, COPYRIGHT_STR);
  29. COPYRIGHT_HEADER[lstrlen(COPYRIGHT_HEADER)+1] = '\032';
  30. }
  31. };
  32. struct _LexIndex {
  33. WCHAR wcHangul;
  34. WORD wNumOfK0, wNumOfK1;
  35. UINT iOffset;
  36. _LexIndex() {
  37. wcHangul = 0;
  38. wNumOfK0 = wNumOfK1 = 0;
  39. iOffset = 0;
  40. }
  41. };
  42. struct HanjaToHangulIndex
  43. {
  44. WCHAR wchHanja;
  45. WCHAR wchHangul;
  46. UINT iOffset;
  47. HanjaToHangulIndex()
  48. {
  49. wchHanja = wchHangul = 0;
  50. iOffset = 0;
  51. }
  52. };
  53. #endif // !defined(_LEXHEADER_H__INCLUDED_)