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.

43 lines
1.3 KiB

  1. /****************************************************************************
  2. Lex.h : lexicon structure and declaration of lexicon management functions
  3. Copyright 2000 Microsoft Corp.
  4. History:
  5. 02-AUG-2000 bhshin remove unused dict for Hand Writing team
  6. 17-MAY-2000 bhshin remove unused dict for CICERO
  7. 02-FEB-2000 bhshin created
  8. ****************************************************************************/
  9. #ifndef _LEX_HEADER
  10. #define _LEX_HEADER
  11. // current lexicon version
  12. #define LEX_VERSION 0x0040
  13. // Lexicon Header Structure
  14. // ========================
  15. typedef struct {
  16. unsigned short nVersion;
  17. char szMagic[4];
  18. unsigned short nPadding;
  19. unsigned long rgnHanjaIdx; // offset to hanja index (needed for just K1 lex)
  20. unsigned long rgnReading; // offset to Hanja Reading
  21. unsigned long rgnMeanIdx; // offset to meaning index
  22. unsigned long rgnMeaning; // offset to meaning trie
  23. } LEXICON_HEADER;
  24. // MapFile structure
  25. // =================
  26. typedef struct {
  27. HANDLE hFile;
  28. HANDLE hFileMapping;
  29. void *pvData;
  30. } MAPFILE, *pMAPFILE;
  31. // Lexicon Open/Close functions
  32. // ============================
  33. BOOL OpenLexicon(LPCSTR lpcszLexPath, MAPFILE *pLexMap);
  34. void CloseLexicon(MAPFILE *pLexMap);
  35. #endif