aspell.pp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. unit aspell;
  2. { * This file is header translation of The New Aspell
  3. * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
  4. * license version 2.0 or 2.1. You should have received a copy of the
  5. * LGPL license along with this library if you did not you can find it
  6. * at http://www.gnu.org/. * }
  7. { * Translation to pascal (c) 2008 by Aleš Katona. * }
  8. {$PACKRECORDS C}
  9. interface
  10. uses
  11. cTypes;
  12. {$IFDEF UNIX}
  13. const libaspell = 'aspell';
  14. {$ELSE}
  15. {$IFDEF WINDOWS}
  16. const libaspell = 'aspell-15.dll';
  17. {$ELSE}
  18. {$MESSAGE ERROR Target not supported'}
  19. {$ENDIF}
  20. {$ENDIF}
  21. {$i aspelltypes.inc}
  22. {************************* mutable container ************************* }
  23. function aspell_mutable_container_add(ths:PAspellMutableContainer; to_add:pchar):cint;cdecl;external libaspell name 'aspell_mutable_container_add';
  24. function aspell_mutable_container_remove(ths:PAspellMutableContainer; to_rem:pchar):cint;cdecl;external libaspell name 'aspell_mutable_container_remove';
  25. procedure aspell_mutable_container_clear(ths:PAspellMutableContainer);cdecl;external libaspell name 'aspell_mutable_container_clear';
  26. function aspell_mutable_container_to_mutable_container(ths:PAspellMutableContainer):PAspellMutableContainer; cdecl;external libaspell name 'aspell_mutable_container_to_mutable_container';
  27. {******************************* config ******************************* }
  28. function aspell_key_info_enumeration_at_end(ths:PAspellKeyInfoEnumeration):cint;cdecl;external libaspell name 'aspell_key_info_enumeration_at_end';
  29. function aspell_key_info_enumeration_next(ths:PAspellKeyInfoEnumeration):PAspellKeyInfo;cdecl;external libaspell name 'aspell_key_info_enumeration_next';
  30. procedure delete_aspell_key_info_enumeration(ths:PAspellKeyInfoEnumeration);cdecl;external libaspell name 'delete_aspell_key_info_enumeration';
  31. function aspell_key_info_enumeration_clone(ths:PAspellKeyInfoEnumeration):PAspellKeyInfoEnumeration; cdecl;external libaspell name 'aspell_key_info_enumeration_clone';
  32. procedure aspell_key_info_enumeration_assign(ths:PAspellKeyInfoEnumeration; other:PAspellKeyInfoEnumeration);cdecl;external libaspell name 'aspell_key_info_enumeration_assign';
  33. function new_aspell_config():PAspellConfig;cdecl;external libaspell name 'new_aspell_config';
  34. procedure delete_aspell_config(ths:PAspellConfig);cdecl;external libaspell name 'delete_aspell_config';
  35. function aspell_config_clone(ths:PAspellConfig):PAspellConfig;cdecl;external libaspell name 'aspell_config_clone';
  36. procedure aspell_config_assign(ths:PAspellConfig; other:PAspellConfig);cdecl;external libaspell name 'aspell_config_assign';
  37. function aspell_config_error_number(ths:PAspellConfig):cuint;cdecl;external libaspell name 'aspell_config_error_number';
  38. function aspell_config_error_message(ths:PAspellConfig):pchar;cdecl;external libaspell name 'aspell_config_error_message';
  39. function aspell_config_error(ths:PAspellConfig):PAspellError;cdecl;external libaspell name 'aspell_config_error';
  40. { Sets extra keys which this config class should
  41. * accept. begin and end are expected to point to
  42. * the beginning and ending of an array of Aspell
  43. * Key Info. }
  44. procedure aspell_config_set_extra(ths:PAspellConfig; b:PAspellKeyInfo; e:PAspellKeyInfo);cdecl;external libaspell name 'aspell_config_set_extra';
  45. { Returns the KeyInfo object for the
  46. * corresponding key or returns NULL and sets
  47. * error_num to PERROR_UNKNOWN_KEY if the key is
  48. * not valid. The pointer returned is valid for
  49. * the lifetime of the object. }
  50. function aspell_config_keyinfo(ths:PAspellConfig; key:pchar):PAspellKeyInfo;cdecl;external libaspell name 'aspell_config_keyinfo';
  51. { Returns a newly allocated enumeration of all
  52. * the possible objects this config class uses. }
  53. function aspell_config_possible_elements(ths:PAspellConfig; include_extra:cint):PAspellKeyInfoEnumeration;cdecl;external libaspell name 'aspell_config_possible_elements';
  54. { Returns the default value for given key which
  55. * may involve substituting variables, thus it is
  56. * not the same as keyinfo(key)->def returns NULL
  57. * and sets error_num to PERROR_UNKNOWN_KEY if
  58. * the key is not valid. Uses the temporary
  59. * string. }
  60. function aspell_config_get_default(ths:PAspellConfig; key:pchar):pchar;cdecl;external libaspell name 'aspell_config_get_default';
  61. { Returns a newly allocated enumeration of all
  62. * the key/value pairs. This DOES not include ones
  63. * which are set to their default values. }
  64. function aspell_config_elements(ths:PAspellConfig):PAspellStringPairEnumeration;cdecl;external libaspell name 'aspell_config_elements';
  65. { Inserts an item, if the item already exists it
  66. * will be replaced. Returns TRUE if it succeeded
  67. * or FALSE on error. If the key is not valid it
  68. * sets error_num to PERROR_UNKNOWN_KEY, if the
  69. * value is not valid it will set error_num to
  70. * PERROR_BAD_VALUE, if the value can not be
  71. * changed it sets error_num to
  72. * PERROR_CANT_CHANGE_VALUE, and if the value is
  73. * a list and you are trying to set its directory,
  74. * it sets error_num to PERROR_LIST_SET }
  75. function aspell_config_replace(ths:PAspellConfig; key:pchar; value:pchar):cint;cdecl;external libaspell name 'aspell_config_replace';
  76. { Remove a key and returns TRUE if it exists
  77. * otherwise return FALSE. This effectively sets
  78. * the key to its default value. Calling replace
  79. * with a value of "<default>" will also call
  80. * remove. If the key does not exist then it sets
  81. * error_num to 0 or PERROR_NOT, if the key is
  82. * not valid then it sets error_num to
  83. * PERROR_UNKNOWN_KEY, if the value can not be
  84. * changed then it sets error_num to
  85. * PERROR_CANT_CHANGE_VALUE }
  86. function aspell_config_remove(ths:PAspellConfig; key:pchar):cint;cdecl;external libaspell name 'aspell_config_remove';
  87. function aspell_config_have(ths:PAspellConfig; key:pchar):cint;cdecl;external libaspell name 'aspell_config_have';
  88. { Returns NULL on error. }
  89. function aspell_config_retrieve(ths:PAspellConfig; key:pchar):pchar;cdecl;external libaspell name 'aspell_config_retrieve';
  90. function aspell_config_retrieve_list(ths:PAspellConfig; key:pchar; lst:PAspellMutableContainer):cint;cdecl;external libaspell name 'aspell_config_retrieve_list';
  91. { In "ths" Aspell configuration, search for a
  92. * character string matching "key" string.
  93. * If "key" is found then return 1 else return 0.
  94. * If error encountered, then return -1. }
  95. function aspell_config_retrieve_bool(ths:PAspellConfig; key:pchar):cint;cdecl;external libaspell name 'aspell_config_retrieve_bool';
  96. { In "ths" Aspell configuration, search for an
  97. * integer value matching "key" string.
  98. * Return -1 on error. }
  99. function aspell_config_retrieve_int(ths:PAspellConfig; key:pchar):cint;cdecl;external libaspell name 'aspell_config_retrieve_int';
  100. {******************************* error ******************************* }
  101. function aspell_error_is_a(ths:PAspellError; e:PAspellErrorInfo):cint;cdecl;external libaspell name 'aspell_error_is_a';
  102. {*************************** can have error *************************** }
  103. function aspell_error_number(ths:PAspellCanHaveError):cuint;cdecl;external libaspell name 'aspell_error_number';
  104. function aspell_error_message(ths:PAspellCanHaveError):pchar;cdecl;external libaspell name 'aspell_error_message';
  105. function aspell_error(ths:PAspellCanHaveError):PAspellError;cdecl;external libaspell name 'aspell_error';
  106. procedure delete_aspell_can_have_error(ths:PAspellCanHaveError);cdecl;external libaspell name 'delete_aspell_can_have_error';
  107. {******************************* errors ******************************* }
  108. // ignored
  109. {****************************** speller ****************************** }
  110. function new_aspell_speller(config:PAspellConfig):PAspellCanHaveError;cdecl;external libaspell name 'new_aspell_speller';
  111. function to_aspell_speller(obj:PAspellCanHaveError):PAspellSpeller;cdecl;external libaspell name 'to_aspell_speller';
  112. procedure delete_aspell_speller(ths:PAspellSpeller);cdecl;external libaspell name 'delete_aspell_speller';
  113. function aspell_speller_error_number(ths:PAspellSpeller):cuint;cdecl;external libaspell name 'aspell_speller_error_number';
  114. function aspell_speller_error_message(ths:PAspellSpeller):pchar;cdecl;external libaspell name 'aspell_speller_error_message';
  115. function aspell_speller_error(ths:PAspellSpeller):PAspellError;cdecl;external libaspell name 'aspell_speller_error';
  116. function aspell_speller_config(ths:PAspellSpeller):PAspellConfig;cdecl;external libaspell name 'aspell_speller_config';
  117. { Returns 0 if it is not in the dictionary,
  118. * 1 if it is, or -1 on error. }
  119. function aspell_speller_check(ths:PAspellSpeller; word:pchar; word_size:cint):cint;cdecl;external libaspell name 'aspell_speller_check';
  120. { Add this word to your own personal word list. }
  121. function aspell_speller_add_to_personal(ths:PAspellSpeller; word:pchar; word_size:cint):cint;cdecl;external libaspell name 'aspell_speller_add_to_personal';
  122. { Add this word to the current spelling session. }
  123. function aspell_speller_add_to_session(ths:PAspellSpeller; word:pchar; word_size:cint):cint;cdecl;external libaspell name 'aspell_speller_add_to_session';
  124. { This is your own personal word list file plus
  125. * any extra words added during this session to
  126. * your own personal word list. }
  127. function aspell_speller_personal_word_list(ths:PAspellSpeller):PAspellWordList;cdecl;external libaspell name 'aspell_speller_personal_word_list';
  128. { This is a list of words added to this session
  129. * that are not in the main word list or in your
  130. * own personal list but are considered valid for
  131. * this spelling session. }
  132. function aspell_speller_session_word_list(ths:PAspellSpeller):PAspellWordList;cdecl;external libaspell name 'aspell_speller_session_word_list';
  133. { This is the main list of words used during this
  134. * spelling session. }
  135. function aspell_speller_main_word_list(ths:PAspellSpeller):PAspellWordList;cdecl;external libaspell name 'aspell_speller_main_word_list';
  136. function aspell_speller_save_all_word_lists(ths:PAspellSpeller):cint;cdecl;external libaspell name 'aspell_speller_save_all_word_lists';
  137. function aspell_speller_clear_session(ths:PAspellSpeller):cint;cdecl;external libaspell name 'aspell_speller_clear_session';
  138. { Return NULL on error.
  139. * The word list returned by suggest is only
  140. * valid until the next call to suggest. }
  141. function aspell_speller_suggest(ths:PAspellSpeller; word:pchar; word_size:cint):PAspellWordList;cdecl;external libaspell name 'aspell_speller_suggest';
  142. function aspell_speller_store_replacement(ths:PAspellSpeller; mis:pchar; mis_size:cint; cor:pchar; cor_size:cint):cint;cdecl;external libaspell name 'aspell_speller_store_replacement';
  143. {******************************* filter ******************************* }
  144. procedure delete_aspell_filter(ths:PAspellFilter);cdecl;external libaspell name 'delete_aspell_filter';
  145. function aspell_filter_error_number(ths:PAspellFilter):cuint;cdecl;external libaspell name 'aspell_filter_error_number';
  146. function aspell_filter_error_message(ths:PAspellFilter):pchar;cdecl;external libaspell name 'aspell_filter_error_message';
  147. function aspell_filter_error(ths:PAspellFilter):PAspellError;cdecl;external libaspell name 'aspell_filter_error';
  148. function to_aspell_filter(obj:PAspellCanHaveError):PAspellFilter;cdecl;external libaspell name 'to_aspell_filter';
  149. {************************** document checker ************************** }
  150. procedure delete_aspell_document_checker(ths:PAspellDocumentChecker);cdecl;external libaspell name 'delete_aspell_document_checker';
  151. function aspell_document_checker_error_number(ths:PAspellDocumentChecker):cuint;cdecl;external libaspell name 'aspell_document_checker_error_number';
  152. function aspell_document_checker_error_message(ths:PAspellDocumentChecker):pchar;cdecl;external libaspell name 'aspell_document_checker_error_message';
  153. function aspell_document_checker_error(ths:PAspellDocumentChecker):PAspellError;cdecl;external libaspell name 'aspell_document_checker_error';
  154. { Creates a new document checker.
  155. * The speller class is expected to last until
  156. * this class is destroyed.
  157. * If config is given it will be used to override
  158. * any relevent options set by this speller class.
  159. * The config class is not once this function is done.
  160. * If filter is given then it will take ownership of
  161. * the filter class and use it to do the filtering.
  162. * You are expected to free the checker when done. }
  163. function new_aspell_document_checker(speller: PAspellSpeller): PAspellCanHaveError;cdecl;external libaspell name 'new_aspell_document_checker';
  164. function to_aspell_document_checker(obj:PAspellCanHaveError):PAspellDocumentChecker;cdecl;external libaspell name 'to_aspell_document_checker';
  165. { Reset the internal state of the filter.
  166. * Should be called whenever a new document is
  167. * being filtered. }
  168. procedure aspell_document_checker_reset(ths:PAspellDocumentChecker);cdecl;external libaspell name 'aspell_document_checker_reset';
  169. { Process a string.
  170. * The string passed in should only be split on
  171. * white space characters. Furthermore, between
  172. * calls to reset, each string should be passed
  173. * in exactly once and in the order they appeared
  174. * in the document. Passing in strings out of
  175. * order, skipping strings or passing them in
  176. * more than once may lead to undefined results. }
  177. procedure aspell_document_checker_process(ths:PAspellDocumentChecker; str:pchar; size:cint);cdecl;external libaspell name 'aspell_document_checker_process';
  178. { Returns the next misspelled word in the
  179. * processed string. If there are no more
  180. * misspelled words, then token.word will be
  181. * NULL and token.size will be 0 }
  182. // internal hacky version to go around a bug regarding struct results/cdecl
  183. function aspell_document_checker_next_misspelling(ths:PAspellDocumentChecker):AspellToken;cdecl;external libaspell name 'aspell_document_checker_next_misspelling';
  184. { Returns the underlying filter class. }
  185. function aspell_document_checker_filter(ths:PAspellDocumentChecker):PAspellFilter;cdecl;external libaspell name 'aspell_document_checker_filter';
  186. {***************************** word list ***************************** }
  187. function aspell_word_list_empty(ths:PAspellWordList):cint;cdecl;external libaspell name 'aspell_word_list_empty';
  188. function aspell_word_list_size(ths:PAspellWordList):cuint;cdecl;external libaspell name 'aspell_word_list_size';
  189. function aspell_word_list_elements(ths:PAspellWordList):PAspellStringEnumeration;cdecl;external libaspell name 'aspell_word_list_elements';
  190. {************************* string enumeration ************************* }
  191. procedure delete_aspell_string_enumeration(ths:PAspellStringEnumeration);cdecl;external libaspell name 'delete_aspell_string_enumeration';
  192. function aspell_string_enumeration_clone(ths:PAspellStringEnumeration):PAspellStringEnumeration;cdecl;external libaspell name 'aspell_string_enumeration_clone';
  193. procedure aspell_string_enumeration_assign(ths:PAspellStringEnumeration; other:PAspellStringEnumeration);cdecl;external libaspell name 'aspell_string_enumeration_assign';
  194. function aspell_string_enumeration_at_end(ths:PAspellStringEnumeration):cint;cdecl;external libaspell name 'aspell_string_enumeration_at_end';
  195. function aspell_string_enumeration_next(ths:PAspellStringEnumeration):pchar;cdecl;external libaspell name 'aspell_string_enumeration_next';
  196. {******************************** info ******************************** }
  197. function get_aspell_module_info_list(config:PAspellConfig):PAspellModuleInfoList;cdecl;external libaspell name 'get_aspell_module_info_list';
  198. function aspell_module_info_list_empty(ths:PAspellModuleInfoList):cint;cdecl;external libaspell name 'aspell_module_info_list_empty';
  199. function aspell_module_info_list_size(ths:PAspellModuleInfoList):cuint;cdecl;external libaspell name 'aspell_module_info_list_size';
  200. function aspell_module_info_list_elements(ths:PAspellModuleInfoList):PAspellModuleInfoEnumeration;cdecl;external libaspell name 'aspell_module_info_list_elements';
  201. function get_aspell_dict_info_list(config:PAspellConfig):PAspellDictInfoList;cdecl;external libaspell name 'get_aspell_dict_info_list';
  202. function aspell_dict_info_list_empty(ths:PAspellDictInfoList):cint;cdecl;external libaspell name 'aspell_dict_info_list_empty';
  203. function aspell_dict_info_list_size(ths:PAspellDictInfoList):cuint;cdecl;external libaspell name 'aspell_dict_info_list_size';
  204. function aspell_dict_info_list_elements(ths:PAspellDictInfoList):PAspellDictInfoEnumeration;cdecl;external libaspell name 'aspell_dict_info_list_elements';
  205. function aspell_module_info_enumeration_at_end(ths:PAspellModuleInfoEnumeration):cint;cdecl;external libaspell name 'aspell_module_info_enumeration_at_end';
  206. function aspell_module_info_enumeration_next(ths:PAspellModuleInfoEnumeration):PAspellModuleInfo;cdecl;external libaspell name 'aspell_module_info_enumeration_next';
  207. procedure delete_aspell_module_info_enumeration(ths:PAspellModuleInfoEnumeration);cdecl;external libaspell name 'delete_aspell_module_info_enumeration';
  208. function aspell_module_info_enumeration_clone(ths:PAspellModuleInfoEnumeration):PAspellModuleInfoEnumeration;cdecl;external libaspell name 'aspell_module_info_enumeration_clone';
  209. procedure aspell_module_info_enumeration_assign(ths:PAspellModuleInfoEnumeration; other:PAspellModuleInfoEnumeration);cdecl;external libaspell name 'aspell_module_info_enumeration_assign';
  210. function aspell_dict_info_enumeration_at_end(ths:PAspellDictInfoEnumeration):cint;cdecl;external libaspell name 'aspell_dict_info_enumeration_at_end';
  211. function aspell_dict_info_enumeration_next(ths:PAspellDictInfoEnumeration):PAspellDictInfo;cdecl;external libaspell name 'aspell_dict_info_enumeration_next';
  212. procedure delete_aspell_dict_info_enumeration(ths:PAspellDictInfoEnumeration);cdecl;external libaspell name 'delete_aspell_dict_info_enumeration';
  213. function aspell_dict_info_enumeration_clone(ths:PAspellDictInfoEnumeration):PAspellDictInfoEnumeration;cdecl;external libaspell name 'aspell_dict_info_enumeration_clone';
  214. procedure aspell_dict_info_enumeration_assign(ths:PAspellDictInfoEnumeration; other:PAspellDictInfoEnumeration);cdecl;external libaspell name 'aspell_dict_info_enumeration_assign';
  215. {**************************** string list **************************** }
  216. function new_aspell_string_list():PAspellStringList;cdecl;external libaspell name 'new_aspell_string_list';
  217. function aspell_string_list_empty(ths:PAspellStringList):cint;cdecl;external libaspell name 'aspell_string_list_empty';
  218. function aspell_string_list_size(ths:PAspellStringList):cuint;cdecl;external libaspell name 'aspell_string_list_size';
  219. function aspell_string_list_elements(ths:PAspellStringList):PAspellStringEnumeration;cdecl;external libaspell name 'aspell_string_list_elements';
  220. function aspell_string_list_add(ths:PAspellStringList; to_add:pchar):cint;cdecl;external libaspell name 'aspell_string_list_add';
  221. function aspell_string_list_remove(ths:PAspellStringList; to_rem:pchar):cint;cdecl;external libaspell name 'aspell_string_list_remove';
  222. procedure aspell_string_list_clear(ths:PAspellStringList);cdecl;external libaspell name 'aspell_string_list_clear';
  223. function aspell_string_list_to_mutable_container(ths:PAspellStringList):PAspellMutableContainer;cdecl;external libaspell name 'aspell_string_list_to_mutable_container';
  224. procedure delete_aspell_string_list(ths:PAspellStringList);cdecl;external libaspell name 'delete_aspell_string_list';
  225. function aspell_string_list_clone(ths:PAspellStringList):PAspellStringList;cdecl;external libaspell name 'aspell_string_list_clone';
  226. procedure aspell_string_list_assign(ths:PAspellStringList; other:PAspellStringList);cdecl;external libaspell name 'aspell_string_list_assign';
  227. {***************************** string map ***************************** }
  228. function new_aspell_string_map():PAspellStringMap;cdecl;external libaspell name 'new_aspell_string_map';
  229. function aspell_string_map_add(ths:PAspellStringMap; to_add:pchar):cint;cdecl;external libaspell name 'aspell_string_map_add';
  230. function aspell_string_map_remove(ths:PAspellStringMap; to_rem:pchar):cint;cdecl;external libaspell name 'aspell_string_map_remove';
  231. procedure aspell_string_map_clear(ths:PAspellStringMap);cdecl;external libaspell name 'aspell_string_map_clear';
  232. function aspell_string_map_to_mutable_container(ths:PAspellStringMap):PAspellMutableContainer;cdecl;external libaspell name 'aspell_string_map_to_mutable_container';
  233. procedure delete_aspell_string_map(ths:PAspellStringMap);cdecl;external libaspell name 'delete_aspell_string_map';
  234. function aspell_string_map_clone(ths:PAspellStringMap):PAspellStringMap;cdecl;external libaspell name 'aspell_string_map_clone';
  235. procedure aspell_string_map_assign(ths:PAspellStringMap; other:PAspellStringMap);cdecl;external libaspell name 'aspell_string_map_assign';
  236. function aspell_string_map_empty(ths:PAspellStringMap):cint;cdecl;external libaspell name 'aspell_string_map_empty';
  237. function aspell_string_map_size(ths:PAspellStringMap):cuint;cdecl;external libaspell name 'aspell_string_map_size';
  238. function aspell_string_map_elements(ths:PAspellStringMap):PAspellStringPairEnumeration;cdecl;external libaspell name 'aspell_string_map_elements';
  239. { Insert a new element.
  240. * Will NOT overwrite an existing entry.
  241. * Returns FALSE if the element already exists. }
  242. function aspell_string_map_insert(ths:PAspellStringMap; key:pchar; value:pchar):cint;cdecl;external libaspell name 'aspell_string_map_insert';
  243. { Insert a new element.
  244. * Will overwrite an existing entry.
  245. * Always returns TRUE. }
  246. function aspell_string_map_replace(ths:PAspellStringMap; key:pchar; value:pchar):cint;cdecl;external libaspell name 'aspell_string_map_replace';
  247. { Looks up an element and returns the value.
  248. * Returns NULL if the element does not exist.
  249. * Returns an empty string if the element exists
  250. * but has a NULL value. }
  251. function aspell_string_map_lookup(ths:PAspellStringMap; key:pchar):pchar;cdecl;external libaspell name 'aspell_string_map_lookup';
  252. {********************** string pair enumeration ********************** }
  253. function aspell_string_pair_enumeration_at_end(ths:PAspellStringPairEnumeration):cint;cdecl;external libaspell name 'aspell_string_pair_enumeration_at_end';
  254. function aspell_string_pair_enumeration_next(ths:PAspellStringPairEnumeration):AspellStringPair;cdecl;external libaspell name 'aspell_string_pair_enumeration_next';
  255. procedure delete_aspell_string_pair_enumeration(ths:PAspellStringPairEnumeration);cdecl;external libaspell name 'delete_aspell_string_pair_enumeration';
  256. function aspell_string_pair_enumeration_clone(ths:PAspellStringPairEnumeration):PAspellStringPairEnumeration;cdecl;external libaspell name 'aspell_string_pair_enumeration_clone';
  257. procedure aspell_string_pair_enumeration_assign(ths:PAspellStringPairEnumeration; other:PAspellStringPairEnumeration);cdecl;external libaspell name 'aspell_string_pair_enumeration_assign';
  258. {******************************* cache ******************************* }
  259. { Reset the global cache(s) so that cache queries will
  260. * create a new object. If existing objects are still in
  261. * use they are not deleted. If which is NULL then all
  262. * caches will be reset. Current caches are "encode",
  263. * "decode", "dictionary", "language", and "keyboard". }
  264. function aspell_reset_cache(which:pchar):cint;cdecl;external libaspell name 'aspell_reset_cache';
  265. function aspell_init(const libn: ansistring): Boolean;
  266. function aspell_loaded: Boolean;
  267. implementation
  268. function aspell_init(const libn: ansistring): Boolean;
  269. begin
  270. aspell_init := True;
  271. end;
  272. function aspell_loaded: Boolean;
  273. begin
  274. aspell_loaded := True;
  275. end;
  276. end.