Source code of Windows XP (NT5)
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.

57 lines
2.2 KiB

  1. /* *************************************************************************** */
  2. /* * Tree - based dictionary programs * */
  3. /* *************************************************************************** */
  4. #ifndef ELK_H_INCLUDED
  5. #define ELK_H_INCLUDED
  6. // --------------- Defines -----------------------------------------------------
  7. //#if VER_PALK_DICT
  8. // #define ELK_MAX_WORDLEN 40
  9. //#else
  10. #define ELK_MAX_WORDLEN 30
  11. //#endif
  12. #define ELK_MAX_ALTS 10
  13. #define ELK_NOERR 0
  14. #define ELK_ERR 1
  15. #define ELK_PREV_VER_ERR 2
  16. #define ELK_ATTR_FCAP 0x04
  17. #define ELK_ATTR_FREQM 0x03
  18. #define ELK_STND_TYPE 0 // Standard dictionary (not optimized)
  19. #define ELK_OPT1_TYPE 1 // Optimized level 1 dictionary
  20. #define ELK_OPT2_TYPE 2 // Optimized level 2 dictionary (Stat coding)
  21. // --------------- Types -------------------------------------------------------
  22. typedef struct {
  23. _INT nansw;
  24. _UCHAR weights[ELK_MAX_ALTS];
  25. _UCHAR list[ELK_MAX_ALTS][ELK_MAX_WORDLEN];
  26. } spc_answer_type, _PTR p_spc_answer_type;
  27. // --------------- Prototypes --------------------------------------------------
  28. _INT ElkGetNextSyms(p_VOID cur_fw, p_VOID fwb, p_VOID pd, _UCHAR source, p_VOID pUd, p_rc_type prc);
  29. _INT ElkCheckWord(p_UCHAR word, p_UCHAR status, p_UCHAR attr, p_VOID pd);
  30. _INT ElkAddWord(p_UCHAR word, _UCHAR attr, p_VOID _PTR pd);
  31. _INT ElkOptimizeDict(p_VOID _PTR pd);
  32. _INT ElkCreateDict(p_VOID _PTR pd);
  33. _INT ElkFreeDict(p_VOID _PTR pd);
  34. _INT ElkLoadDict(p_UCHAR name, p_VOID _PTR pd);
  35. _INT ElkSaveDict(p_UCHAR name, p_VOID pd);
  36. _INT ElkGetStat(_INT layer, p_INT stats, p_VOID pd);
  37. _INT ElkGetDictStatus(p_INT len, p_VOID pd);
  38. _INT ElkGetDictType(p_VOID pd);
  39. _INT ElkAttachCodeTable(_INT ctbl_size, p_UCHAR code_table, p_VOID _PTR pd);
  40. _INT SpellCheckWord(_UCHAR * word, p_spc_answer_type answ, p_VOID hdict, int flags);
  41. #endif // ELK_H_INCLUDED
  42. /* *************************************************************************** */
  43. /* * END OF ALL * */
  44. /* *************************************************************************** */