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 DICT_HEADER_SIZE 512
  4. #define COPYRIGHT_STR "(C) 1997 Hangul Engineering Team. Microsoft Corp. All rights reserved.\n"
  5. #define LEX_VERSION 0x1100
  6. #define LEX_COMPATIBLE_VERSION_LIMIT 0x2000
  7. #define LEX_FILE_NAME TEXT("IMEKR.LEX")
  8. #define TOTAL_NUMBER_OF_HANGUL_MAPPING (484 + 18) // K0+K1 + # of symbols(�� - ��)
  9. #define TOTAL_NUMBER_OF_HANJA 7744
  10. #define MAX_NUMBER_OF_HANJA_SAME_PRONUNC 103
  11. #define MAX_SENSE_LENGTH 50
  12. struct _DictHeader {
  13. char COPYRIGHT_HEADER[150];
  14. WORD Version;
  15. UINT NumOfHangulEntry;
  16. UINT MaxNumOfHanja;
  17. DWORD Headersize;
  18. DWORD iBufferStart; // seek point of HnagulToHanja Index
  19. UINT uiNumofHanja;
  20. DWORD iHanjaToHangulIndex; // seek point of HanjaToHangul Index
  21. DWORD reserved[10];
  22. _DictHeader() {
  23. Version = 0;
  24. iBufferStart = Headersize= 0;
  25. memset(reserved, '\0', sizeof(reserved));
  26. memset(COPYRIGHT_HEADER, '\0', sizeof(COPYRIGHT_HEADER));
  27. strcpy(COPYRIGHT_HEADER, COPYRIGHT_STR);
  28. COPYRIGHT_HEADER[strlen(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_)