Advertisement
Guest User

Untitled

a guest
Jul 26th, 2010
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 110.62 KB | None | 0 0
  1. diff -Nru aspell-0.60.6.orig/cmake/modules/FindWcecompat.cmake aspell-0.60.6/cmake/modules/FindWcecompat.cmake
  2. --- aspell-0.60.6.orig/cmake/modules/FindWcecompat.cmake 1970-01-01 01:00:00.000000000 +0100
  3. +++ aspell-0.60.6/cmake/modules/FindWcecompat.cmake 2010-07-26 09:48:59.887765200 +0200
  4. @@ -0,0 +1,33 @@
  5. +# Try to find Wcecompat functionality
  6. +# Once done this will define
  7. +#
  8. +# WCECOMPAT_FOUND - system has Wcecompat
  9. +# WCECOMPAT_INCLUDE_DIR - Wcecompat include directory
  10. +# WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat
  11. +#
  12. +# Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com>
  13. +#
  14. +# Redistribution and use is allowed according to the terms of the BSD license.
  15. +
  16. +if(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
  17. + set(Wcecompat_FIND_QUIETLY TRUE)
  18. +endif(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
  19. +
  20. +find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat)
  21. +
  22. +set(WCECOMPAT_LIB_FOUND FALSE)
  23. +
  24. +if(WCECOMPAT_INCLUDE_DIR)
  25. + find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex )
  26. +
  27. + if(WCECOMPAT_LIBRARIES)
  28. + set(WCECOMPAT_LIB_FOUND TRUE)
  29. + endif(WCECOMPAT_LIBRARIES)
  30. +endif(WCECOMPAT_INCLUDE_DIR)
  31. +
  32. +# I have no idea what this is about, but it seems to be used quite often, so I add this here
  33. +set(WCECOMPAT_CONST const)
  34. +
  35. +include(FindPackageHandleStandardArgs)
  36. +find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND)
  37. +
  38. diff -Nru aspell-0.60.6.orig/CMakeLists.txt aspell-0.60.6/CMakeLists.txt
  39. --- aspell-0.60.6.orig/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
  40. +++ aspell-0.60.6/CMakeLists.txt 2010-07-26 09:48:59.903766100 +0200
  41. @@ -0,0 +1,168 @@
  42. +project(aspell)
  43. +
  44. +cmake_minimum_required(VERSION 2.6)
  45. +
  46. +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
  47. +
  48. +option(COMPILE_IN_FILTERS "include some filters into the library" ON)
  49. +
  50. +if(WIN32 OR WINCE)
  51. + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/win32)
  52. + if(MSVC)
  53. + add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996 -wd4351 -wd4800 -wd4521 -wd4522)
  54. + endif(MSVC)
  55. + add_definitions(-DENABLE_WIN32_RELOCATABLE)
  56. +endif(WIN32 OR WINCE)
  57. +
  58. +if(WINCE)
  59. + find_package(Wcecompat REQUIRED)
  60. + include_directories(${WCECOMPAT_INCLUDE_DIR})
  61. + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${WCECOMPAT_INCLUDE_DIR})
  62. + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${WCECOMPAT_LIBRARIES})
  63. +endif(WINCE)
  64. +
  65. +include_directories(
  66. + ${CMAKE_CURRENT_BINARY_DIR}
  67. + ${CMAKE_CURRENT_BINARY_DIR}/gen
  68. + ${CMAKE_CURRENT_SOURCE_DIR}/common
  69. + ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc
  70. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/speller/default
  71. +)
  72. +
  73. +set(static_optfiles
  74. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/url-filter.info
  75. +)
  76. +
  77. +if(COMPILE_IN_FILTERS)
  78. + set(static_optfiles
  79. + ${static_optfiles}
  80. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/email-filter.info
  81. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/tex-filter.info
  82. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/sgml-filter.info
  83. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/html-filter.info
  84. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/context-filter.info
  85. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/nroff-filter.info
  86. + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/texinfo-filter.info
  87. + )
  88. +endif(COMPILE_IN_FILTERS)
  89. +
  90. +
  91. +find_package(Perl REQUIRED)
  92. +
  93. +# $prefix, $data, $lib, $conf
  94. +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dirs.h
  95. + COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/gen/mk-dirs_h.pl ${CMAKE_INSTALL_PREFIX} lib lib share > ${CMAKE_CURRENT_BINARY_DIR}/dirs.h)
  96. +
  97. +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gen)
  98. +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gen/static_filters.src.cpp
  99. + COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/gen/mk-static-filter.pl ${static_optfiles}
  100. + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
  101. +
  102. +set(aspell_SRCS
  103. + common/cache.cpp
  104. + common/string.cpp
  105. + common/getdata.cpp
  106. + common/itemize.cpp
  107. + common/file_util.cpp
  108. + common/string_map.cpp
  109. + common/string_list.cpp
  110. + common/config.cpp
  111. + common/posib_err.cpp
  112. + common/errors.cpp
  113. + common/error.cpp
  114. + common/fstream.cpp
  115. + common/iostream.cpp
  116. + common/info.cpp
  117. + common/can_have_error.cpp
  118. + common/convert.cpp
  119. + common/tokenizer.cpp
  120. + common/speller.cpp
  121. + common/document_checker.cpp
  122. + common/filter.cpp
  123. + common/objstack.cpp
  124. + common/strtonum.cpp
  125. + common/gettext_init.cpp
  126. + common/file_data_util.cpp
  127. + modules/speller/default/readonly_ws.cpp
  128. + modules/speller/default/suggest.cpp
  129. + modules/speller/default/data.cpp
  130. + modules/speller/default/multi_ws.cpp
  131. + modules/speller/default/phonetic.cpp
  132. + modules/speller/default/writable.cpp
  133. + modules/speller/default/speller_impl.cpp
  134. + modules/speller/default/phonet.cpp
  135. + modules/speller/default/typo_editdist.cpp
  136. + modules/speller/default/editdist.cpp
  137. + modules/speller/default/primes.cpp
  138. + modules/speller/default/language.cpp
  139. + modules/speller/default/leditdist.cpp
  140. + modules/speller/default/affix.cpp
  141. + modules/tokenizer/basic.cpp
  142. + lib/filter-c.cpp
  143. + lib/word_list-c.cpp
  144. + lib/info-c.cpp
  145. + lib/mutable_container-c.cpp
  146. + lib/error-c.cpp
  147. + lib/document_checker-c.cpp
  148. + lib/string_map-c.cpp
  149. + lib/new_config.cpp
  150. + lib/config-c.cpp
  151. + lib/string_enumeration-c.cpp
  152. + lib/can_have_error-c.cpp
  153. + lib/dummy.cpp
  154. + lib/new_filter.cpp
  155. + lib/new_fmode.cpp
  156. + lib/string_list-c.cpp
  157. + lib/find_speller.cpp
  158. + lib/speller-c.cpp
  159. + lib/string_pair_enumeration-c.cpp
  160. + lib/new_checker.cpp
  161. + symbols.def
  162. +)
  163. +
  164. +if(COMPILE_IN_FILTERS)
  165. + set(aspell_SRCS
  166. + ${aspell_SRCS}
  167. + modules/filter/url.cpp
  168. + modules/filter/email.cpp
  169. + modules/filter/tex.cpp
  170. + modules/filter/sgml.cpp
  171. + modules/filter/context.cpp
  172. + modules/filter/nroff.cpp
  173. + modules/filter/texinfo.cpp
  174. + )
  175. +endif(COMPILE_IN_FILTERS)
  176. +
  177. +set_source_files_properties(common/config.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dirs.h)
  178. +set_source_files_properties(lib/new_filter.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gen/static_filters.src.cpp)
  179. +if(MSVC)
  180. + set(aspell_SRCS
  181. + win32/dirent.c
  182. + ${aspell_SRCS}
  183. + )
  184. +endif(MSVC)
  185. +
  186. +add_library(aspell SHARED ${aspell_SRCS})
  187. +set_target_properties(aspell PROPERTIES DEFINE_SYMBOL MAKE_ASPELL_LIB)
  188. +
  189. +if(WINCE)
  190. + target_link_libraries(aspell ${WCECOMPAT_LIBRARIES})
  191. +endif(WINCE)
  192. +
  193. +add_library(pspell SHARED lib/dummy.cpp)
  194. +target_link_libraries(pspell aspell)
  195. +
  196. +add_executable(aspell_bin prog/aspell.cpp prog/check_funs.cpp prog/checker_string.cpp)
  197. +target_link_libraries(aspell_bin aspell)
  198. +set_target_properties(aspell_bin PROPERTIES RUNTIME_OUTPUT_NAME aspell)
  199. +
  200. +add_executable(prezip-bin prog/prezip.c)
  201. +
  202. +add_executable(word-list-compress prog/compress.c)
  203. +
  204. +install(TARGETS aspell pspell aspell_bin prezip-bin word-list-compress RUNTIME DESTINATION bin
  205. + LIBRARY DESTINATION lib
  206. + ARCHIVE DESTINATION lib)
  207. +
  208. +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc/aspell.h DESTINATION include)
  209. +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc/aspell.h DESTINATION include/pspell)
  210. diff -Nru aspell-0.60.6.orig/common/aspell_export.h aspell-0.60.6/common/aspell_export.h
  211. --- aspell-0.60.6.orig/common/aspell_export.h 1970-01-01 01:00:00.000000000 +0100
  212. +++ aspell-0.60.6/common/aspell_export.h 2010-07-26 09:48:59.914766700 +0200
  213. @@ -0,0 +1,22 @@
  214. +// This file is added to The New Aspell
  215. +// Copyright (C) 2010 by Patrick Spendrin under the GNU LGPL license
  216. +// version 2.0 or 2.1. You should have received a copy of the LGPL
  217. +// license along with this library if you did not you can find
  218. +// it at http://www.gnu.org/.
  219. +
  220. +#ifndef ASPELL_EXPORT_HPP
  221. +# define ASPELL_EXPORT_HPP
  222. +
  223. +# ifndef ASPELL_EXPORT // check that it isn't defined (e.g. )
  224. +# if defined(_WIN32) || defined(_WIN64)
  225. +# pragma warning( disable: 4251 )
  226. +# ifdef MAKE_ASPELL_LIB
  227. +# define ASPELL_EXPORT __declspec(dllexport)
  228. +# else
  229. +# define ASPELL_EXPORT __declspec(dllimport)
  230. +# endif
  231. +# endif
  232. +# else
  233. +# define ASPELL_EXPORT
  234. +# endif
  235. +#endif // ASPELL_EXPORT_HPP
  236. \ No newline at end of file
  237. diff -Nru aspell-0.60.6.orig/common/cache-t.hpp aspell-0.60.6/common/cache-t.hpp
  238. --- aspell-0.60.6.orig/common/cache-t.hpp 2004-06-19 08:37:06.000000000 +0200
  239. +++ aspell-0.60.6/common/cache-t.hpp 2010-07-26 09:49:00.739811700 +0200
  240. @@ -8,7 +8,7 @@
  241.  
  242. namespace acommon {
  243.  
  244. -class GlobalCacheBase
  245. +class ASPELL_EXPORT GlobalCacheBase
  246. {
  247. public:
  248. mutable Mutex lock;
  249. diff -Nru aspell-0.60.6.orig/common/cache.hpp aspell-0.60.6/common/cache.hpp
  250. --- aspell-0.60.6.orig/common/cache.hpp 2004-06-19 08:37:06.000000000 +0200
  251. +++ aspell-0.60.6/common/cache.hpp 2010-07-26 09:52:38.106114300 +0200
  252. @@ -2,6 +2,7 @@
  253. #define ACOMMON_CACHE__HPP
  254.  
  255. #include "posib_err.hpp"
  256. +#include "aspell_export.h"
  257.  
  258. namespace acommon {
  259.  
  260. @@ -19,13 +20,13 @@
  261. const typename Data::CacheKey &);
  262.  
  263. class Cacheable;
  264. -void release_cache_data(GlobalCacheBase *, const Cacheable *);
  265. +void ASPELL_EXPORT release_cache_data(GlobalCacheBase *, const Cacheable *);
  266. static inline void release_cache_data(const GlobalCacheBase * c, const Cacheable * d)
  267. {
  268. release_cache_data(const_cast<GlobalCacheBase *>(c),d);
  269. }
  270.  
  271. -class Cacheable
  272. +class ASPELL_EXPORT Cacheable
  273. {
  274. public: // but don't use
  275. Cacheable * next;
  276. @@ -74,7 +75,7 @@
  277. return no_err;
  278. }
  279.  
  280. -bool reset_cache(const char * = 0);
  281. +bool ASPELL_EXPORT reset_cache(const char * = 0);
  282.  
  283. }
  284.  
  285. diff -Nru aspell-0.60.6.orig/common/can_have_error.hpp aspell-0.60.6/common/can_have_error.hpp
  286. --- aspell-0.60.6.orig/common/can_have_error.hpp 2002-08-26 23:42:05.000000000 +0200
  287. +++ aspell-0.60.6/common/can_have_error.hpp 2010-07-26 09:49:00.813815900 +0200
  288. @@ -7,6 +7,8 @@
  289. #ifndef ASPELL_CAN_HAVE_ERROR__HPP
  290. #define ASPELL_CAN_HAVE_ERROR__HPP
  291.  
  292. +#include "aspell_export.h"
  293. +
  294. #include "copy_ptr.hpp"
  295. #include "error.hpp"
  296.  
  297. @@ -14,7 +16,7 @@
  298.  
  299. struct Error;
  300.  
  301. -class CanHaveError {
  302. +class ASPELL_EXPORT CanHaveError {
  303. public:
  304. CanHaveError(Error * e = 0);
  305. CopyPtr<Error> err_;
  306. diff -Nru aspell-0.60.6.orig/common/config.hpp aspell-0.60.6/common/config.hpp
  307. --- aspell-0.60.6.orig/common/config.hpp 2004-11-18 03:01:53.000000000 +0100
  308. +++ aspell-0.60.6/common/config.hpp 2010-07-26 09:49:00.845817800 +0200
  309. @@ -79,7 +79,7 @@
  310. // -- setting a list item directly, ie with out a prefix, is the same as
  311. // setting it to a single value
  312.  
  313. - class Config : public CanHaveError {
  314. + class ASPELL_EXPORT Config : public CanHaveError {
  315. // copy and destructor provided
  316. friend class MDInfoListofLists;
  317.  
  318. @@ -230,8 +230,8 @@
  319. PosibErr<void> read_in_string(ParmStr str, const char * what = "");
  320. };
  321.  
  322. - Config * new_config();
  323. - Config * new_basic_config(); // config which doesn't require any
  324. + ASPELL_EXPORT Config * new_config();
  325. + ASPELL_EXPORT Config * new_basic_config(); // config which doesn't require any
  326. // external symbols
  327.  
  328. class NotifierEnumeration {
  329. @@ -271,8 +271,8 @@
  330. class AddableContainer;
  331. class StringList;
  332.  
  333. - void separate_list(ParmStr value, AddableContainer & out, bool do_unescape = true);
  334. - void combine_list(String & res, const StringList &);
  335. + ASPELL_EXPORT void separate_list(ParmStr value, AddableContainer & out, bool do_unescape = true);
  336. + ASPELL_EXPORT void combine_list(String & res, const StringList &);
  337.  
  338.  
  339. }
  340. diff -Nru aspell-0.60.6.orig/common/convert.cpp aspell-0.60.6/common/convert.cpp
  341. --- aspell-0.60.6.orig/common/convert.cpp 2007-12-03 07:55:45.000000000 +0100
  342. +++ aspell-0.60.6/common/convert.cpp 2010-07-26 09:49:00.870819200 +0200
  343. @@ -24,6 +24,10 @@
  344.  
  345. #include "gettext.h"
  346.  
  347. +#ifdef _MSC_VER
  348. +#define snprintf _snprintf
  349. +#endif
  350. +
  351. namespace acommon {
  352.  
  353. typedef unsigned char byte;
  354. diff -Nru aspell-0.60.6.orig/common/convert.hpp aspell-0.60.6/common/convert.hpp
  355. --- aspell-0.60.6.orig/common/convert.hpp 2004-11-01 21:22:03.000000000 +0100
  356. +++ aspell-0.60.6/common/convert.hpp 2010-07-26 09:49:00.889820300 +0200
  357. @@ -92,7 +92,7 @@
  358.  
  359. typedef FilterCharVector ConvertBuffer;
  360.  
  361. - class Convert {
  362. + class ASPELL_EXPORT Convert {
  363. private:
  364. CachePtr<Decode> decode_c;
  365. StackPtr<Decode> decode_s;
  366. @@ -195,16 +195,16 @@
  367.  
  368. };
  369.  
  370. - bool operator== (const Convert & rhs, const Convert & lhs);
  371. + bool ASPELL_EXPORT operator== (const Convert & rhs, const Convert & lhs);
  372.  
  373. - const char * fix_encoding_str(ParmStr enc, String & buf);
  374. + const ASPELL_EXPORT char * fix_encoding_str(ParmStr enc, String & buf);
  375.  
  376. // also returns true if the encoding is unknown
  377. - bool ascii_encoding(const Config & c, ParmStr enc0);
  378. + bool ASPELL_EXPORT ascii_encoding(const Config & c, ParmStr enc0);
  379.  
  380. enum Normalize {NormNone, NormFrom, NormTo};
  381.  
  382. - PosibErr<Convert *> internal_new_convert(const Config & c,
  383. + PosibErr<Convert *> ASPELL_EXPORT internal_new_convert(const Config & c,
  384. ParmString in, ParmString out,
  385. bool if_needed,
  386. Normalize n);
  387. @@ -223,7 +223,7 @@
  388. return internal_new_convert(c,in,out,true,n);
  389. }
  390.  
  391. - struct ConvObj {
  392. + struct ASPELL_EXPORT ConvObj {
  393. Convert * ptr;
  394. ConvObj(Convert * c = 0) : ptr(c) {}
  395. ~ConvObj() {delete ptr;}
  396. @@ -402,7 +402,7 @@
  397. }
  398. };
  399.  
  400. - struct MBLen
  401. + struct ASPELL_EXPORT MBLen
  402. {
  403. enum Encoding {Other, UTF8, UCS2, UCS4} encoding;
  404. MBLen() : encoding(Other) {}
  405. diff -Nru aspell-0.60.6.orig/common/document_checker.hpp aspell-0.60.6/common/document_checker.hpp
  406. --- aspell-0.60.6.orig/common/document_checker.hpp 2002-08-10 17:17:06.000000000 +0200
  407. +++ aspell-0.60.6/common/document_checker.hpp 2010-07-26 10:24:11.971091400 +0200
  408. @@ -13,12 +13,13 @@
  409. #include "can_have_error.hpp"
  410. #include "filter_char.hpp"
  411. #include "filter_char_vector.hpp"
  412. +#include "tokenizer.hpp"
  413.  
  414. namespace acommon {
  415.  
  416. class Config;
  417. class Speller;
  418. - class Tokenizer;
  419. +// class Tokenizer;
  420. class Convert;
  421.  
  422. struct Token {
  423. @@ -28,7 +29,7 @@
  424. };
  425.  
  426.  
  427. - class DocumentChecker : public CanHaveError {
  428. + class ASPELL_EXPORT DocumentChecker : public CanHaveError {
  429. public:
  430. // will take ownership of tokenizer and filter (even if there is an error)
  431. // config only used for this method.
  432. @@ -48,6 +49,9 @@
  433. private:
  434. CopyPtr<Filter> filter_;
  435. CopyPtr<Tokenizer> tokenizer_;
  436. +#if defined(_MSC_VER) && _MSC_VER < 1600
  437. + template class ASPELL_EXPORT CopyPtr<Tokenizer>;
  438. +#endif
  439. void (* status_fun_)(void *, Token, int);
  440. void * status_fun_data_;
  441. Speller * speller_;
  442. @@ -55,7 +59,7 @@
  443. FilterCharVector proc_str_;
  444. };
  445.  
  446. - PosibErr<DocumentChecker *> new_document_checker(Speller *);
  447. + ASPELL_EXPORT PosibErr<DocumentChecker *> new_document_checker(Speller *);
  448.  
  449. }
  450.  
  451. diff -Nru aspell-0.60.6.orig/common/error.hpp aspell-0.60.6/common/error.hpp
  452. --- aspell-0.60.6.orig/common/error.hpp 2004-02-21 22:19:36.000000000 +0100
  453. +++ aspell-0.60.6/common/error.hpp 2010-07-26 09:49:00.976825300 +0200
  454. @@ -7,11 +7,13 @@
  455. #ifndef ASPELL_ERROR__HPP
  456. #define ASPELL_ERROR__HPP
  457.  
  458. +#include "aspell_export.h"
  459. +
  460. namespace acommon {
  461.  
  462. struct ErrorInfo;
  463.  
  464. -struct Error {
  465. +struct ASPELL_EXPORT Error {
  466. const char * mesg; // expected to be allocated with malloc
  467. const ErrorInfo * err;
  468.  
  469. diff -Nru aspell-0.60.6.orig/common/errors.hpp aspell-0.60.6/common/errors.hpp
  470. --- aspell-0.60.6.orig/common/errors.hpp 2008-04-07 06:31:19.000000000 +0200
  471. +++ aspell-0.60.6/common/errors.hpp 2010-07-26 09:51:52.840552000 +0200
  472. @@ -1,3 +1,4 @@
  473. +#include "aspell_export.h"
  474. /* Automatically generated file. Do not edit directly. */
  475.  
  476. /* This file is part of The New Aspell
  477. @@ -14,91 +15,91 @@
  478.  
  479. struct ErrorInfo;
  480.  
  481. -extern "C" const ErrorInfo * const aerror_other;
  482. -extern "C" const ErrorInfo * const aerror_operation_not_supported;
  483. -extern "C" const ErrorInfo * const aerror_cant_copy;
  484. -extern "C" const ErrorInfo * const aerror_unimplemented_method;
  485. -extern "C" const ErrorInfo * const aerror_file;
  486. -extern "C" const ErrorInfo * const aerror_cant_open_file;
  487. -extern "C" const ErrorInfo * const aerror_cant_read_file;
  488. -extern "C" const ErrorInfo * const aerror_cant_write_file;
  489. -extern "C" const ErrorInfo * const aerror_invalid_name;
  490. -extern "C" const ErrorInfo * const aerror_bad_file_format;
  491. -extern "C" const ErrorInfo * const aerror_dir;
  492. -extern "C" const ErrorInfo * const aerror_cant_read_dir;
  493. -extern "C" const ErrorInfo * const aerror_config;
  494. -extern "C" const ErrorInfo * const aerror_unknown_key;
  495. -extern "C" const ErrorInfo * const aerror_cant_change_value;
  496. -extern "C" const ErrorInfo * const aerror_bad_key;
  497. -extern "C" const ErrorInfo * const aerror_bad_value;
  498. -extern "C" const ErrorInfo * const aerror_duplicate;
  499. -extern "C" const ErrorInfo * const aerror_key_not_string;
  500. -extern "C" const ErrorInfo * const aerror_key_not_int;
  501. -extern "C" const ErrorInfo * const aerror_key_not_bool;
  502. -extern "C" const ErrorInfo * const aerror_key_not_list;
  503. -extern "C" const ErrorInfo * const aerror_no_value_reset;
  504. -extern "C" const ErrorInfo * const aerror_no_value_enable;
  505. -extern "C" const ErrorInfo * const aerror_no_value_disable;
  506. -extern "C" const ErrorInfo * const aerror_no_value_clear;
  507. -extern "C" const ErrorInfo * const aerror_language_related;
  508. -extern "C" const ErrorInfo * const aerror_unknown_language;
  509. -extern "C" const ErrorInfo * const aerror_unknown_soundslike;
  510. -extern "C" const ErrorInfo * const aerror_language_not_supported;
  511. -extern "C" const ErrorInfo * const aerror_no_wordlist_for_lang;
  512. -extern "C" const ErrorInfo * const aerror_mismatched_language;
  513. -extern "C" const ErrorInfo * const aerror_affix;
  514. -extern "C" const ErrorInfo * const aerror_corrupt_affix;
  515. -extern "C" const ErrorInfo * const aerror_invalid_cond;
  516. -extern "C" const ErrorInfo * const aerror_invalid_cond_strip;
  517. -extern "C" const ErrorInfo * const aerror_incorrect_encoding;
  518. -extern "C" const ErrorInfo * const aerror_encoding;
  519. -extern "C" const ErrorInfo * const aerror_unknown_encoding;
  520. -extern "C" const ErrorInfo * const aerror_encoding_not_supported;
  521. -extern "C" const ErrorInfo * const aerror_conversion_not_supported;
  522. -extern "C" const ErrorInfo * const aerror_pipe;
  523. -extern "C" const ErrorInfo * const aerror_cant_create_pipe;
  524. -extern "C" const ErrorInfo * const aerror_process_died;
  525. -extern "C" const ErrorInfo * const aerror_bad_input;
  526. -extern "C" const ErrorInfo * const aerror_invalid_string;
  527. -extern "C" const ErrorInfo * const aerror_invalid_word;
  528. -extern "C" const ErrorInfo * const aerror_invalid_affix;
  529. -extern "C" const ErrorInfo * const aerror_inapplicable_affix;
  530. -extern "C" const ErrorInfo * const aerror_unknown_unichar;
  531. -extern "C" const ErrorInfo * const aerror_word_list_flags;
  532. -extern "C" const ErrorInfo * const aerror_invalid_flag;
  533. -extern "C" const ErrorInfo * const aerror_conflicting_flags;
  534. -extern "C" const ErrorInfo * const aerror_version_control;
  535. -extern "C" const ErrorInfo * const aerror_bad_version_string;
  536. -extern "C" const ErrorInfo * const aerror_filter;
  537. -extern "C" const ErrorInfo * const aerror_cant_dlopen_file;
  538. -extern "C" const ErrorInfo * const aerror_empty_filter;
  539. -extern "C" const ErrorInfo * const aerror_no_such_filter;
  540. -extern "C" const ErrorInfo * const aerror_confusing_version;
  541. -extern "C" const ErrorInfo * const aerror_bad_version;
  542. -extern "C" const ErrorInfo * const aerror_identical_option;
  543. -extern "C" const ErrorInfo * const aerror_options_only;
  544. -extern "C" const ErrorInfo * const aerror_invalid_option_modifier;
  545. -extern "C" const ErrorInfo * const aerror_cant_describe_filter;
  546. -extern "C" const ErrorInfo * const aerror_filter_mode_file;
  547. -extern "C" const ErrorInfo * const aerror_mode_option_name;
  548. -extern "C" const ErrorInfo * const aerror_no_filter_to_option;
  549. -extern "C" const ErrorInfo * const aerror_bad_mode_key;
  550. -extern "C" const ErrorInfo * const aerror_expect_mode_key;
  551. -extern "C" const ErrorInfo * const aerror_mode_version_requirement;
  552. -extern "C" const ErrorInfo * const aerror_confusing_mode_version;
  553. -extern "C" const ErrorInfo * const aerror_bad_mode_version;
  554. -extern "C" const ErrorInfo * const aerror_missing_magic_expression;
  555. -extern "C" const ErrorInfo * const aerror_empty_file_ext;
  556. -extern "C" const ErrorInfo * const aerror_filter_mode_expand;
  557. -extern "C" const ErrorInfo * const aerror_unknown_mode;
  558. -extern "C" const ErrorInfo * const aerror_mode_extend_expand;
  559. -extern "C" const ErrorInfo * const aerror_filter_mode_magic;
  560. -extern "C" const ErrorInfo * const aerror_file_magic_pos;
  561. -extern "C" const ErrorInfo * const aerror_file_magic_range;
  562. -extern "C" const ErrorInfo * const aerror_missing_magic;
  563. -extern "C" const ErrorInfo * const aerror_bad_magic;
  564. -extern "C" const ErrorInfo * const aerror_expression;
  565. -extern "C" const ErrorInfo * const aerror_invalid_expression;
  566. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_other;
  567. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_operation_not_supported;
  568. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_copy;
  569. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unimplemented_method;
  570. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file;
  571. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_open_file;
  572. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_read_file;
  573. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_write_file;
  574. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_name;
  575. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_file_format;
  576. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_dir;
  577. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_read_dir;
  578. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_config;
  579. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_key;
  580. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_change_value;
  581. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_key;
  582. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_value;
  583. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_duplicate;
  584. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_string;
  585. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_int;
  586. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_bool;
  587. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_list;
  588. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_reset;
  589. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_enable;
  590. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_disable;
  591. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_clear;
  592. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_language_related;
  593. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_language;
  594. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_soundslike;
  595. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_language_not_supported;
  596. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_wordlist_for_lang;
  597. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mismatched_language;
  598. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_affix;
  599. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_corrupt_affix;
  600. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_cond;
  601. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_cond_strip;
  602. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_incorrect_encoding;
  603. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_encoding;
  604. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_encoding;
  605. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_encoding_not_supported;
  606. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_conversion_not_supported;
  607. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_pipe;
  608. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_create_pipe;
  609. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_process_died;
  610. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_input;
  611. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_string;
  612. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_word;
  613. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_affix;
  614. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_inapplicable_affix;
  615. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_unichar;
  616. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_word_list_flags;
  617. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_flag;
  618. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_conflicting_flags;
  619. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_version_control;
  620. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_version_string;
  621. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter;
  622. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_dlopen_file;
  623. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_empty_filter;
  624. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_such_filter;
  625. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_confusing_version;
  626. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_version;
  627. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_identical_option;
  628. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_options_only;
  629. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_option_modifier;
  630. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_describe_filter;
  631. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_file;
  632. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_option_name;
  633. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_filter_to_option;
  634. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_mode_key;
  635. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_expect_mode_key;
  636. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_version_requirement;
  637. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_confusing_mode_version;
  638. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_mode_version;
  639. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_missing_magic_expression;
  640. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_empty_file_ext;
  641. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_expand;
  642. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_mode;
  643. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_extend_expand;
  644. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_magic;
  645. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file_magic_pos;
  646. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file_magic_range;
  647. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_missing_magic;
  648. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_magic;
  649. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_expression;
  650. +extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_expression;
  651.  
  652.  
  653. static const ErrorInfo * const other_error = aerror_other;
  654. diff -Nru aspell-0.60.6.orig/common/file_data_util.hpp aspell-0.60.6/common/file_data_util.hpp
  655. --- aspell-0.60.6.orig/common/file_data_util.hpp 2004-03-31 13:16:05.000000000 +0200
  656. +++ aspell-0.60.6/common/file_data_util.hpp 2010-07-26 09:49:01.103832500 +0200
  657. @@ -7,11 +7,11 @@
  658.  
  659. namespace acommon {
  660.  
  661. - void fill_data_dir(const Config *, String & dir1, String & dir2);
  662. - const String & find_file(String & path,
  663. + ASPELL_EXPORT void fill_data_dir(const Config *, String & dir1, String & dir2);
  664. + ASPELL_EXPORT const String & find_file(String & path,
  665. const String & dir1, const String & dir2,
  666. const String & name, const char * extension);
  667. - bool find_file(String & file,
  668. + ASPELL_EXPORT bool find_file(String & file,
  669. const String & dir1, const String & dir2,
  670. const String & name,
  671. ParmString preext, ParmString ext);
  672. diff -Nru aspell-0.60.6.orig/common/file_util.cpp aspell-0.60.6/common/file_util.cpp
  673. --- aspell-0.60.6.orig/common/file_util.cpp 2004-11-15 13:29:53.000000000 +0100
  674. +++ aspell-0.60.6/common/file_util.cpp 2010-07-26 09:49:01.137834500 +0200
  675. @@ -25,14 +25,12 @@
  676. #include <dirent.h>
  677.  
  678. #ifdef WIN32
  679. -
  680. # include <io.h>
  681. # define ACCESS _access
  682. +# define asc_isalpha isalpha
  683. # include <windows.h>
  684. # include <winbase.h>
  685. -
  686. #else
  687. -
  688. # include <unistd.h>
  689. # define ACCESS access
  690.  
  691. diff -Nru aspell-0.60.6.orig/common/file_util.hpp aspell-0.60.6/common/file_util.hpp
  692. --- aspell-0.60.6.orig/common/file_util.hpp 2004-06-17 14:41:33.000000000 +0200
  693. +++ aspell-0.60.6/common/file_util.hpp 2010-07-26 09:49:01.182837000 +0200
  694. @@ -18,32 +18,32 @@
  695. class Config;
  696. class StringList;
  697.  
  698. - bool need_dir(ParmString file);
  699. - String add_possible_dir(ParmString dir, ParmString file);
  700. - String figure_out_dir(ParmString dir, ParmString file);
  701. + ASPELL_EXPORT bool need_dir(ParmString file);
  702. + ASPELL_EXPORT String add_possible_dir(ParmString dir, ParmString file);
  703. + ASPELL_EXPORT String figure_out_dir(ParmString dir, ParmString file);
  704.  
  705. // FIXME: Possible remove
  706. //void open_file(FStream & in, const string & file,
  707. // ParmString mode = "r");
  708. - time_t get_modification_time(FStream & f);
  709. - PosibErr<void> open_file_readlock(FStream& in, ParmString file);
  710. - PosibErr<bool> open_file_writelock(FStream & in, ParmString file);
  711. + ASPELL_EXPORT time_t get_modification_time(FStream & f);
  712. + ASPELL_EXPORT PosibErr<void> open_file_readlock(FStream& in, ParmString file);
  713. + ASPELL_EXPORT PosibErr<bool> open_file_writelock(FStream & in, ParmString file);
  714. // returns true if the file already exists
  715. - void truncate_file(FStream & f, ParmString name);
  716. - bool remove_file(ParmString name);
  717. - bool file_exists(ParmString name);
  718. - bool rename_file(ParmString orig, ParmString new_name);
  719. + ASPELL_EXPORT void truncate_file(FStream & f, ParmString name);
  720. + ASPELL_EXPORT bool remove_file(ParmString name);
  721. + ASPELL_EXPORT bool file_exists(ParmString name);
  722. + ASPELL_EXPORT bool rename_file(ParmString orig, ParmString new_name);
  723. // will return NULL if path is NULL.
  724. - const char * get_file_name(const char * path);
  725. + ASPELL_EXPORT const char * get_file_name(const char * path);
  726.  
  727. // expands filename to the full path
  728. // returns the length of the directory part or 0 if nothing found
  729. - unsigned find_file(const Config *, const char * option, String & filename);
  730. - unsigned find_file(const StringList &, String & filename);
  731. + ASPELL_EXPORT unsigned find_file(const Config *, const char * option, String & filename);
  732. + ASPELL_EXPORT unsigned find_file(const StringList &, String & filename);
  733.  
  734. class StringEnumeration;
  735.  
  736. - class PathBrowser
  737. + class ASPELL_EXPORT PathBrowser
  738. {
  739. String suffix;
  740. String path;
  741. diff -Nru aspell-0.60.6.orig/common/filter.hpp aspell-0.60.6/common/filter.hpp
  742. --- aspell-0.60.6.orig/common/filter.hpp 2004-10-28 02:41:04.000000000 +0200
  743. +++ aspell-0.60.6/common/filter.hpp 2010-07-26 09:49:01.207838500 +0200
  744. @@ -14,6 +14,8 @@
  745. #include "vector.hpp"
  746. #include "string_pair_enumeration.hpp"
  747.  
  748. +#include "aspell_export.h"
  749. +
  750. #include <stdio.h>
  751.  
  752. namespace acommon {
  753. @@ -24,7 +26,7 @@
  754. class StringList;
  755. struct ConfigModule;
  756.  
  757. - class Filter : public CanHaveError {
  758. + class ASPELL_EXPORT Filter : public CanHaveError {
  759. public:
  760.  
  761. bool empty() const {return filters_.empty();}
  762. @@ -42,25 +44,25 @@
  763. Filters filters_;
  764. };
  765.  
  766. - PosibErr<void> set_mode_from_extension(Config * config,
  767. + PosibErr<void> ASPELL_EXPORT set_mode_from_extension(Config * config,
  768. ParmString filename,
  769. FILE * in = NULL);
  770.  
  771. - PosibErr<void> setup_filter(Filter &, Config *,
  772. + PosibErr<void> ASPELL_EXPORT setup_filter(Filter &, Config *,
  773. bool use_decoder,
  774. bool use_filter,
  775. bool use_encoder);
  776. - void activate_dynamic_filteroptions(Config *c);
  777. - void activate_filter_modes(Config * config);
  778. + void ASPELL_EXPORT activate_dynamic_filteroptions(Config *c);
  779. + void ASPELL_EXPORT activate_filter_modes(Config * config);
  780.  
  781. - void load_all_filters(Config * config);
  782. + void ASPELL_EXPORT load_all_filters(Config * config);
  783.  
  784. - PosibErr<bool> verify_version(const char * relOp,
  785. + PosibErr<bool> ASPELL_EXPORT verify_version(const char * relOp,
  786. const char * actual, const char * required);
  787. - PosibErr<void> check_version(const char * requirement);
  788. + PosibErr<void> ASPELL_EXPORT check_version(const char * requirement);
  789.  
  790. - PosibErr<StringPairEnumeration *> available_filters(Config *);
  791. - PosibErr<StringPairEnumeration *> available_filter_modes(Config *);
  792. + PosibErr<StringPairEnumeration *> ASPELL_EXPORT available_filters(Config *);
  793. + PosibErr<StringPairEnumeration *> ASPELL_EXPORT available_filter_modes(Config *);
  794.  
  795. };
  796.  
  797. diff -Nru aspell-0.60.6.orig/common/filter_char_vector.hpp aspell-0.60.6/common/filter_char_vector.hpp
  798. --- aspell-0.60.6.orig/common/filter_char_vector.hpp 2004-02-20 22:24:16.000000000 +0100
  799. +++ aspell-0.60.6/common/filter_char_vector.hpp 2010-07-26 09:49:01.225839500 +0200
  800. @@ -12,7 +12,7 @@
  801.  
  802. namespace acommon {
  803.  
  804. - class FilterCharVector : public Vector<FilterChar>
  805. + class ASPELL_EXPORT FilterCharVector : public Vector<FilterChar>
  806. {
  807. typedef Vector<FilterChar> Base;
  808. public:
  809. diff -Nru aspell-0.60.6.orig/common/fstream.hpp aspell-0.60.6/common/fstream.hpp
  810. --- aspell-0.60.6.orig/common/fstream.hpp 2004-06-17 14:41:35.000000000 +0200
  811. +++ aspell-0.60.6/common/fstream.hpp 2010-07-26 09:49:01.240840400 +0200
  812. @@ -20,7 +20,7 @@
  813. namespace acommon {
  814. class String;
  815.  
  816. - class FStream : public IStream, public OStream
  817. + class ASPELL_EXPORT FStream : public IStream, public OStream
  818. {
  819. private:
  820. FILE * file_;
  821. diff -Nru aspell-0.60.6.orig/common/getdata.hpp aspell-0.60.6/common/getdata.hpp
  822. --- aspell-0.60.6.orig/common/getdata.hpp 2004-06-17 14:41:35.000000000 +0200
  823. +++ aspell-0.60.6/common/getdata.hpp 2010-07-26 09:49:01.273842200 +0200
  824. @@ -26,9 +26,9 @@
  825. DataPair() : line_num(0) {}
  826. };
  827.  
  828. - bool getdata_pair(IStream & in, DataPair & d, String & buf);
  829. + ASPELL_EXPORT bool getdata_pair(IStream & in, DataPair & d, String & buf);
  830.  
  831. - char * unescape(char * dest, const char * src);
  832. + ASPELL_EXPORT char * unescape(char * dest, const char * src);
  833. static inline char * unescape(char * dest) {return unescape(dest, dest);}
  834. static inline void unescape(MutableString & d) {
  835. char * e = unescape(d.str, d.str);
  836. @@ -42,11 +42,11 @@
  837.  
  838. // if limit is not given than dest should have enough space for
  839. // twice the number of characters of src
  840. - bool escape(char * dest, const char * src,
  841. + ASPELL_EXPORT bool escape(char * dest, const char * src,
  842. size_t limit = INT_MAX, const char * others = 0);
  843.  
  844. - void to_lower(char *);
  845. - void to_lower(String &, const char *);
  846. + ASPELL_EXPORT void to_lower(char *);
  847. + ASPELL_EXPORT void to_lower(String &, const char *);
  848.  
  849. // extract the first whitespace delimited word from d.value and put
  850. // it in d.key. d.value is expected not to have any leading
  851. @@ -54,15 +54,15 @@
  852. // null terminated. d.value is modified to point to any additional
  853. // data after key with any leading white space removed. Returns
  854. // false when there are no more words to extract
  855. - bool split(DataPair & d);
  856. + ASPELL_EXPORT bool split(DataPair & d);
  857.  
  858. // preps a string for split
  859. - void init(ParmString str, DataPair & d, String & buf);
  860. + ASPELL_EXPORT void init(ParmString str, DataPair & d, String & buf);
  861.  
  862. - bool getline(IStream & in, DataPair & d, String & buf);
  863. + ASPELL_EXPORT bool getline(IStream & in, DataPair & d, String & buf);
  864.  
  865. - char * get_nb_line(IStream & in, String & buf);
  866. - void remove_comments(String & buf);
  867. + ASPELL_EXPORT char * get_nb_line(IStream & in, String & buf);
  868. + ASPELL_EXPORT void remove_comments(String & buf);
  869.  
  870. }
  871. #endif
  872. diff -Nru aspell-0.60.6.orig/common/gettext.h aspell-0.60.6/common/gettext.h
  873. --- aspell-0.60.6.orig/common/gettext.h 2004-11-21 03:52:22.000000000 +0100
  874. +++ aspell-0.60.6/common/gettext.h 2010-07-26 09:51:52.888554800 +0200
  875. @@ -1,3 +1,4 @@
  876. +#include "aspell_export.h"
  877. /* Convenience header for conditional use of GNU <libintl.h>.
  878. Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
  879.  
  880. @@ -92,7 +93,7 @@
  881. return str[0] == '\0' ? str : _(str);
  882. }
  883.  
  884. -extern "C" void aspell_gettext_init();
  885. +extern "C" ASPELL_EXPORT void aspell_gettext_init();
  886.  
  887. /* NOTE: DO NOT USE "gettext", ALWAYS USE "_" BECAUSE WHEN ASPELL IS USED
  888. AS A LIBRARY THE DOMAIN IS NOT GUARANTEED TO BE ASPELL */
  889. diff -Nru aspell-0.60.6.orig/common/indiv_filter.hpp aspell-0.60.6/common/indiv_filter.hpp
  890. --- aspell-0.60.6.orig/common/indiv_filter.hpp 2004-06-27 06:54:00.000000000 +0200
  891. +++ aspell-0.60.6/common/indiv_filter.hpp 2010-07-26 09:49:01.292843300 +0200
  892. @@ -17,7 +17,7 @@
  893.  
  894. class Config;
  895.  
  896. - class FilterHandle {
  897. + class ASPELL_EXPORT FilterHandle {
  898. public:
  899. FilterHandle() : handle(0) {}
  900. ~FilterHandle();
  901. @@ -42,7 +42,7 @@
  902. void * handle;
  903. };
  904.  
  905. - class IndividualFilter {
  906. + class ASPELL_EXPORT IndividualFilter {
  907. public:
  908.  
  909. // sets up the filter
  910. diff -Nru aspell-0.60.6.orig/common/info.hpp aspell-0.60.6/common/info.hpp
  911. --- aspell-0.60.6.orig/common/info.hpp 2004-05-30 12:49:17.000000000 +0200
  912. +++ aspell-0.60.6/common/info.hpp 2010-07-26 09:49:01.341846100 +0200
  913. @@ -34,7 +34,7 @@
  914. StringList * dict_dirs;
  915. };
  916.  
  917. - PosibErr<void> get_dict_file_name(const DictInfo *,
  918. + ASPELL_EXPORT PosibErr<void> get_dict_file_name(const DictInfo *,
  919. String & main_wl, String & flags);
  920.  
  921. struct DictInfo {
  922. @@ -50,7 +50,7 @@
  923.  
  924. struct ModuleInfoNode;
  925.  
  926. - class ModuleInfoList {
  927. + class ASPELL_EXPORT ModuleInfoList {
  928. public:
  929. ModuleInfoList() : size_(0), head_(0) {}
  930. void clear();
  931. @@ -70,11 +70,11 @@
  932. ModuleInfoNode * head_;
  933. };
  934.  
  935. - const ModuleInfoList * get_module_info_list(Config *);
  936. + ASPELL_EXPORT const ModuleInfoList * get_module_info_list(Config *);
  937.  
  938. struct DictInfoNode;
  939.  
  940. - class DictInfoList {
  941. + class ASPELL_EXPORT DictInfoList {
  942. public:
  943. DictInfoList() : size_(0), head_(0) {}
  944. void clear();
  945. @@ -93,11 +93,11 @@
  946. DictInfoNode * head_;
  947. };
  948.  
  949. - const DictInfoList * get_dict_info_list(Config *);
  950. + ASPELL_EXPORT const DictInfoList * get_dict_info_list(Config *);
  951.  
  952. - const StringMap * get_dict_aliases(Config *);
  953. + ASPELL_EXPORT const StringMap * get_dict_aliases(Config *);
  954.  
  955. - class ModuleInfoEnumeration {
  956. + class ASPELL_EXPORT ModuleInfoEnumeration {
  957. public:
  958. typedef const ModuleInfo * Value;
  959.  
  960. @@ -119,7 +119,7 @@
  961.  
  962. struct DictInfoNode;
  963.  
  964. - class DictInfoEnumeration {
  965. + class ASPELL_EXPORT DictInfoEnumeration {
  966. public:
  967. const DictInfoNode * node_;
  968. DictInfoEnumeration(const DictInfoNode * n) : node_(n) {}
  969. diff -Nru aspell-0.60.6.orig/common/iostream.hpp aspell-0.60.6/common/iostream.hpp
  970. --- aspell-0.60.6.orig/common/iostream.hpp 2004-09-25 14:47:47.000000000 +0200
  971. +++ aspell-0.60.6/common/iostream.hpp 2010-07-26 09:49:01.362847300 +0200
  972. @@ -9,6 +9,8 @@
  973.  
  974. #include "fstream.hpp"
  975.  
  976. +#include "aspell_export.h"
  977. +
  978. namespace acommon {
  979.  
  980. // These streams for the time being will be based on stdin, stdout,
  981. @@ -16,9 +18,9 @@
  982. // functions. It is also safe to assume that modifications to the
  983. // state of the standard streams will effect these.
  984.  
  985. - extern FStream CIN;
  986. - extern FStream COUT;
  987. - extern FStream CERR;
  988. + extern ASPELL_EXPORT FStream CIN;
  989. + extern ASPELL_EXPORT FStream COUT;
  990. + extern ASPELL_EXPORT FStream CERR;
  991. }
  992.  
  993. #endif
  994. diff -Nru aspell-0.60.6.orig/common/istream.hpp aspell-0.60.6/common/istream.hpp
  995. --- aspell-0.60.6.orig/common/istream.hpp 2004-02-21 21:43:31.000000000 +0100
  996. +++ aspell-0.60.6/common/istream.hpp 2010-07-26 09:49:01.376848100 +0200
  997. @@ -11,7 +11,7 @@
  998.  
  999. class String;
  1000.  
  1001. - class IStream {
  1002. + class ASPELL_EXPORT IStream {
  1003. private:
  1004. char delem;
  1005. public:
  1006. diff -Nru aspell-0.60.6.orig/common/itemize.hpp aspell-0.60.6/common/itemize.hpp
  1007. --- aspell-0.60.6.orig/common/itemize.hpp 2002-07-22 09:07:24.000000000 +0200
  1008. +++ aspell-0.60.6/common/itemize.hpp 2010-07-26 09:49:01.391849000 +0200
  1009. @@ -7,13 +7,15 @@
  1010. #ifndef ITEMIZE__HPP
  1011. #define ITEMIZE__HPP
  1012.  
  1013. +#include "aspell_export.h"
  1014. +
  1015. #include "parm_string.hpp"
  1016. #include "posib_err.hpp"
  1017.  
  1018. namespace acommon {
  1019.  
  1020. class MutableContainer;
  1021. - PosibErr<void> itemize(ParmString, MutableContainer &);
  1022. + ASPELL_EXPORT PosibErr<void> itemize(ParmString, MutableContainer &);
  1023.  
  1024. }
  1025.  
  1026. diff -Nru aspell-0.60.6.orig/common/lock.hpp aspell-0.60.6/common/lock.hpp
  1027. --- aspell-0.60.6.orig/common/lock.hpp 2004-09-23 15:25:24.000000000 +0200
  1028. +++ aspell-0.60.6/common/lock.hpp 2010-07-26 09:49:01.410850100 +0200
  1029. @@ -15,6 +15,8 @@
  1030. #ifndef DISTRIBNET_LOCK__HPP
  1031. #define DISTRIBNET_LOCK__HPP
  1032.  
  1033. +#include "aspell_export.h"
  1034. +
  1035. #include "settings.h"
  1036.  
  1037. #ifdef USE_POSIX_MUTEX
  1038. @@ -26,7 +28,7 @@
  1039. #define LOCK(l) const Lock the_lock(l);
  1040.  
  1041. #ifdef USE_POSIX_MUTEX
  1042. - class Mutex {
  1043. + class ASPELL_EXPORT Mutex {
  1044. pthread_mutex_t l_;
  1045. private:
  1046. Mutex(const Mutex &);
  1047. @@ -38,7 +40,7 @@
  1048. void unlock() {pthread_mutex_unlock(&l_);}
  1049. };
  1050. #else
  1051. - class Mutex {
  1052. + class ASPELL_EXPORT Mutex {
  1053. private:
  1054. Mutex(const Mutex &);
  1055. void operator=(const Mutex &);
  1056. @@ -50,7 +52,7 @@
  1057. };
  1058. #endif
  1059.  
  1060. - class Lock {
  1061. + class ASPELL_EXPORT Lock {
  1062. private:
  1063. Lock(const Lock &);
  1064. void operator= (const Lock &);
  1065. diff -Nru aspell-0.60.6.orig/common/mutable_container.hpp aspell-0.60.6/common/mutable_container.hpp
  1066. --- aspell-0.60.6.orig/common/mutable_container.hpp 2004-06-17 14:41:47.000000000 +0200
  1067. +++ aspell-0.60.6/common/mutable_container.hpp 2010-07-26 09:49:01.425850900 +0200
  1068. @@ -7,18 +7,20 @@
  1069. #ifndef ASPELL_MUTABLE_CONTAINER__HPP
  1070. #define ASPELL_MUTABLE_CONTAINER__HPP
  1071.  
  1072. +#include "aspell_export.h"
  1073. +
  1074. #include "parm_string.hpp"
  1075.  
  1076. namespace acommon {
  1077.  
  1078. -class AddableContainer {
  1079. +class ASPELL_EXPORT AddableContainer {
  1080. public:
  1081. virtual PosibErr<bool> add(ParmStr to_add) = 0;
  1082. virtual ~AddableContainer() {}
  1083. };
  1084.  
  1085.  
  1086. -class MutableContainer : public AddableContainer {
  1087. +class ASPELL_EXPORT MutableContainer : public AddableContainer {
  1088. public:
  1089. virtual PosibErr<bool> remove(ParmStr to_rem) = 0;
  1090. virtual PosibErr<void> clear() = 0;
  1091. diff -Nru aspell-0.60.6.orig/common/objstack.cpp aspell-0.60.6/common/objstack.cpp
  1092. --- aspell-0.60.6.orig/common/objstack.cpp 2006-11-24 04:46:09.000000000 +0100
  1093. +++ aspell-0.60.6/common/objstack.cpp 2010-07-26 09:49:01.441851900 +0200
  1094. @@ -1,5 +1,6 @@
  1095.  
  1096. #include "objstack.hpp"
  1097. +#include <iostream>
  1098.  
  1099. namespace acommon {
  1100.  
  1101. diff -Nru aspell-0.60.6.orig/common/objstack.hpp aspell-0.60.6/common/objstack.hpp
  1102. --- aspell-0.60.6.orig/common/objstack.hpp 2006-11-24 04:37:39.000000000 +0100
  1103. +++ aspell-0.60.6/common/objstack.hpp 2010-07-26 09:49:01.462853100 +0200
  1104. @@ -2,13 +2,15 @@
  1105. #ifndef ACOMMON_OBJSTACK__HPP
  1106. #define ACOMMON_OBJSTACK__HPP
  1107.  
  1108. +#include "aspell_export.h"
  1109. +
  1110. #include "parm_string.hpp"
  1111. #include <stdlib.h>
  1112. #include <assert.h>
  1113.  
  1114. namespace acommon {
  1115.  
  1116. -class ObjStack
  1117. +class ASPELL_EXPORT ObjStack
  1118. {
  1119. typedef unsigned char byte;
  1120. struct Node
  1121. diff -Nru aspell-0.60.6.orig/common/ostream.hpp aspell-0.60.6/common/ostream.hpp
  1122. --- aspell-0.60.6.orig/common/ostream.hpp 2004-07-24 14:03:58.000000000 +0200
  1123. +++ aspell-0.60.6/common/ostream.hpp 2010-07-26 09:49:01.483854300 +0200
  1124. @@ -9,6 +9,8 @@
  1125.  
  1126. #include <stdarg.h>
  1127.  
  1128. +#include "aspell_export.h"
  1129. +
  1130. #include "parm_string.hpp"
  1131.  
  1132. namespace acommon {
  1133. @@ -17,7 +19,7 @@
  1134. // Than avoid code bloat by using it in many places instead of
  1135. // out << "Bla " << something << " djdkdk " << something else << "\n"
  1136.  
  1137. - class OStream {
  1138. + class ASPELL_EXPORT OStream {
  1139. public:
  1140. virtual void write (char c) = 0;
  1141. virtual void write (ParmStr) = 0;
  1142. diff -Nru aspell-0.60.6.orig/common/parm_string.hpp aspell-0.60.6/common/parm_string.hpp
  1143. --- aspell-0.60.6.orig/common/parm_string.hpp 2005-02-20 22:47:07.000000000 +0100
  1144. +++ aspell-0.60.6/common/parm_string.hpp 2010-07-26 09:49:01.506855600 +0200
  1145. @@ -10,6 +10,8 @@
  1146. #include <string.h>
  1147. #include <limits.h>
  1148.  
  1149. +#include "aspell_export.h"
  1150. +
  1151. //
  1152. // ParmString is a special string class that is designed to be used as
  1153. // a parameter for a function that is expecting a string It will allow
  1154. @@ -40,7 +42,7 @@
  1155.  
  1156. class String;
  1157.  
  1158. - class ParmString {
  1159. + class ASPELL_EXPORT ParmString {
  1160. public:
  1161. ParmString() : str_(0) {}
  1162. ParmString(const char * str, unsigned int sz = UINT_MAX)
  1163. diff -Nru aspell-0.60.6.orig/common/posib_err.cpp aspell-0.60.6/common/posib_err.cpp
  1164. --- aspell-0.60.6.orig/common/posib_err.cpp 2004-11-21 03:52:22.000000000 +0100
  1165. +++ aspell-0.60.6/common/posib_err.cpp 2010-07-26 09:49:01.522856500 +0200
  1166. @@ -14,6 +14,9 @@
  1167.  
  1168. #include "gettext.h"
  1169.  
  1170. +#ifdef _MSC_VER
  1171. +#define snprintf _snprintf
  1172. +#endif
  1173.  
  1174. namespace acommon {
  1175.  
  1176. diff -Nru aspell-0.60.6.orig/common/posib_err.hpp aspell-0.60.6/common/posib_err.hpp
  1177. --- aspell-0.60.6.orig/common/posib_err.hpp 2004-12-17 09:23:33.000000000 +0100
  1178. +++ aspell-0.60.6/common/posib_err.hpp 2010-07-26 09:49:01.675863000 +0200
  1179. @@ -7,6 +7,8 @@
  1180. #ifndef PCOMMON_POSIB_ERR__HPP
  1181. #define PCOMMON_POSIB_ERR__HPP
  1182.  
  1183. +#include "aspell_export.h"
  1184. +
  1185. #include "string.hpp"
  1186. #include "error.hpp"
  1187.  
  1188. @@ -32,7 +34,7 @@
  1189.  
  1190. template <typename Ret> class PosibErr;
  1191.  
  1192. - class PosibErrBase {
  1193. + class ASPELL_EXPORT PosibErrBase {
  1194. private:
  1195. struct ErrPtr {
  1196. const Error * err;
  1197. diff -Nru aspell-0.60.6.orig/common/speller.hpp aspell-0.60.6/common/speller.hpp
  1198. --- aspell-0.60.6.orig/common/speller.hpp 2007-10-13 10:20:16.000000000 +0200
  1199. +++ aspell-0.60.6/common/speller.hpp 2010-07-26 09:49:01.690863900 +0200
  1200. @@ -15,6 +15,8 @@
  1201. #ifndef ASPELL_SPELLER__HPP
  1202. #define ASPELL_SPELLER__HPP
  1203.  
  1204. +#include "aspell_export.h"
  1205. +
  1206. #include "can_have_error.hpp"
  1207. #include "copy_ptr.hpp"
  1208. #include "clone_ptr.hpp"
  1209. @@ -49,7 +51,7 @@
  1210. short compound;
  1211. };
  1212.  
  1213. - class Speller : public CanHaveError
  1214. + class ASPELL_EXPORT Speller : public CanHaveError
  1215. {
  1216. private:
  1217. SpellerLtHandle lt_handle_;
  1218. @@ -121,10 +123,10 @@
  1219.  
  1220. // This function is current a hack to reload the filters in the
  1221. // speller class. I hope to eventually find a better way.
  1222. - PosibErr<void> reload_filters(Speller * m);
  1223. + ASPELL_EXPORT PosibErr<void> reload_filters(Speller * m);
  1224.  
  1225.  
  1226. - PosibErr<Speller *> new_speller(Config * c);
  1227. + ASPELL_EXPORT PosibErr<Speller *> new_speller(Config * c);
  1228.  
  1229. }
  1230.  
  1231. diff -Nru aspell-0.60.6.orig/common/string.hpp aspell-0.60.6/common/string.hpp
  1232. --- aspell-0.60.6.orig/common/string.hpp 2007-12-03 03:08:11.000000000 +0100
  1233. +++ aspell-0.60.6/common/string.hpp 2010-07-26 09:49:01.706864800 +0200
  1234. @@ -12,6 +12,8 @@
  1235.  
  1236. #include <algorithm>
  1237.  
  1238. +#include "aspell_export.h"
  1239. +
  1240. #include "hash_fun.hpp"
  1241. #include "parm_string.hpp"
  1242. #include "mutable_string.hpp"
  1243. @@ -35,7 +37,7 @@
  1244.  
  1245. template <typename Ret> class PosibErr;
  1246.  
  1247. - class String : public OStream
  1248. + class ASPELL_EXPORT String : public OStream
  1249. {
  1250. public:
  1251. typedef const char * const_iterator;
  1252. diff -Nru aspell-0.60.6.orig/common/string_enumeration.hpp aspell-0.60.6/common/string_enumeration.hpp
  1253. --- aspell-0.60.6.orig/common/string_enumeration.hpp 2004-02-02 03:48:50.000000000 +0100
  1254. +++ aspell-0.60.6/common/string_enumeration.hpp 2010-07-26 09:49:01.723865800 +0200
  1255. @@ -7,6 +7,8 @@
  1256. #ifndef ASPELL_STRING_ENUMERATION__HPP
  1257. #define ASPELL_STRING_ENUMERATION__HPP
  1258.  
  1259. +#include "aspell_export.h"
  1260. +
  1261. #include "parm_string.hpp"
  1262. #include "type_id.hpp"
  1263. #include "char_vector.hpp"
  1264. @@ -16,7 +18,7 @@
  1265. class StringEnumeration;
  1266. class Convert;
  1267.  
  1268. - class StringEnumeration {
  1269. + class ASPELL_EXPORT StringEnumeration {
  1270. public:
  1271. typedef const char * Value;
  1272. virtual bool at_end() const = 0;
  1273. diff -Nru aspell-0.60.6.orig/common/string_list.hpp aspell-0.60.6/common/string_list.hpp
  1274. --- aspell-0.60.6.orig/common/string_list.hpp 2004-06-17 14:41:47.000000000 +0200
  1275. +++ aspell-0.60.6/common/string_list.hpp 2010-07-26 09:49:01.742866800 +0200
  1276. @@ -6,6 +6,8 @@
  1277. #ifndef STRING_LIST_HP_HEADER
  1278. #define STRING_LIST_HP_HEADER
  1279.  
  1280. +#include "aspell_export.h"
  1281. +
  1282. #include "string.hpp"
  1283. #include "string_enumeration.hpp"
  1284. #include "mutable_container.hpp"
  1285. @@ -15,7 +17,7 @@
  1286.  
  1287. namespace acommon {
  1288.  
  1289. - struct StringListNode {
  1290. + struct ASPELL_EXPORT StringListNode {
  1291. // private data structure
  1292. // default copy & destructor unsafe
  1293. String data;
  1294. @@ -25,7 +27,7 @@
  1295. }
  1296. };
  1297.  
  1298. - class StringListEnumeration : public StringEnumeration {
  1299. + class ASPELL_EXPORT StringListEnumeration : public StringEnumeration {
  1300. // default copy and destructor safe
  1301. private:
  1302. StringListNode * n_;
  1303. @@ -50,7 +52,7 @@
  1304. };
  1305.  
  1306.  
  1307. - class StringList : public MutableContainer {
  1308. + class ASPELL_EXPORT StringList : public MutableContainer {
  1309. // copy and destructor provided
  1310. private:
  1311. StringListNode * first;
  1312. @@ -94,7 +96,7 @@
  1313.  
  1314. };
  1315.  
  1316. - StringList * new_string_list();
  1317. + ASPELL_EXPORT StringList * new_string_list();
  1318.  
  1319. }
  1320. #endif
  1321. diff -Nru aspell-0.60.6.orig/common/string_map.hpp aspell-0.60.6/common/string_map.hpp
  1322. --- aspell-0.60.6.orig/common/string_map.hpp 2004-06-17 14:41:47.000000000 +0200
  1323. +++ aspell-0.60.6/common/string_map.hpp 2010-07-26 09:49:01.762868000 +0200
  1324. @@ -7,6 +7,8 @@
  1325. #ifndef ASPELL_STRING_MAP__HPP
  1326. #define ASPELL_STRING_MAP__HPP
  1327.  
  1328. +#include "aspell_export.h"
  1329. +
  1330. #include "mutable_container.hpp"
  1331. #include "parm_string.hpp"
  1332. #include "posib_err.hpp"
  1333. @@ -21,7 +23,7 @@
  1334.  
  1335. using std::pair;
  1336.  
  1337. -class StringMap : public MutableContainer {
  1338. +class ASPELL_EXPORT StringMap : public MutableContainer {
  1339. public: // but don't use
  1340. struct Parms {
  1341. typedef StringPair Value;
  1342. @@ -117,7 +119,7 @@
  1343.  
  1344. };
  1345.  
  1346. -StringMap * new_string_map();
  1347. +ASPELL_EXPORT StringMap * new_string_map();
  1348.  
  1349.  
  1350. }
  1351. diff -Nru aspell-0.60.6.orig/common/string_pair.hpp aspell-0.60.6/common/string_pair.hpp
  1352. --- aspell-0.60.6.orig/common/string_pair.hpp 2004-02-19 10:14:06.000000000 +0100
  1353. +++ aspell-0.60.6/common/string_pair.hpp 2010-07-26 09:49:01.778868900 +0200
  1354. @@ -7,10 +7,9 @@
  1355. #ifndef ASPELL_STRING_PAIR__HPP
  1356. #define ASPELL_STRING_PAIR__HPP
  1357.  
  1358. -
  1359. namespace acommon {
  1360.  
  1361. -
  1362. +extern "C" {
  1363. struct StringPair {
  1364. const char * first;
  1365. const char * second;
  1366. @@ -18,7 +17,7 @@
  1367. : first(f), second(s) {}
  1368. StringPair() : first(""), second("") {}
  1369. };
  1370. -
  1371. +}
  1372.  
  1373. }
  1374.  
  1375. diff -Nru aspell-0.60.6.orig/common/string_pair_enumeration.hpp aspell-0.60.6/common/string_pair_enumeration.hpp
  1376. --- aspell-0.60.6.orig/common/string_pair_enumeration.hpp 2008-04-07 06:31:19.000000000 +0200
  1377. +++ aspell-0.60.6/common/string_pair_enumeration.hpp 2010-07-26 09:49:01.791869600 +0200
  1378. @@ -9,13 +9,15 @@
  1379. #ifndef ASPELL_STRING_PAIR_ENUMERATION__HPP
  1380. #define ASPELL_STRING_PAIR_ENUMERATION__HPP
  1381.  
  1382. +#include "aspell_export.h"
  1383. +
  1384. #include "string_pair.hpp"
  1385.  
  1386. namespace acommon {
  1387.  
  1388. class StringPairEnumeration;
  1389.  
  1390. -class StringPairEnumeration {
  1391. +class ASPELL_EXPORT StringPairEnumeration {
  1392. public:
  1393. virtual bool at_end() const = 0;
  1394. virtual StringPair next() = 0;
  1395. diff -Nru aspell-0.60.6.orig/common/strtonum.hpp aspell-0.60.6/common/strtonum.hpp
  1396. --- aspell-0.60.6.orig/common/strtonum.hpp 2004-10-28 02:41:04.000000000 +0200
  1397. +++ aspell-0.60.6/common/strtonum.hpp 2010-07-26 09:49:01.806870500 +0200
  1398. @@ -7,12 +7,14 @@
  1399. #ifndef ASPELL_STRTONUM__HPP
  1400. #define ASPELL_STRTONUM__HPP
  1401.  
  1402. +#include "aspell_export.h"
  1403. +
  1404. namespace acommon {
  1405.  
  1406. // Local independent numeric conversion. It is OK if
  1407. // nptr == *endptr
  1408. - double strtod_c(const char * nptr, const char ** endptr);
  1409. - long strtoi_c(const char * npter, const char ** endptr);
  1410. + ASPELL_EXPORT double strtod_c(const char * nptr, const char ** endptr);
  1411. + ASPELL_EXPORT long strtoi_c(const char * npter, const char ** endptr);
  1412.  
  1413. }
  1414.  
  1415. diff -Nru aspell-0.60.6.orig/common/tokenizer.cpp aspell-0.60.6/common/tokenizer.cpp
  1416. --- aspell-0.60.6.orig/common/tokenizer.cpp 2004-04-13 09:13:39.000000000 +0200
  1417. +++ aspell-0.60.6/common/tokenizer.cpp 2010-07-26 09:49:01.817871100 +0200
  1418. @@ -28,4 +28,6 @@
  1419. end = end;
  1420. }
  1421.  
  1422. + bool Tokenizer::advance(){ return false; }; // returns false if there is nothing left
  1423. +
  1424. }
  1425. diff -Nru aspell-0.60.6.orig/common/tokenizer.hpp aspell-0.60.6/common/tokenizer.hpp
  1426. --- aspell-0.60.6.orig/common/tokenizer.hpp 2004-06-02 17:07:34.000000000 +0200
  1427. +++ aspell-0.60.6/common/tokenizer.hpp 2010-07-26 09:49:01.829871800 +0200
  1428. @@ -7,6 +7,8 @@
  1429. #ifndef ACOMMON_TOKENIZER__HPP
  1430. #define ACOMMON_TOKENIZER__HPP
  1431.  
  1432. +#include "aspell_export.h"
  1433. +
  1434. #include "char_vector.hpp"
  1435. #include "filter_char.hpp"
  1436. #include "filter_char_vector.hpp"
  1437. @@ -36,7 +38,7 @@
  1438. void reset (FilterChar * in, FilterChar * stop);
  1439. bool at_end() const {return word_begin == word_end;}
  1440.  
  1441. - virtual bool advance() = 0; // returns false if there is nothing left
  1442. + virtual bool advance(); // returns false if there is nothing left
  1443.  
  1444. bool is_begin(unsigned char c) const
  1445. {return char_type_[c].begin;}
  1446. @@ -65,7 +67,7 @@
  1447. // returns a new tokenizer and sets it up with the given speller
  1448. // class
  1449.  
  1450. - PosibErr<Tokenizer *> new_tokenizer(Speller *);
  1451. + ASPELL_EXPORT PosibErr<Tokenizer *> new_tokenizer(Speller *);
  1452.  
  1453. }
  1454.  
  1455. diff -Nru aspell-0.60.6.orig/export2.pl aspell-0.60.6/export2.pl
  1456. --- aspell-0.60.6.orig/export2.pl 1970-01-01 01:00:00.000000000 +0100
  1457. +++ aspell-0.60.6/export2.pl 2010-07-26 09:51:31.793356000 +0200
  1458. @@ -0,0 +1,68 @@
  1459. +use Cwd;
  1460. +
  1461. +sub trim($)
  1462. +{
  1463. + my $string = shift;
  1464. + $string =~ s/^\s+//;
  1465. + $string =~ s/\s+$//;
  1466. + return $string;
  1467. +}
  1468. +
  1469. +$cwd = getcwd();
  1470. +@fl= ('/common/errors.hpp','/common/gettext.h','/lib/filter-c.cpp','/lib/word_list-c.cpp','/lib/info-c.cpp','/lib/mutable_container-c.cpp','/lib/error-c.cpp','/lib/document_checker-c.cpp','/lib/string_map-c.cpp','/lib/config-c.cpp','/lib/string_enumeration-c.cpp','/lib/can_have_error-c.cpp','/lib/string_list-c.cpp','/lib/speller-c.cpp','/lib/string_pair_enumeration-c.cpp');
  1471. +@filelist = ();
  1472. +foreach $flName (@fl){
  1473. + $tmp = scalar(grep(/.*$flName.*/,@filelist));
  1474. + print $flName."\n";
  1475. + print $tmp;
  1476. + if(scalar($tmp) ==0 ){
  1477. + push(@filelist,$cwd.$flName );
  1478. + }
  1479. +}
  1480. +
  1481. +
  1482. +open(FILE, "symbols.def")||die("Shit couldnt open symbols.def");
  1483. +@symbols = <FILE>;
  1484. +$symbols_length = scalar (@symbols);
  1485. +close(FILE);
  1486. +
  1487. +
  1488. +foreach(@filelist){
  1489. + $fileName = $_;
  1490. + open(FILE, $fileName )||die("File ".$fileName." not found");
  1491. + @content = <FILE>;
  1492. + unshift(@content,"#include \"aspell_export.h\"\n");
  1493. + close(FILE);
  1494. + for($i=0;$i<$symbols_length;++$i){
  1495. + $sym = trim($symbols[$i]);
  1496. + if( ! defined $sym ){
  1497. + delete $symbols[$i];
  1498. + next;
  1499. + }else{
  1500. + foreach $line (@content){
  1501. + if($line =~ m/^\s*extern "C".*$sym\s*\(.*\).*/
  1502. + || $line =~ m/^\s*extern "C".*$sym;/){
  1503. + print "Found Symbols: ". $symbols[$i]." in File: ".$fileName;
  1504. + @sp = split(/\"C\"/, trim($line));
  1505. + $tmp = $sp[0]."\"C\" ASPELL_EXPORT ".$sp[1];
  1506. + $tmp = $tmp."\n";
  1507. +
  1508. + print "modified\n".$line."\nto\n".$tmp;
  1509. + print $line
  1510. + $line = $tmp;
  1511. + }
  1512. + }
  1513. + }
  1514. + }
  1515. + open(FILE, ">" ,$fileName );
  1516. + print FILE @content;
  1517. + close(FILE);
  1518. +}
  1519. +
  1520. +#foreach(@symbols){
  1521. +# if(defined $_){
  1522. +# print "\ncouldn't find ".$_;
  1523. +# }
  1524. +#}
  1525. +
  1526. +
  1527. diff -Nru aspell-0.60.6.orig/gen/mk-static-filter.pl aspell-0.60.6/gen/mk-static-filter.pl
  1528. --- aspell-0.60.6.orig/gen/mk-static-filter.pl 2007-12-03 07:43:09.000000000 +0100
  1529. +++ aspell-0.60.6/gen/mk-static-filter.pl 2010-07-26 09:49:01.845872700 +0200
  1530. @@ -12,7 +12,6 @@
  1531. %filters=();
  1532.  
  1533. while ($filename=shift) {
  1534. -
  1535. #check if filter description file (*-filter.info) has been read before
  1536. $filtername=$filename;
  1537. $filtername=~s/-filter\.info$//;
  1538. @@ -93,7 +92,9 @@
  1539. #statically linked into Aspell
  1540.  
  1541. (scalar (@allfilters = keys %filters)) || exit 0;
  1542. +
  1543. open STATICFILTERS, ">gen/static_filters.src.cpp" || die "cant generate static filter description\n";
  1544. +print "STATICFILTERS\n";
  1545. printf STATICFILTERS "/*File generated during static filter build\n".
  1546. " Automatically generated file\n*/\n";
  1547.  
  1548. @@ -137,8 +138,10 @@
  1549.  
  1550. #create KeyInfo structs and begin end handles
  1551. $firstopt = 1;
  1552. + $needdummy = 1;
  1553. while (($name,$option)=each %{$filter}) {
  1554. ($name=~/(?:NAME|(?:DE|EN)CODER|FILTER|DESCRIPTION)/) && next;
  1555. + $needdummy = 0;
  1556. ( $firstopt != 1 ) && ( printf STATICFILTERS ",\n" );
  1557. $firstopt = 0;
  1558. printf STATICFILTERS " {\n".
  1559. @@ -155,6 +158,13 @@
  1560. " \"".${$option}{"DESCRIPTION"}."\"\n".
  1561. " }";
  1562. }
  1563. + if( $needdummy ) {
  1564. + printf STATICFILTERS " {\n \"f-${$filter}{NAME}-$name\",\n";
  1565. + printf STATICFILTERS " KeyInfoBool,\n";
  1566. + print STATICFILTERS " \"false\",\n".
  1567. + " \"dummy option\"\n".
  1568. + " }";
  1569. + }
  1570. printf STATICFILTERS "\n };\n";
  1571. printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
  1572. ${$filter}{"NAME"}."_options;\n";
  1573. diff -Nru aspell-0.60.6.orig/lib/can_have_error-c.cpp aspell-0.60.6/lib/can_have_error-c.cpp
  1574. --- aspell-0.60.6.orig/lib/can_have_error-c.cpp 2008-04-07 06:31:19.000000000 +0200
  1575. +++ aspell-0.60.6/lib/can_have_error-c.cpp 2010-07-26 09:51:53.950615500 +0200
  1576. @@ -1,3 +1,4 @@
  1577. +#include "aspell_export.h"
  1578. /* Automatically generated file. Do not edit directly. */
  1579.  
  1580. /* This file is part of The New Aspell
  1581. @@ -14,22 +15,22 @@
  1582. class CanHaveError;
  1583. struct Error;
  1584.  
  1585. -extern "C" unsigned int aspell_error_number(const CanHaveError * ths)
  1586. +extern "C" ASPELL_EXPORT unsigned int aspell_error_number(const CanHaveError * ths)
  1587. {
  1588. return ths->err_ == 0 ? 0 : 1;
  1589. }
  1590.  
  1591. -extern "C" const char * aspell_error_message(const CanHaveError * ths)
  1592. +extern "C" ASPELL_EXPORT const char * aspell_error_message(const CanHaveError * ths)
  1593. {
  1594. return ths->err_ ? ths->err_->mesg : "";
  1595. }
  1596.  
  1597. -extern "C" const Error * aspell_error(const CanHaveError * ths)
  1598. +extern "C" ASPELL_EXPORT const Error * aspell_error(const CanHaveError * ths)
  1599. {
  1600. return ths->err_;
  1601. }
  1602.  
  1603. -extern "C" void delete_aspell_can_have_error(CanHaveError * ths)
  1604. +extern "C" ASPELL_EXPORT void delete_aspell_can_have_error(CanHaveError * ths)
  1605. {
  1606. delete ths;
  1607. }
  1608. diff -Nru aspell-0.60.6.orig/lib/config-c.cpp aspell-0.60.6/lib/config-c.cpp
  1609. --- aspell-0.60.6.orig/lib/config-c.cpp 2008-04-07 06:31:19.000000000 +0200
  1610. +++ aspell-0.60.6/lib/config-c.cpp 2010-07-26 09:51:53.859610300 +0200
  1611. @@ -1,3 +1,4 @@
  1612. +#include "aspell_export.h"
  1613. /* Automatically generated file. Do not edit directly. */
  1614.  
  1615. /* This file is part of The New Aspell
  1616. @@ -20,72 +21,72 @@
  1617. class MutableContainer;
  1618. class StringPairEnumeration;
  1619.  
  1620. -extern "C" int aspell_key_info_enumeration_at_end(const KeyInfoEnumeration * ths)
  1621. +extern "C" ASPELL_EXPORT int aspell_key_info_enumeration_at_end(const KeyInfoEnumeration * ths)
  1622. {
  1623. return ths->at_end();
  1624. }
  1625.  
  1626. -extern "C" const KeyInfo * aspell_key_info_enumeration_next(KeyInfoEnumeration * ths)
  1627. +extern "C" ASPELL_EXPORT const KeyInfo * aspell_key_info_enumeration_next(KeyInfoEnumeration * ths)
  1628. {
  1629. return ths->next();
  1630. }
  1631.  
  1632. -extern "C" void delete_aspell_key_info_enumeration(KeyInfoEnumeration * ths)
  1633. +extern "C" ASPELL_EXPORT void delete_aspell_key_info_enumeration(KeyInfoEnumeration * ths)
  1634. {
  1635. delete ths;
  1636. }
  1637.  
  1638. -extern "C" KeyInfoEnumeration * aspell_key_info_enumeration_clone(const KeyInfoEnumeration * ths)
  1639. +extern "C" ASPELL_EXPORT KeyInfoEnumeration * aspell_key_info_enumeration_clone(const KeyInfoEnumeration * ths)
  1640. {
  1641. return ths->clone();
  1642. }
  1643.  
  1644. -extern "C" void aspell_key_info_enumeration_assign(KeyInfoEnumeration * ths, const KeyInfoEnumeration * other)
  1645. +extern "C" ASPELL_EXPORT void aspell_key_info_enumeration_assign(KeyInfoEnumeration * ths, const KeyInfoEnumeration * other)
  1646. {
  1647. ths->assign(other);
  1648. }
  1649.  
  1650. -extern "C" Config * new_aspell_config()
  1651. +extern "C" ASPELL_EXPORT Config * new_aspell_config()
  1652. {
  1653. return new_config();
  1654. }
  1655.  
  1656. -extern "C" void delete_aspell_config(Config * ths)
  1657. +extern "C" ASPELL_EXPORT void delete_aspell_config(Config * ths)
  1658. {
  1659. delete ths;
  1660. }
  1661.  
  1662. -extern "C" Config * aspell_config_clone(const Config * ths)
  1663. +extern "C" ASPELL_EXPORT Config * aspell_config_clone(const Config * ths)
  1664. {
  1665. return ths->clone();
  1666. }
  1667.  
  1668. -extern "C" void aspell_config_assign(Config * ths, const Config * other)
  1669. +extern "C" ASPELL_EXPORT void aspell_config_assign(Config * ths, const Config * other)
  1670. {
  1671. ths->assign(other);
  1672. }
  1673.  
  1674. -extern "C" unsigned int aspell_config_error_number(const Config * ths)
  1675. +extern "C" ASPELL_EXPORT unsigned int aspell_config_error_number(const Config * ths)
  1676. {
  1677. return ths->err_ == 0 ? 0 : 1;
  1678. }
  1679.  
  1680. -extern "C" const char * aspell_config_error_message(const Config * ths)
  1681. +extern "C" ASPELL_EXPORT const char * aspell_config_error_message(const Config * ths)
  1682. {
  1683. return ths->err_ ? ths->err_->mesg : "";
  1684. }
  1685.  
  1686. -extern "C" const Error * aspell_config_error(const Config * ths)
  1687. +extern "C" ASPELL_EXPORT const Error * aspell_config_error(const Config * ths)
  1688. {
  1689. return ths->err_;
  1690. }
  1691.  
  1692. -extern "C" void aspell_config_set_extra(Config * ths, const KeyInfo * begin, const KeyInfo * end)
  1693. +extern "C" ASPELL_EXPORT void aspell_config_set_extra(Config * ths, const KeyInfo * begin, const KeyInfo * end)
  1694. {
  1695. ths->set_extra(begin, end);
  1696. }
  1697.  
  1698. -extern "C" const KeyInfo * aspell_config_keyinfo(Config * ths, const char * key)
  1699. +extern "C" ASPELL_EXPORT const KeyInfo * aspell_config_keyinfo(Config * ths, const char * key)
  1700. {
  1701. PosibErr<const KeyInfo *> ret = ths->keyinfo(key);
  1702. ths->err_.reset(ret.release_err());
  1703. @@ -93,12 +94,12 @@
  1704. return ret.data;
  1705. }
  1706.  
  1707. -extern "C" KeyInfoEnumeration * aspell_config_possible_elements(Config * ths, int include_extra)
  1708. +extern "C" ASPELL_EXPORT KeyInfoEnumeration * aspell_config_possible_elements(Config * ths, int include_extra)
  1709. {
  1710. return ths->possible_elements(include_extra);
  1711. }
  1712.  
  1713. -extern "C" const char * aspell_config_get_default(Config * ths, const char * key)
  1714. +extern "C" ASPELL_EXPORT const char * aspell_config_get_default(Config * ths, const char * key)
  1715. {
  1716. PosibErr<String> ret = ths->get_default(key);
  1717. ths->err_.reset(ret.release_err());
  1718. @@ -107,12 +108,12 @@
  1719. return ths->temp_str.c_str();
  1720. }
  1721.  
  1722. -extern "C" StringPairEnumeration * aspell_config_elements(Config * ths)
  1723. +extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_config_elements(Config * ths)
  1724. {
  1725. return ths->elements();
  1726. }
  1727.  
  1728. -extern "C" int aspell_config_replace(Config * ths, const char * key, const char * value)
  1729. +extern "C" ASPELL_EXPORT int aspell_config_replace(Config * ths, const char * key, const char * value)
  1730. {
  1731. PosibErr<void> ret = ths->replace(key, value);
  1732. ths->err_.reset(ret.release_err());
  1733. @@ -120,7 +121,7 @@
  1734. return 1;
  1735. }
  1736.  
  1737. -extern "C" int aspell_config_remove(Config * ths, const char * key)
  1738. +extern "C" ASPELL_EXPORT int aspell_config_remove(Config * ths, const char * key)
  1739. {
  1740. PosibErr<void> ret = ths->remove(key);
  1741. ths->err_.reset(ret.release_err());
  1742. @@ -128,12 +129,12 @@
  1743. return 1;
  1744. }
  1745.  
  1746. -extern "C" int aspell_config_have(const Config * ths, const char * key)
  1747. +extern "C" ASPELL_EXPORT int aspell_config_have(const Config * ths, const char * key)
  1748. {
  1749. return ths->have(key);
  1750. }
  1751.  
  1752. -extern "C" const char * aspell_config_retrieve(Config * ths, const char * key)
  1753. +extern "C" ASPELL_EXPORT const char * aspell_config_retrieve(Config * ths, const char * key)
  1754. {
  1755. PosibErr<String> ret = ths->retrieve(key);
  1756. ths->err_.reset(ret.release_err());
  1757. @@ -142,7 +143,7 @@
  1758. return ths->temp_str.c_str();
  1759. }
  1760.  
  1761. -extern "C" int aspell_config_retrieve_list(Config * ths, const char * key, MutableContainer * lst)
  1762. +extern "C" ASPELL_EXPORT int aspell_config_retrieve_list(Config * ths, const char * key, MutableContainer * lst)
  1763. {
  1764. PosibErr<void> ret = ths->retrieve_list(key, lst);
  1765. ths->err_.reset(ret.release_err());
  1766. @@ -150,7 +151,7 @@
  1767. return 1;
  1768. }
  1769.  
  1770. -extern "C" int aspell_config_retrieve_bool(Config * ths, const char * key)
  1771. +extern "C" ASPELL_EXPORT int aspell_config_retrieve_bool(Config * ths, const char * key)
  1772. {
  1773. PosibErr<bool> ret = ths->retrieve_bool(key);
  1774. ths->err_.reset(ret.release_err());
  1775. @@ -158,7 +159,7 @@
  1776. return ret.data;
  1777. }
  1778.  
  1779. -extern "C" int aspell_config_retrieve_int(Config * ths, const char * key)
  1780. +extern "C" ASPELL_EXPORT int aspell_config_retrieve_int(Config * ths, const char * key)
  1781. {
  1782. PosibErr<unsigned int> ret = ths->retrieve_int(key);
  1783. ths->err_.reset(ret.release_err());
  1784. diff -Nru aspell-0.60.6.orig/lib/document_checker-c.cpp aspell-0.60.6/lib/document_checker-c.cpp
  1785. --- aspell-0.60.6.orig/lib/document_checker-c.cpp 2008-04-07 06:31:19.000000000 +0200
  1786. +++ aspell-0.60.6/lib/document_checker-c.cpp 2010-07-26 09:51:53.531591600 +0200
  1787. @@ -1,3 +1,4 @@
  1788. +#include "aspell_export.h"
  1789. /* Automatically generated file. Do not edit directly. */
  1790.  
  1791. /* This file is part of The New Aspell
  1792. @@ -17,27 +18,27 @@
  1793. class Filter;
  1794. class Speller;
  1795.  
  1796. -extern "C" void delete_aspell_document_checker(DocumentChecker * ths)
  1797. +extern "C" ASPELL_EXPORT void delete_aspell_document_checker(DocumentChecker * ths)
  1798. {
  1799. delete ths;
  1800. }
  1801.  
  1802. -extern "C" unsigned int aspell_document_checker_error_number(const DocumentChecker * ths)
  1803. +extern "C" ASPELL_EXPORT unsigned int aspell_document_checker_error_number(const DocumentChecker * ths)
  1804. {
  1805. return ths->err_ == 0 ? 0 : 1;
  1806. }
  1807.  
  1808. -extern "C" const char * aspell_document_checker_error_message(const DocumentChecker * ths)
  1809. +extern "C" ASPELL_EXPORT const char * aspell_document_checker_error_message(const DocumentChecker * ths)
  1810. {
  1811. return ths->err_ ? ths->err_->mesg : "";
  1812. }
  1813.  
  1814. -extern "C" const Error * aspell_document_checker_error(const DocumentChecker * ths)
  1815. +extern "C" ASPELL_EXPORT const Error * aspell_document_checker_error(const DocumentChecker * ths)
  1816. {
  1817. return ths->err_;
  1818. }
  1819.  
  1820. -extern "C" CanHaveError * new_aspell_document_checker(Speller * speller)
  1821. +extern "C" ASPELL_EXPORT CanHaveError * new_aspell_document_checker(Speller * speller)
  1822. {
  1823. PosibErr<DocumentChecker *> ret = new_document_checker(speller);
  1824. if (ret.has_err()) {
  1825. @@ -47,27 +48,27 @@
  1826. }
  1827. }
  1828.  
  1829. -extern "C" DocumentChecker * to_aspell_document_checker(CanHaveError * obj)
  1830. +extern "C" ASPELL_EXPORT DocumentChecker * to_aspell_document_checker(CanHaveError * obj)
  1831. {
  1832. return static_cast<DocumentChecker *>(obj);
  1833. }
  1834.  
  1835. -extern "C" void aspell_document_checker_reset(DocumentChecker * ths)
  1836. +extern "C" ASPELL_EXPORT void aspell_document_checker_reset(DocumentChecker * ths)
  1837. {
  1838. ths->reset();
  1839. }
  1840.  
  1841. -extern "C" void aspell_document_checker_process(DocumentChecker * ths, const char * str, int size)
  1842. +extern "C" ASPELL_EXPORT void aspell_document_checker_process(DocumentChecker * ths, const char * str, int size)
  1843. {
  1844. ths->process(str, size);
  1845. }
  1846.  
  1847. -extern "C" Token aspell_document_checker_next_misspelling(DocumentChecker * ths)
  1848. +extern "C" ASPELL_EXPORT Token aspell_document_checker_next_misspelling(DocumentChecker * ths)
  1849. {
  1850. return ths->next_misspelling();
  1851. }
  1852.  
  1853. -extern "C" Filter * aspell_document_checker_filter(DocumentChecker * ths)
  1854. +extern "C" ASPELL_EXPORT Filter * aspell_document_checker_filter(DocumentChecker * ths)
  1855. {
  1856. return ths->filter();
  1857. }
  1858. diff -Nru aspell-0.60.6.orig/lib/dummy.cpp aspell-0.60.6/lib/dummy.cpp
  1859. --- aspell-0.60.6.orig/lib/dummy.cpp 2002-09-09 07:57:09.000000000 +0200
  1860. +++ aspell-0.60.6/lib/dummy.cpp 2010-07-26 09:49:01.860873600 +0200
  1861. @@ -1 +1,5 @@
  1862. +#include <aspell_export.h>
  1863. +
  1864. +void ASPELL_EXPORT pspell_aspell_dummy();
  1865. +
  1866. void pspell_aspell_dummy() {}
  1867. diff -Nru aspell-0.60.6.orig/lib/error-c.cpp aspell-0.60.6/lib/error-c.cpp
  1868. --- aspell-0.60.6.orig/lib/error-c.cpp 2008-04-07 06:31:19.000000000 +0200
  1869. +++ aspell-0.60.6/lib/error-c.cpp 2010-07-26 09:51:53.444586600 +0200
  1870. @@ -1,3 +1,4 @@
  1871. +#include "aspell_export.h"
  1872. /* Automatically generated file. Do not edit directly. */
  1873.  
  1874. /* This file is part of The New Aspell
  1875. @@ -13,7 +14,7 @@
  1876. struct Error;
  1877. struct ErrorInfo;
  1878.  
  1879. -extern "C" int aspell_error_is_a(const Error * ths, const ErrorInfo * e)
  1880. +extern "C" ASPELL_EXPORT int aspell_error_is_a(const Error * ths, const ErrorInfo * e)
  1881. {
  1882. return ths->is_a(e);
  1883. }
  1884. diff -Nru aspell-0.60.6.orig/lib/filter-c.cpp aspell-0.60.6/lib/filter-c.cpp
  1885. --- aspell-0.60.6.orig/lib/filter-c.cpp 2008-04-07 06:31:19.000000000 +0200
  1886. +++ aspell-0.60.6/lib/filter-c.cpp 2010-07-26 09:51:52.996561000 +0200
  1887. @@ -1,3 +1,4 @@
  1888. +#include "aspell_export.h"
  1889. /* Automatically generated file. Do not edit directly. */
  1890.  
  1891. /* This file is part of The New Aspell
  1892. @@ -15,27 +16,27 @@
  1893. struct Error;
  1894. class Filter;
  1895.  
  1896. -extern "C" void delete_aspell_filter(Filter * ths)
  1897. +extern "C" ASPELL_EXPORT void delete_aspell_filter(Filter * ths)
  1898. {
  1899. delete ths;
  1900. }
  1901.  
  1902. -extern "C" unsigned int aspell_filter_error_number(const Filter * ths)
  1903. +extern "C" ASPELL_EXPORT unsigned int aspell_filter_error_number(const Filter * ths)
  1904. {
  1905. return ths->err_ == 0 ? 0 : 1;
  1906. }
  1907.  
  1908. -extern "C" const char * aspell_filter_error_message(const Filter * ths)
  1909. +extern "C" ASPELL_EXPORT const char * aspell_filter_error_message(const Filter * ths)
  1910. {
  1911. return ths->err_ ? ths->err_->mesg : "";
  1912. }
  1913.  
  1914. -extern "C" const Error * aspell_filter_error(const Filter * ths)
  1915. +extern "C" ASPELL_EXPORT const Error * aspell_filter_error(const Filter * ths)
  1916. {
  1917. return ths->err_;
  1918. }
  1919.  
  1920. -extern "C" Filter * to_aspell_filter(CanHaveError * obj)
  1921. +extern "C" ASPELL_EXPORT Filter * to_aspell_filter(CanHaveError * obj)
  1922. {
  1923. return static_cast<Filter *>(obj);
  1924. }
  1925. diff -Nru aspell-0.60.6.orig/lib/info-c.cpp aspell-0.60.6/lib/info-c.cpp
  1926. --- aspell-0.60.6.orig/lib/info-c.cpp 2004-01-25 04:20:28.000000000 +0100
  1927. +++ aspell-0.60.6/lib/info-c.cpp 2010-07-26 09:51:53.306578700 +0200
  1928. @@ -1,3 +1,4 @@
  1929. +#include "aspell_export.h"
  1930. /* This file is part of The New Aspell
  1931. * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
  1932. * license version 2.0 or 2.1. You should have received a copy of the
  1933. @@ -16,92 +17,92 @@
  1934. class ModuleInfoEnumeration;
  1935. class ModuleInfoList;
  1936.  
  1937. -extern "C" ModuleInfoList * get_aspell_module_info_list(Config * config)
  1938. +extern "C" ASPELL_EXPORT ModuleInfoList * get_aspell_module_info_list(Config * config)
  1939. {
  1940. return const_cast<ModuleInfoList *>(get_module_info_list(config));
  1941. }
  1942.  
  1943. -extern "C" int aspell_module_info_list_empty(const ModuleInfoList * ths)
  1944. +extern "C" ASPELL_EXPORT int aspell_module_info_list_empty(const ModuleInfoList * ths)
  1945. {
  1946. return ths->empty();
  1947. }
  1948.  
  1949. -extern "C" unsigned int aspell_module_info_list_size(const ModuleInfoList * ths)
  1950. +extern "C" ASPELL_EXPORT unsigned int aspell_module_info_list_size(const ModuleInfoList * ths)
  1951. {
  1952. return ths->size();
  1953. }
  1954.  
  1955. -extern "C" ModuleInfoEnumeration * aspell_module_info_list_elements(const ModuleInfoList * ths)
  1956. +extern "C" ASPELL_EXPORT ModuleInfoEnumeration * aspell_module_info_list_elements(const ModuleInfoList * ths)
  1957. {
  1958. return ths->elements();
  1959. }
  1960.  
  1961. -extern "C" DictInfoList * get_aspell_dict_info_list(Config * config)
  1962. +extern "C" ASPELL_EXPORT DictInfoList * get_aspell_dict_info_list(Config * config)
  1963. {
  1964. return const_cast<DictInfoList *>(get_dict_info_list(config));
  1965. }
  1966.  
  1967. -extern "C" int aspell_dict_info_list_empty(const DictInfoList * ths)
  1968. +extern "C" ASPELL_EXPORT int aspell_dict_info_list_empty(const DictInfoList * ths)
  1969. {
  1970. return ths->empty();
  1971. }
  1972.  
  1973. -extern "C" unsigned int aspell_dict_info_list_size(const DictInfoList * ths)
  1974. +extern "C" ASPELL_EXPORT unsigned int aspell_dict_info_list_size(const DictInfoList * ths)
  1975. {
  1976. return ths->size();
  1977. }
  1978.  
  1979. -extern "C" DictInfoEnumeration * aspell_dict_info_list_elements(const DictInfoList * ths)
  1980. +extern "C" ASPELL_EXPORT DictInfoEnumeration * aspell_dict_info_list_elements(const DictInfoList * ths)
  1981. {
  1982. return ths->elements();
  1983. }
  1984.  
  1985. -extern "C" int aspell_module_info_enumeration_at_end(const ModuleInfoEnumeration * ths)
  1986. +extern "C" ASPELL_EXPORT int aspell_module_info_enumeration_at_end(const ModuleInfoEnumeration * ths)
  1987. {
  1988. return ths->at_end();
  1989. }
  1990.  
  1991. -extern "C" const ModuleInfo * aspell_module_info_enumeration_next(ModuleInfoEnumeration * ths)
  1992. +extern "C" ASPELL_EXPORT const ModuleInfo * aspell_module_info_enumeration_next(ModuleInfoEnumeration * ths)
  1993. {
  1994. return ths->next();
  1995. }
  1996.  
  1997. -extern "C" void delete_aspell_module_info_enumeration(ModuleInfoEnumeration * ths)
  1998. +extern "C" ASPELL_EXPORT void delete_aspell_module_info_enumeration(ModuleInfoEnumeration * ths)
  1999. {
  2000. delete ths;
  2001. }
  2002.  
  2003. -extern "C" ModuleInfoEnumeration * aspell_module_info_enumeration_clone(const ModuleInfoEnumeration * ths)
  2004. +extern "C" ASPELL_EXPORT ModuleInfoEnumeration * aspell_module_info_enumeration_clone(const ModuleInfoEnumeration * ths)
  2005. {
  2006. return ths->clone();
  2007. }
  2008.  
  2009. -extern "C" void aspell_module_info_enumeration_assign(ModuleInfoEnumeration * ths, const ModuleInfoEnumeration * other)
  2010. +extern "C" ASPELL_EXPORT void aspell_module_info_enumeration_assign(ModuleInfoEnumeration * ths, const ModuleInfoEnumeration * other)
  2011. {
  2012. ths->assign(other);
  2013. }
  2014.  
  2015. -extern "C" int aspell_dict_info_enumeration_at_end(const DictInfoEnumeration * ths)
  2016. +extern "C" ASPELL_EXPORT int aspell_dict_info_enumeration_at_end(const DictInfoEnumeration * ths)
  2017. {
  2018. return ths->at_end();
  2019. }
  2020.  
  2021. -extern "C" const DictInfo * aspell_dict_info_enumeration_next(DictInfoEnumeration * ths)
  2022. +extern "C" ASPELL_EXPORT const DictInfo * aspell_dict_info_enumeration_next(DictInfoEnumeration * ths)
  2023. {
  2024. return ths->next();
  2025. }
  2026.  
  2027. -extern "C" void delete_aspell_dict_info_enumeration(DictInfoEnumeration * ths)
  2028. +extern "C" ASPELL_EXPORT void delete_aspell_dict_info_enumeration(DictInfoEnumeration * ths)
  2029. {
  2030. delete ths;
  2031. }
  2032.  
  2033. -extern "C" DictInfoEnumeration * aspell_dict_info_enumeration_clone(const DictInfoEnumeration * ths)
  2034. +extern "C" ASPELL_EXPORT DictInfoEnumeration * aspell_dict_info_enumeration_clone(const DictInfoEnumeration * ths)
  2035. {
  2036. return ths->clone();
  2037. }
  2038.  
  2039. -extern "C" void aspell_dict_info_enumeration_assign(DictInfoEnumeration * ths, const DictInfoEnumeration * other)
  2040. +extern "C" ASPELL_EXPORT void aspell_dict_info_enumeration_assign(DictInfoEnumeration * ths, const DictInfoEnumeration * other)
  2041. {
  2042. ths->assign(other);
  2043. }
  2044. diff -Nru aspell-0.60.6.orig/lib/mutable_container-c.cpp aspell-0.60.6/lib/mutable_container-c.cpp
  2045. --- aspell-0.60.6.orig/lib/mutable_container-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2046. +++ aspell-0.60.6/lib/mutable_container-c.cpp 2010-07-26 09:51:53.417585000 +0200
  2047. @@ -1,3 +1,4 @@
  2048. +#include "aspell_export.h"
  2049. /* Automatically generated file. Do not edit directly. */
  2050.  
  2051. /* This file is part of The New Aspell
  2052. @@ -13,22 +14,22 @@
  2053.  
  2054. class MutableContainer;
  2055.  
  2056. -extern "C" int aspell_mutable_container_add(MutableContainer * ths, const char * to_add)
  2057. +extern "C" ASPELL_EXPORT int aspell_mutable_container_add(MutableContainer * ths, const char * to_add)
  2058. {
  2059. return ths->add(to_add);
  2060. }
  2061.  
  2062. -extern "C" int aspell_mutable_container_remove(MutableContainer * ths, const char * to_rem)
  2063. +extern "C" ASPELL_EXPORT int aspell_mutable_container_remove(MutableContainer * ths, const char * to_rem)
  2064. {
  2065. return ths->remove(to_rem);
  2066. }
  2067.  
  2068. -extern "C" void aspell_mutable_container_clear(MutableContainer * ths)
  2069. +extern "C" ASPELL_EXPORT void aspell_mutable_container_clear(MutableContainer * ths)
  2070. {
  2071. ths->clear();
  2072. }
  2073.  
  2074. -extern "C" MutableContainer * aspell_mutable_container_to_mutable_container(MutableContainer * ths)
  2075. +extern "C" ASPELL_EXPORT MutableContainer * aspell_mutable_container_to_mutable_container(MutableContainer * ths)
  2076. {
  2077. return ths;
  2078. }
  2079. diff -Nru aspell-0.60.6.orig/lib/speller-c.cpp aspell-0.60.6/lib/speller-c.cpp
  2080. --- aspell-0.60.6.orig/lib/speller-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2081. +++ aspell-0.60.6/lib/speller-c.cpp 2010-07-26 09:51:54.131625900 +0200
  2082. @@ -1,3 +1,4 @@
  2083. +#include "aspell_export.h"
  2084. /* Automatically generated file. Do not edit directly. */
  2085.  
  2086. /* This file is part of The New Aspell
  2087. @@ -21,7 +22,7 @@
  2088. class Speller;
  2089. class WordList;
  2090.  
  2091. -extern "C" CanHaveError * new_aspell_speller(Config * config)
  2092. +extern "C" ASPELL_EXPORT CanHaveError * new_aspell_speller(Config * config)
  2093. {
  2094. PosibErr<Speller *> ret = new_speller(config);
  2095. if (ret.has_err()) {
  2096. @@ -31,37 +32,37 @@
  2097. }
  2098. }
  2099.  
  2100. -extern "C" Speller * to_aspell_speller(CanHaveError * obj)
  2101. +extern "C" ASPELL_EXPORT Speller * to_aspell_speller(CanHaveError * obj)
  2102. {
  2103. return static_cast<Speller *>(obj);
  2104. }
  2105.  
  2106. -extern "C" void delete_aspell_speller(Speller * ths)
  2107. +extern "C" ASPELL_EXPORT void delete_aspell_speller(Speller * ths)
  2108. {
  2109. delete ths;
  2110. }
  2111.  
  2112. -extern "C" unsigned int aspell_speller_error_number(const Speller * ths)
  2113. +extern "C" ASPELL_EXPORT unsigned int aspell_speller_error_number(const Speller * ths)
  2114. {
  2115. return ths->err_ == 0 ? 0 : 1;
  2116. }
  2117.  
  2118. -extern "C" const char * aspell_speller_error_message(const Speller * ths)
  2119. +extern "C" ASPELL_EXPORT const char * aspell_speller_error_message(const Speller * ths)
  2120. {
  2121. return ths->err_ ? ths->err_->mesg : "";
  2122. }
  2123.  
  2124. -extern "C" const Error * aspell_speller_error(const Speller * ths)
  2125. +extern "C" ASPELL_EXPORT const Error * aspell_speller_error(const Speller * ths)
  2126. {
  2127. return ths->err_;
  2128. }
  2129.  
  2130. -extern "C" Config * aspell_speller_config(Speller * ths)
  2131. +extern "C" ASPELL_EXPORT Config * aspell_speller_config(Speller * ths)
  2132. {
  2133. return ths->config();
  2134. }
  2135.  
  2136. -extern "C" int aspell_speller_check(Speller * ths, const char * word, int word_size)
  2137. +extern "C" ASPELL_EXPORT int aspell_speller_check(Speller * ths, const char * word, int word_size)
  2138. {
  2139. ths->temp_str_0.clear();
  2140. ths->to_internal_->convert(word, word_size, ths->temp_str_0);
  2141. @@ -72,7 +73,7 @@
  2142. return ret.data;
  2143. }
  2144.  
  2145. -extern "C" int aspell_speller_add_to_personal(Speller * ths, const char * word, int word_size)
  2146. +extern "C" ASPELL_EXPORT int aspell_speller_add_to_personal(Speller * ths, const char * word, int word_size)
  2147. {
  2148. ths->temp_str_0.clear();
  2149. ths->to_internal_->convert(word, word_size, ths->temp_str_0);
  2150. @@ -83,7 +84,7 @@
  2151. return 1;
  2152. }
  2153.  
  2154. -extern "C" int aspell_speller_add_to_session(Speller * ths, const char * word, int word_size)
  2155. +extern "C" ASPELL_EXPORT int aspell_speller_add_to_session(Speller * ths, const char * word, int word_size)
  2156. {
  2157. ths->temp_str_0.clear();
  2158. ths->to_internal_->convert(word, word_size, ths->temp_str_0);
  2159. @@ -94,7 +95,7 @@
  2160. return 1;
  2161. }
  2162.  
  2163. -extern "C" const WordList * aspell_speller_personal_word_list(Speller * ths)
  2164. +extern "C" ASPELL_EXPORT const WordList * aspell_speller_personal_word_list(Speller * ths)
  2165. {
  2166. PosibErr<const WordList *> ret = ths->personal_word_list();
  2167. ths->err_.reset(ret.release_err());
  2168. @@ -104,7 +105,7 @@
  2169. return ret.data;
  2170. }
  2171.  
  2172. -extern "C" const WordList * aspell_speller_session_word_list(Speller * ths)
  2173. +extern "C" ASPELL_EXPORT const WordList * aspell_speller_session_word_list(Speller * ths)
  2174. {
  2175. PosibErr<const WordList *> ret = ths->session_word_list();
  2176. ths->err_.reset(ret.release_err());
  2177. @@ -114,7 +115,7 @@
  2178. return ret.data;
  2179. }
  2180.  
  2181. -extern "C" const WordList * aspell_speller_main_word_list(Speller * ths)
  2182. +extern "C" ASPELL_EXPORT const WordList * aspell_speller_main_word_list(Speller * ths)
  2183. {
  2184. PosibErr<const WordList *> ret = ths->main_word_list();
  2185. ths->err_.reset(ret.release_err());
  2186. @@ -124,7 +125,7 @@
  2187. return ret.data;
  2188. }
  2189.  
  2190. -extern "C" int aspell_speller_save_all_word_lists(Speller * ths)
  2191. +extern "C" ASPELL_EXPORT int aspell_speller_save_all_word_lists(Speller * ths)
  2192. {
  2193. PosibErr<void> ret = ths->save_all_word_lists();
  2194. ths->err_.reset(ret.release_err());
  2195. @@ -132,7 +133,7 @@
  2196. return 1;
  2197. }
  2198.  
  2199. -extern "C" int aspell_speller_clear_session(Speller * ths)
  2200. +extern "C" ASPELL_EXPORT int aspell_speller_clear_session(Speller * ths)
  2201. {
  2202. PosibErr<void> ret = ths->clear_session();
  2203. ths->err_.reset(ret.release_err());
  2204. @@ -140,7 +141,7 @@
  2205. return 1;
  2206. }
  2207.  
  2208. -extern "C" const WordList * aspell_speller_suggest(Speller * ths, const char * word, int word_size)
  2209. +extern "C" ASPELL_EXPORT const WordList * aspell_speller_suggest(Speller * ths, const char * word, int word_size)
  2210. {
  2211. ths->temp_str_0.clear();
  2212. ths->to_internal_->convert(word, word_size, ths->temp_str_0);
  2213. @@ -153,7 +154,7 @@
  2214. return ret.data;
  2215. }
  2216.  
  2217. -extern "C" int aspell_speller_store_replacement(Speller * ths, const char * mis, int mis_size, const char * cor, int cor_size)
  2218. +extern "C" ASPELL_EXPORT int aspell_speller_store_replacement(Speller * ths, const char * mis, int mis_size, const char * cor, int cor_size)
  2219. {
  2220. ths->temp_str_0.clear();
  2221. ths->to_internal_->convert(mis, mis_size, ths->temp_str_0);
  2222. diff -Nru aspell-0.60.6.orig/lib/string_enumeration-c.cpp aspell-0.60.6/lib/string_enumeration-c.cpp
  2223. --- aspell-0.60.6.orig/lib/string_enumeration-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2224. +++ aspell-0.60.6/lib/string_enumeration-c.cpp 2010-07-26 09:51:53.905613000 +0200
  2225. @@ -1,3 +1,4 @@
  2226. +#include "aspell_export.h"
  2227. /* Automatically generated file. Do not edit directly. */
  2228.  
  2229. /* This file is part of The New Aspell
  2230. @@ -13,27 +14,27 @@
  2231.  
  2232. class StringEnumeration;
  2233.  
  2234. -extern "C" void delete_aspell_string_enumeration(StringEnumeration * ths)
  2235. +extern "C" ASPELL_EXPORT void delete_aspell_string_enumeration(StringEnumeration * ths)
  2236. {
  2237. delete ths;
  2238. }
  2239.  
  2240. -extern "C" StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths)
  2241. +extern "C" ASPELL_EXPORT StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths)
  2242. {
  2243. return ths->clone();
  2244. }
  2245.  
  2246. -extern "C" void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other)
  2247. +extern "C" ASPELL_EXPORT void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other)
  2248. {
  2249. ths->assign(other);
  2250. }
  2251.  
  2252. -extern "C" int aspell_string_enumeration_at_end(const StringEnumeration * ths)
  2253. +extern "C" ASPELL_EXPORT int aspell_string_enumeration_at_end(const StringEnumeration * ths)
  2254. {
  2255. return ths->at_end();
  2256. }
  2257.  
  2258. -extern "C" const char * aspell_string_enumeration_next(StringEnumeration * ths)
  2259. +extern "C" ASPELL_EXPORT const char * aspell_string_enumeration_next(StringEnumeration * ths)
  2260. {
  2261. const char * s = ths->next();
  2262. if (s == 0 || ths->from_internal_ == 0) {
  2263. diff -Nru aspell-0.60.6.orig/lib/string_list-c.cpp aspell-0.60.6/lib/string_list-c.cpp
  2264. --- aspell-0.60.6.orig/lib/string_list-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2265. +++ aspell-0.60.6/lib/string_list-c.cpp 2010-07-26 09:51:53.995618100 +0200
  2266. @@ -1,3 +1,4 @@
  2267. +#include "aspell_export.h"
  2268. /* Automatically generated file. Do not edit directly. */
  2269.  
  2270. /* This file is part of The New Aspell
  2271. @@ -15,57 +16,57 @@
  2272. class StringEnumeration;
  2273. class StringList;
  2274.  
  2275. -extern "C" StringList * new_aspell_string_list()
  2276. +extern "C" ASPELL_EXPORT StringList * new_aspell_string_list()
  2277. {
  2278. return new_string_list();
  2279. }
  2280.  
  2281. -extern "C" int aspell_string_list_empty(const StringList * ths)
  2282. +extern "C" ASPELL_EXPORT int aspell_string_list_empty(const StringList * ths)
  2283. {
  2284. return ths->empty();
  2285. }
  2286.  
  2287. -extern "C" unsigned int aspell_string_list_size(const StringList * ths)
  2288. +extern "C" ASPELL_EXPORT unsigned int aspell_string_list_size(const StringList * ths)
  2289. {
  2290. return ths->size();
  2291. }
  2292.  
  2293. -extern "C" StringEnumeration * aspell_string_list_elements(const StringList * ths)
  2294. +extern "C" ASPELL_EXPORT StringEnumeration * aspell_string_list_elements(const StringList * ths)
  2295. {
  2296. return ths->elements();
  2297. }
  2298.  
  2299. -extern "C" int aspell_string_list_add(StringList * ths, const char * to_add)
  2300. +extern "C" ASPELL_EXPORT int aspell_string_list_add(StringList * ths, const char * to_add)
  2301. {
  2302. return ths->add(to_add);
  2303. }
  2304.  
  2305. -extern "C" int aspell_string_list_remove(StringList * ths, const char * to_rem)
  2306. +extern "C" ASPELL_EXPORT int aspell_string_list_remove(StringList * ths, const char * to_rem)
  2307. {
  2308. return ths->remove(to_rem);
  2309. }
  2310.  
  2311. -extern "C" void aspell_string_list_clear(StringList * ths)
  2312. +extern "C" ASPELL_EXPORT void aspell_string_list_clear(StringList * ths)
  2313. {
  2314. ths->clear();
  2315. }
  2316.  
  2317. -extern "C" MutableContainer * aspell_string_list_to_mutable_container(StringList * ths)
  2318. +extern "C" ASPELL_EXPORT MutableContainer * aspell_string_list_to_mutable_container(StringList * ths)
  2319. {
  2320. return ths;
  2321. }
  2322.  
  2323. -extern "C" void delete_aspell_string_list(StringList * ths)
  2324. +extern "C" ASPELL_EXPORT void delete_aspell_string_list(StringList * ths)
  2325. {
  2326. delete ths;
  2327. }
  2328.  
  2329. -extern "C" StringList * aspell_string_list_clone(const StringList * ths)
  2330. +extern "C" ASPELL_EXPORT StringList * aspell_string_list_clone(const StringList * ths)
  2331. {
  2332. return ths->clone();
  2333. }
  2334.  
  2335. -extern "C" void aspell_string_list_assign(StringList * ths, const StringList * other)
  2336. +extern "C" ASPELL_EXPORT void aspell_string_list_assign(StringList * ths, const StringList * other)
  2337. {
  2338. ths->assign(other);
  2339. }
  2340. diff -Nru aspell-0.60.6.orig/lib/string_map-c.cpp aspell-0.60.6/lib/string_map-c.cpp
  2341. --- aspell-0.60.6.orig/lib/string_map-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2342. +++ aspell-0.60.6/lib/string_map-c.cpp 2010-07-26 09:51:53.687600500 +0200
  2343. @@ -1,3 +1,4 @@
  2344. +#include "aspell_export.h"
  2345. /* Automatically generated file. Do not edit directly. */
  2346.  
  2347. /* This file is part of The New Aspell
  2348. @@ -15,72 +16,72 @@
  2349. class StringMap;
  2350. class StringPairEnumeration;
  2351.  
  2352. -extern "C" StringMap * new_aspell_string_map()
  2353. +extern "C" ASPELL_EXPORT StringMap * new_aspell_string_map()
  2354. {
  2355. return new_string_map();
  2356. }
  2357.  
  2358. -extern "C" int aspell_string_map_add(StringMap * ths, const char * to_add)
  2359. +extern "C" ASPELL_EXPORT int aspell_string_map_add(StringMap * ths, const char * to_add)
  2360. {
  2361. return ths->add(to_add);
  2362. }
  2363.  
  2364. -extern "C" int aspell_string_map_remove(StringMap * ths, const char * to_rem)
  2365. +extern "C" ASPELL_EXPORT int aspell_string_map_remove(StringMap * ths, const char * to_rem)
  2366. {
  2367. return ths->remove(to_rem);
  2368. }
  2369.  
  2370. -extern "C" void aspell_string_map_clear(StringMap * ths)
  2371. +extern "C" ASPELL_EXPORT void aspell_string_map_clear(StringMap * ths)
  2372. {
  2373. ths->clear();
  2374. }
  2375.  
  2376. -extern "C" MutableContainer * aspell_string_map_to_mutable_container(StringMap * ths)
  2377. +extern "C" ASPELL_EXPORT MutableContainer * aspell_string_map_to_mutable_container(StringMap * ths)
  2378. {
  2379. return ths;
  2380. }
  2381.  
  2382. -extern "C" void delete_aspell_string_map(StringMap * ths)
  2383. +extern "C" ASPELL_EXPORT void delete_aspell_string_map(StringMap * ths)
  2384. {
  2385. delete ths;
  2386. }
  2387.  
  2388. -extern "C" StringMap * aspell_string_map_clone(const StringMap * ths)
  2389. +extern "C" ASPELL_EXPORT StringMap * aspell_string_map_clone(const StringMap * ths)
  2390. {
  2391. return ths->clone();
  2392. }
  2393.  
  2394. -extern "C" void aspell_string_map_assign(StringMap * ths, const StringMap * other)
  2395. +extern "C" ASPELL_EXPORT void aspell_string_map_assign(StringMap * ths, const StringMap * other)
  2396. {
  2397. ths->assign(other);
  2398. }
  2399.  
  2400. -extern "C" int aspell_string_map_empty(const StringMap * ths)
  2401. +extern "C" ASPELL_EXPORT int aspell_string_map_empty(const StringMap * ths)
  2402. {
  2403. return ths->empty();
  2404. }
  2405.  
  2406. -extern "C" unsigned int aspell_string_map_size(const StringMap * ths)
  2407. +extern "C" ASPELL_EXPORT unsigned int aspell_string_map_size(const StringMap * ths)
  2408. {
  2409. return ths->size();
  2410. }
  2411.  
  2412. -extern "C" StringPairEnumeration * aspell_string_map_elements(const StringMap * ths)
  2413. +extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_string_map_elements(const StringMap * ths)
  2414. {
  2415. return ths->elements();
  2416. }
  2417.  
  2418. -extern "C" int aspell_string_map_insert(StringMap * ths, const char * key, const char * value)
  2419. +extern "C" ASPELL_EXPORT int aspell_string_map_insert(StringMap * ths, const char * key, const char * value)
  2420. {
  2421. return ths->insert(key, value);
  2422. }
  2423.  
  2424. -extern "C" int aspell_string_map_replace(StringMap * ths, const char * key, const char * value)
  2425. +extern "C" ASPELL_EXPORT int aspell_string_map_replace(StringMap * ths, const char * key, const char * value)
  2426. {
  2427. return ths->replace(key, value);
  2428. }
  2429.  
  2430. -extern "C" const char * aspell_string_map_lookup(const StringMap * ths, const char * key)
  2431. +extern "C" ASPELL_EXPORT const char * aspell_string_map_lookup(const StringMap * ths, const char * key)
  2432. {
  2433. return ths->lookup(key);
  2434. }
  2435. diff -Nru aspell-0.60.6.orig/lib/string_pair_enumeration-c.cpp aspell-0.60.6/lib/string_pair_enumeration-c.cpp
  2436. --- aspell-0.60.6.orig/lib/string_pair_enumeration-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2437. +++ aspell-0.60.6/lib/string_pair_enumeration-c.cpp 2010-07-26 09:51:54.208630300 +0200
  2438. @@ -1,3 +1,4 @@
  2439. +#include "aspell_export.h"
  2440. /* Automatically generated file. Do not edit directly. */
  2441.  
  2442. /* This file is part of The New Aspell
  2443. @@ -13,27 +14,27 @@
  2444.  
  2445. class StringPairEnumeration;
  2446.  
  2447. -extern "C" int aspell_string_pair_enumeration_at_end(const StringPairEnumeration * ths)
  2448. +extern "C" ASPELL_EXPORT int aspell_string_pair_enumeration_at_end(const StringPairEnumeration * ths)
  2449. {
  2450. return ths->at_end();
  2451. }
  2452.  
  2453. -extern "C" StringPair aspell_string_pair_enumeration_next(StringPairEnumeration * ths)
  2454. +extern "C" ASPELL_EXPORT StringPair aspell_string_pair_enumeration_next(StringPairEnumeration * ths)
  2455. {
  2456. return ths->next();
  2457. }
  2458.  
  2459. -extern "C" void delete_aspell_string_pair_enumeration(StringPairEnumeration * ths)
  2460. +extern "C" ASPELL_EXPORT void delete_aspell_string_pair_enumeration(StringPairEnumeration * ths)
  2461. {
  2462. delete ths;
  2463. }
  2464.  
  2465. -extern "C" StringPairEnumeration * aspell_string_pair_enumeration_clone(const StringPairEnumeration * ths)
  2466. +extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_string_pair_enumeration_clone(const StringPairEnumeration * ths)
  2467. {
  2468. return ths->clone();
  2469. }
  2470.  
  2471. -extern "C" void aspell_string_pair_enumeration_assign(StringPairEnumeration * ths, const StringPairEnumeration * other)
  2472. +extern "C" ASPELL_EXPORT void aspell_string_pair_enumeration_assign(StringPairEnumeration * ths, const StringPairEnumeration * other)
  2473. {
  2474. ths->assign(other);
  2475. }
  2476. diff -Nru aspell-0.60.6.orig/lib/word_list-c.cpp aspell-0.60.6/lib/word_list-c.cpp
  2477. --- aspell-0.60.6.orig/lib/word_list-c.cpp 2008-04-07 06:31:19.000000000 +0200
  2478. +++ aspell-0.60.6/lib/word_list-c.cpp 2010-07-26 09:51:53.065564900 +0200
  2479. @@ -1,3 +1,4 @@
  2480. +#include "aspell_export.h"
  2481. /* Automatically generated file. Do not edit directly. */
  2482.  
  2483. /* This file is part of The New Aspell
  2484. @@ -14,17 +15,17 @@
  2485. class StringEnumeration;
  2486. class WordList;
  2487.  
  2488. -extern "C" int aspell_word_list_empty(const WordList * ths)
  2489. +extern "C" ASPELL_EXPORT int aspell_word_list_empty(const WordList * ths)
  2490. {
  2491. return ths->empty();
  2492. }
  2493.  
  2494. -extern "C" unsigned int aspell_word_list_size(const WordList * ths)
  2495. +extern "C" ASPELL_EXPORT unsigned int aspell_word_list_size(const WordList * ths)
  2496. {
  2497. return ths->size();
  2498. }
  2499.  
  2500. -extern "C" StringEnumeration * aspell_word_list_elements(const WordList * ths)
  2501. +extern "C" ASPELL_EXPORT StringEnumeration * aspell_word_list_elements(const WordList * ths)
  2502. {
  2503. StringEnumeration * els = ths->elements();
  2504. els->from_internal_ = ths->from_internal_;
  2505. diff -Nru aspell-0.60.6.orig/modules/speller/default/affix.hpp aspell-0.60.6/modules/speller/default/affix.hpp
  2506. --- aspell-0.60.6.orig/modules/speller/default/affix.hpp 2007-12-03 02:51:23.000000000 +0100
  2507. +++ aspell-0.60.6/modules/speller/default/affix.hpp 2010-07-26 09:49:01.874874400 +0200
  2508. @@ -19,6 +19,8 @@
  2509. #include "char_vector.hpp"
  2510. #include "objstack.hpp"
  2511.  
  2512. +#include "aspell_export.h"
  2513. +
  2514. #define SETSIZE 256
  2515. #define MAXAFFIXES 256
  2516. #define MAXWORDLEN 255
  2517. @@ -58,7 +60,7 @@
  2518.  
  2519. enum CheckAffixRes {InvalidAffix, InapplicableAffix, ValidAffix};
  2520.  
  2521. - class AffixMgr
  2522. + class ASPELL_EXPORT AffixMgr
  2523. {
  2524. const Language * lang;
  2525.  
  2526. diff -Nru aspell-0.60.6.orig/modules/speller/default/data.hpp aspell-0.60.6/modules/speller/default/data.hpp
  2527. --- aspell-0.60.6.orig/modules/speller/default/data.hpp 2004-05-24 06:50:27.000000000 +0200
  2528. +++ aspell-0.60.6/modules/speller/default/data.hpp 2010-07-26 09:49:01.891875400 +0200
  2529. @@ -15,6 +15,8 @@
  2530. #include "cache.hpp"
  2531. #include "wordinfo.hpp"
  2532.  
  2533. +#include "aspell_export.h"
  2534. +
  2535. using namespace acommon;
  2536.  
  2537. namespace acommon {
  2538. @@ -31,7 +33,7 @@
  2539. typedef Enumeration<WordEntry *> WordEntryEnumeration;
  2540. typedef Enumeration<Dictionary *> DictsEnumeration;
  2541.  
  2542. - class SoundslikeEnumeration
  2543. + class ASPELL_EXPORT SoundslikeEnumeration
  2544. {
  2545. public:
  2546. virtual WordEntry * next(int) = 0;
  2547. @@ -170,7 +172,7 @@
  2548. return !(rhs == lhs);
  2549. }
  2550.  
  2551. - class DictList {
  2552. + class ASPELL_EXPORT DictList {
  2553. // well a stack at the moment but it may eventually become a list
  2554. // NOT necessarily first in first out
  2555. Vector<Dict *> data;
  2556. @@ -195,7 +197,7 @@
  2557. static const DataType DT_Any = 0xFF;
  2558.  
  2559. // any new extra dictionaries that were loaded will be ii
  2560. - PosibErr<Dict *> add_data_set(ParmString file_name,
  2561. + PosibErr<Dict *> ASPELL_EXPORT add_data_set(ParmString file_name,
  2562. Config &,
  2563. DictList * other_dicts = 0,
  2564. SpellerImpl * = 0,
  2565. @@ -203,19 +205,19 @@
  2566. DataType allowed = DT_Any);
  2567.  
  2568. // implemented in readonly_ws.cc
  2569. - Dictionary * new_default_readonly_dict();
  2570. + ASPELL_EXPORT Dictionary * new_default_readonly_dict();
  2571.  
  2572. - PosibErr<void> create_default_readonly_dict(StringEnumeration * els,
  2573. + PosibErr<void> ASPELL_EXPORT create_default_readonly_dict(StringEnumeration * els,
  2574. Config & config);
  2575.  
  2576. // implemented in multi_ws.cc
  2577. - MultiDict * new_default_multi_dict();
  2578. + ASPELL_EXPORT MultiDict * new_default_multi_dict();
  2579.  
  2580. // implemented in writable.cpp
  2581. - Dictionary * new_default_writable_dict();
  2582. + ASPELL_EXPORT Dictionary * new_default_writable_dict();
  2583.  
  2584. // implemented in writable.cpp
  2585. - ReplacementDict * new_default_replacement_dict();
  2586. + ASPELL_EXPORT ReplacementDict * new_default_replacement_dict();
  2587. }
  2588.  
  2589. #endif
  2590. diff -Nru aspell-0.60.6.orig/modules/speller/default/language.cpp aspell-0.60.6/modules/speller/default/language.cpp
  2591. --- aspell-0.60.6.orig/modules/speller/default/language.cpp 2005-02-20 22:47:07.000000000 +0100
  2592. +++ aspell-0.60.6/modules/speller/default/language.cpp 2010-07-26 09:49:01.914876700 +0200
  2593. @@ -26,6 +26,10 @@
  2594.  
  2595. #include "gettext.h"
  2596.  
  2597. +#ifdef _MSC_VER
  2598. +#define snprintf _snprintf
  2599. +#endif
  2600. +
  2601. namespace aspeller {
  2602.  
  2603. static const char TO_CHAR_TYPE[256] = {
  2604. diff -Nru aspell-0.60.6.orig/modules/speller/default/language.hpp aspell-0.60.6/modules/speller/default/language.hpp
  2605. --- aspell-0.60.6.orig/modules/speller/default/language.hpp 2005-02-20 22:47:08.000000000 +0100
  2606. +++ aspell-0.60.6/modules/speller/default/language.hpp 2010-07-26 09:49:01.933877800 +0200
  2607. @@ -14,6 +14,8 @@
  2608. #include "objstack.hpp"
  2609. #include "string_enumeration.hpp"
  2610.  
  2611. +#include "aspell_export.h"
  2612. +
  2613. #include "iostream.hpp"
  2614.  
  2615. using namespace acommon;
  2616. @@ -60,7 +62,7 @@
  2617.  
  2618. enum StoreAs {Stripped, Lower};
  2619.  
  2620. - class Language : public Cacheable {
  2621. + class ASPELL_EXPORT Language : public Cacheable {
  2622. public:
  2623. typedef const Config CacheConfig;
  2624. typedef String CacheKey;
  2625. @@ -424,7 +426,7 @@
  2626. char * operator() (ParmStr word, char * aff);
  2627. };
  2628.  
  2629. - class WordListIterator
  2630. + class ASPELL_EXPORT WordListIterator
  2631. {
  2632. public:
  2633. struct Value {
  2634. @@ -458,18 +460,18 @@
  2635. CleanAffix clean_affix;
  2636. };
  2637.  
  2638. - String get_stripped_chars(const Language & l);
  2639. + String ASPELL_EXPORT get_stripped_chars(const Language & l);
  2640.  
  2641. - String get_clean_chars(const Language & l);
  2642. + String ASPELL_EXPORT get_clean_chars(const Language & l);
  2643.  
  2644. - PosibErr<void> check_if_valid(const Language & l, ParmStr word);
  2645. - PosibErr<void> validate_affix(const Language & l, ParmStr word, ParmStr aff);
  2646. + PosibErr<void> ASPELL_EXPORT check_if_valid(const Language & l, ParmStr word);
  2647. + PosibErr<void> ASPELL_EXPORT validate_affix(const Language & l, ParmStr word, ParmStr aff);
  2648.  
  2649. - bool find_language(Config & c);
  2650. + bool ASPELL_EXPORT find_language(Config & c);
  2651.  
  2652. - PosibErr<Language *> new_language(const Config &, ParmStr lang = 0);
  2653. + PosibErr<Language *> ASPELL_EXPORT new_language(const Config &, ParmStr lang = 0);
  2654.  
  2655. - PosibErr<void> open_affix_file(const Config &, FStream & o);
  2656. + PosibErr<void> ASPELL_EXPORT open_affix_file(const Config &, FStream & o);
  2657. }
  2658.  
  2659.  
  2660. diff -Nru aspell-0.60.6.orig/modules/speller/default/speller_impl.hpp aspell-0.60.6/modules/speller/default/speller_impl.hpp
  2661. --- aspell-0.60.6.orig/modules/speller/default/speller_impl.hpp 2007-10-13 10:20:17.000000000 +0200
  2662. +++ aspell-0.60.6/modules/speller/default/speller_impl.hpp 2010-07-26 09:49:01.953878900 +0200
  2663. @@ -27,7 +27,7 @@
  2664. namespace aspeller {
  2665.  
  2666. class Language;
  2667. - class SensitiveCompare;
  2668. + struct SensitiveCompare;
  2669. class Suggest;
  2670.  
  2671. enum SpecialId {main_id, personal_id, session_id,
  2672. diff -Nru aspell-0.60.6.orig/modules/speller/default/wordinfo.hpp aspell-0.60.6/modules/speller/default/wordinfo.hpp
  2673. --- aspell-0.60.6.orig/modules/speller/default/wordinfo.hpp 2004-05-24 06:50:29.000000000 +0200
  2674. +++ aspell-0.60.6/modules/speller/default/wordinfo.hpp 2010-07-26 09:49:01.967879700 +0200
  2675. @@ -6,6 +6,8 @@
  2676. #include <assert.h>
  2677. #include "string.hpp"
  2678.  
  2679. +#include "aspell_export.h"
  2680. +
  2681. namespace acommon {
  2682. class OStream;
  2683. class Convert;
  2684. @@ -35,7 +37,7 @@
  2685. struct ConvertWord;
  2686.  
  2687. // WordEntry is an entry in the dictionary.
  2688. - struct WordEntry
  2689. + struct ASPELL_EXPORT WordEntry
  2690. {
  2691. const char * word;
  2692. const char * aff;
  2693. diff -Nru aspell-0.60.6.orig/symbols.def aspell-0.60.6/symbols.def
  2694. --- aspell-0.60.6.orig/symbols.def 1970-01-01 01:00:00.000000000 +0100
  2695. +++ aspell-0.60.6/symbols.def 2010-07-26 09:49:01.983880600 +0200
  2696. @@ -0,0 +1,210 @@
  2697. +LIBRARY aspell.DLL
  2698. +EXPORTS
  2699. +aerror_affix
  2700. +aerror_bad_file_format
  2701. +aerror_bad_input
  2702. +aerror_bad_key
  2703. +aerror_bad_magic
  2704. +aerror_bad_mode_key
  2705. +aerror_bad_mode_version
  2706. +aerror_bad_value
  2707. +aerror_bad_version
  2708. +aerror_bad_version_string
  2709. +aerror_cant_change_value
  2710. +aerror_cant_copy
  2711. +aerror_cant_create_pipe
  2712. +aerror_cant_describe_filter
  2713. +aerror_cant_dlopen_file
  2714. +aerror_cant_open_file
  2715. +aerror_cant_read_dir
  2716. +aerror_cant_read_file
  2717. +aerror_cant_write_file
  2718. +aerror_config
  2719. +aerror_conflicting_flags
  2720. +aerror_confusing_mode_version
  2721. +aerror_confusing_version
  2722. +aerror_conversion_not_supported
  2723. +aerror_corrupt_affix
  2724. +aerror_dir
  2725. +aerror_duplicate
  2726. +aerror_empty_file_ext
  2727. +aerror_empty_filter
  2728. +aerror_encoding
  2729. +aerror_encoding_not_supported
  2730. +aerror_expect_mode_key
  2731. +aerror_expression
  2732. +aerror_file
  2733. +aerror_file_magic_pos
  2734. +aerror_file_magic_range
  2735. +aerror_filter
  2736. +aerror_filter_mode_expand
  2737. +aerror_filter_mode_file
  2738. +aerror_filter_mode_magic
  2739. +aerror_identical_option
  2740. +aerror_inapplicable_affix
  2741. +aerror_incorrect_encoding
  2742. +aerror_invalid_affix
  2743. +aerror_invalid_cond
  2744. +aerror_invalid_cond_strip
  2745. +aerror_invalid_expression
  2746. +aerror_invalid_flag
  2747. +aerror_invalid_name
  2748. +aerror_invalid_option_modifier
  2749. +aerror_invalid_string
  2750. +aerror_invalid_word
  2751. +aerror_key_not_bool
  2752. +aerror_key_not_int
  2753. +aerror_key_not_list
  2754. +aerror_key_not_string
  2755. +aerror_language_not_supported
  2756. +aerror_language_related
  2757. +aerror_mismatched_language
  2758. +aerror_missing_magic
  2759. +aerror_missing_magic_expression
  2760. +aerror_mode_extend_expand
  2761. +aerror_mode_option_name
  2762. +aerror_mode_version_requirement
  2763. +aerror_no_filter_to_option
  2764. +aerror_no_such_filter
  2765. +aerror_no_value_clear
  2766. +aerror_no_value_disable
  2767. +aerror_no_value_enable
  2768. +aerror_no_value_reset
  2769. +aerror_no_wordlist_for_lang
  2770. +aerror_operation_not_supported
  2771. +aerror_options_only
  2772. +aerror_other
  2773. +aerror_pipe
  2774. +aerror_process_died
  2775. +aerror_unimplemented_method
  2776. +aerror_unknown_encoding
  2777. +aerror_unknown_key
  2778. +aerror_unknown_language
  2779. +aerror_unknown_mode
  2780. +aerror_unknown_soundslike
  2781. +aerror_unknown_unichar
  2782. +aerror_version_control
  2783. +aerror_word_list_flags
  2784. +aspell_config_assign
  2785. +aspell_config_clone
  2786. +aspell_config_elements
  2787. +aspell_config_error
  2788. +aspell_config_error_message
  2789. +aspell_config_error_number
  2790. +aspell_config_get_default
  2791. +aspell_config_have
  2792. +aspell_config_keyinfo
  2793. +aspell_config_possible_elements
  2794. +aspell_config_remove
  2795. +aspell_config_replace
  2796. +aspell_config_retrieve
  2797. +aspell_config_retrieve_bool
  2798. +aspell_config_retrieve_int
  2799. +aspell_config_retrieve_list
  2800. +aspell_config_set_extra
  2801. +aspell_dict_info_enumeration_assign
  2802. +aspell_dict_info_enumeration_at_end
  2803. +aspell_dict_info_enumeration_clone
  2804. +aspell_dict_info_enumeration_next
  2805. +aspell_dict_info_list_elements
  2806. +aspell_dict_info_list_empty
  2807. +aspell_dict_info_list_size
  2808. +aspell_document_checker_error
  2809. +aspell_document_checker_error_message
  2810. +aspell_document_checker_error_number
  2811. +aspell_document_checker_filter
  2812. +aspell_document_checker_next_misspelling
  2813. +aspell_document_checker_process
  2814. +aspell_document_checker_reset
  2815. +aspell_error
  2816. +aspell_error_is_a
  2817. +aspell_error_message
  2818. +aspell_error_number
  2819. +aspell_filter_error
  2820. +aspell_filter_error_message
  2821. +aspell_filter_error_number
  2822. +aspell_gettext_init
  2823. +aspell_key_info_enumeration_assign
  2824. +aspell_key_info_enumeration_at_end
  2825. +aspell_key_info_enumeration_clone
  2826. +aspell_key_info_enumeration_next
  2827. +aspell_module_info_enumeration_assign
  2828. +aspell_module_info_enumeration_at_end
  2829. +aspell_module_info_enumeration_clone
  2830. +aspell_module_info_enumeration_next
  2831. +aspell_module_info_list_elements
  2832. +aspell_module_info_list_empty
  2833. +aspell_module_info_list_size
  2834. +aspell_mutable_container_add
  2835. +aspell_mutable_container_clear
  2836. +aspell_mutable_container_remove
  2837. +aspell_mutable_container_to_mutable_container
  2838. +aspell_speller_add_to_personal
  2839. +aspell_speller_add_to_session
  2840. +aspell_speller_check
  2841. +aspell_speller_clear_session
  2842. +aspell_speller_config
  2843. +aspell_speller_error
  2844. +aspell_speller_error_message
  2845. +aspell_speller_error_number
  2846. +aspell_speller_main_word_list
  2847. +aspell_speller_personal_word_list
  2848. +aspell_speller_save_all_word_lists
  2849. +aspell_speller_session_word_list
  2850. +aspell_speller_store_replacement
  2851. +aspell_speller_suggest
  2852. +aspell_string_enumeration_assign
  2853. +aspell_string_enumeration_at_end
  2854. +aspell_string_enumeration_clone
  2855. +aspell_string_enumeration_next
  2856. +aspell_string_list_add
  2857. +aspell_string_list_assign
  2858. +aspell_string_list_clear
  2859. +aspell_string_list_clone
  2860. +aspell_string_list_elements
  2861. +aspell_string_list_empty
  2862. +aspell_string_list_remove
  2863. +aspell_string_list_size
  2864. +aspell_string_list_to_mutable_container
  2865. +aspell_string_map_add
  2866. +aspell_string_map_assign
  2867. +aspell_string_map_clear
  2868. +aspell_string_map_clone
  2869. +aspell_string_map_elements
  2870. +aspell_string_map_empty
  2871. +aspell_string_map_insert
  2872. +aspell_string_map_lookup
  2873. +aspell_string_map_remove
  2874. +aspell_string_map_replace
  2875. +aspell_string_map_size
  2876. +aspell_string_map_to_mutable_container
  2877. +aspell_string_pair_enumeration_assign
  2878. +aspell_string_pair_enumeration_at_end
  2879. +aspell_string_pair_enumeration_clone
  2880. +aspell_string_pair_enumeration_next
  2881. +aspell_word_list_elements
  2882. +aspell_word_list_empty
  2883. +aspell_word_list_size
  2884. +delete_aspell_can_have_error
  2885. +delete_aspell_config
  2886. +delete_aspell_dict_info_enumeration
  2887. +delete_aspell_document_checker
  2888. +delete_aspell_filter
  2889. +delete_aspell_key_info_enumeration
  2890. +delete_aspell_module_info_enumeration
  2891. +delete_aspell_speller
  2892. +delete_aspell_string_enumeration
  2893. +delete_aspell_string_list
  2894. +delete_aspell_string_map
  2895. +delete_aspell_string_pair_enumeration
  2896. +get_aspell_dict_info_list
  2897. +get_aspell_module_info_list
  2898. +new_aspell_config
  2899. +new_aspell_document_checker
  2900. +new_aspell_speller
  2901. +new_aspell_string_list
  2902. +new_aspell_string_map
  2903. +;perror_bad_file_format
  2904. +to_aspell_document_checker
  2905. +to_aspell_filter
  2906. +to_aspell_speller
  2907. diff -Nru aspell-0.60.6.orig/win32/dirent.c aspell-0.60.6/win32/dirent.c
  2908. --- aspell-0.60.6.orig/win32/dirent.c 1970-01-01 01:00:00.000000000 +0100
  2909. +++ aspell-0.60.6/win32/dirent.c 2010-07-26 09:49:02.000881600 +0200
  2910. @@ -0,0 +1,149 @@
  2911. +/* ====================================================================
  2912. + * The Apache Software License, Version 1.1
  2913. + *
  2914. + * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
  2915. + * reserved.
  2916. + *
  2917. + * Redistribution and use in source and binary forms, with or without
  2918. + * modification, are permitted provided that the following conditions
  2919. + * are met:
  2920. + *
  2921. + * 1. Redistributions of source code must retain the above copyright
  2922. + * notice, this list of conditions and the following disclaimer.
  2923. + *
  2924. + * 2. Redistributions in binary form must reproduce the above copyright
  2925. + * notice, this list of conditions and the following disclaimer in
  2926. + * the documentation and/or other materials provided with the
  2927. + * distribution.
  2928. + *
  2929. + * 3. The end-user documentation included with the redistribution,
  2930. + * if any, must include the following acknowledgment:
  2931. + * "This product includes software developed by the
  2932. + * Apache Software Foundation (http://www.apache.org/)."
  2933. + * Alternately, this acknowledgment may appear in the software itself,
  2934. + * if and wherever such third-party acknowledgments normally appear.
  2935. + *
  2936. + * 4. The names "Apache" and "Apache Software Foundation" must
  2937. + * not be used to endorse or promote products derived from this
  2938. + * software without prior written permission. For written
  2939. + * permission, please contact apache@apache.org.
  2940. + *
  2941. + * 5. Products derived from this software may not be called "Apache",
  2942. + * nor may "Apache" appear in their name, without prior written
  2943. + * permission of the Apache Software Foundation.
  2944. + *
  2945. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  2946. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  2947. + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  2948. + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  2949. + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  2950. + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2951. + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  2952. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  2953. + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  2954. + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  2955. + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2956. + * SUCH DAMAGE.
  2957. + * ====================================================================
  2958. + *
  2959. + * This software consists of voluntary contributions made by many
  2960. + * individuals on behalf of the Apache Software Foundation. For more
  2961. + * information on the Apache Software Foundation, please see
  2962. + * <http://www.apache.org/>.
  2963. + *
  2964. + * Portions of this software are based upon public domain software
  2965. + * originally written at the National Center for Supercomputing Applications,
  2966. + * University of Illinois, Urbana-Champaign.
  2967. + */
  2968. +
  2969. +#include <windows.h>
  2970. +
  2971. +#include <malloc.h>
  2972. +#include <string.h>
  2973. +#include <errno.h>
  2974. +
  2975. +#include "dirent.h"
  2976. +
  2977. +/**********************************************************************
  2978. + * Implement dirent-style opendir/readdir/closedir on Window 95/NT
  2979. + *
  2980. + * Functions defined are opendir(), readdir() and closedir() with the
  2981. + * same prototypes as the normal dirent.h implementation.
  2982. + *
  2983. + * Does not implement telldir(), seekdir(), rewinddir() or scandir().
  2984. + * The dirent struct is compatible with Unix, except that d_ino is
  2985. + * always 1 and d_off is made up as we go along.
  2986. + *
  2987. + * The DIR typedef is not compatible with Unix.
  2988. + **********************************************************************/
  2989. +
  2990. +#ifndef __MINGW32__
  2991. +
  2992. +DIR * opendir(const char *dir)
  2993. +{
  2994. + DIR *dp;
  2995. + char *filespec;
  2996. + long handle;
  2997. + int index;
  2998. +
  2999. + filespec = malloc(strlen(dir) + 2 + 1);
  3000. + strcpy(filespec, dir);
  3001. + index = strlen(filespec) - 1;
  3002. + if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\'))
  3003. + filespec[index] = '\0';
  3004. + strcat(filespec, "\\*");
  3005. +
  3006. + dp = (DIR *)malloc(sizeof(DIR));
  3007. + dp->offset = 0;
  3008. + dp->finished = 0;
  3009. + dp->dir = strdup(dir);
  3010. +
  3011. + if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0) {
  3012. + if (errno == ENOENT)
  3013. + dp->finished = 1;
  3014. + else
  3015. + return NULL;
  3016. + }
  3017. +
  3018. + dp->handle = handle;
  3019. + free(filespec);
  3020. +
  3021. + return dp;
  3022. +}
  3023. +
  3024. +struct dirent * readdir(DIR *dp)
  3025. +{
  3026. + if (!dp || dp->finished) return NULL;
  3027. +
  3028. + if (dp->offset != 0) {
  3029. + if (_findnext(dp->handle, &(dp->fileinfo)) < 0) {
  3030. + dp->finished = 1;
  3031. + /* posix does not set errno in this case */
  3032. + errno = 0;
  3033. + return NULL;
  3034. + }
  3035. + }
  3036. + dp->offset++;
  3037. +
  3038. + strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME);
  3039. +#ifdef ASPELL_HAVE_DIRENT_D_TYPE
  3040. + dp->dent.d_type = DT_UNKNOWN;
  3041. +#endif
  3042. + dp->dent.d_ino = 1;
  3043. + dp->dent.d_reclen = strlen(dp->dent.d_name);
  3044. + dp->dent.d_off = dp->offset;
  3045. +
  3046. + return &(dp->dent);
  3047. +}
  3048. +
  3049. +int closedir(DIR *dp)
  3050. +{
  3051. + if (!dp) return 0;
  3052. + if ((HANDLE)dp->handle != INVALID_HANDLE_VALUE) _findclose(dp->handle);
  3053. + if (dp->dir) free(dp->dir);
  3054. + if (dp) free(dp);
  3055. +
  3056. + return 0;
  3057. +}
  3058. +
  3059. +#endif // #ifndef __MINGW32__
  3060. diff -Nru aspell-0.60.6.orig/win32/dirent.h aspell-0.60.6/win32/dirent.h
  3061. --- aspell-0.60.6.orig/win32/dirent.h 1970-01-01 01:00:00.000000000 +0100
  3062. +++ aspell-0.60.6/win32/dirent.h 2010-07-26 09:49:02.029883300 +0200
  3063. @@ -0,0 +1,112 @@
  3064. +/* This file is part of the KDE project
  3065. + Copyright (C) 2000 Werner Almesberger
  3066. +
  3067. + libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir
  3068. +
  3069. + This program is free software; you can redistribute it and/or
  3070. + modify it under the terms of the GNU Library General Public
  3071. + License as published by the Free Software Foundation; either
  3072. + version 2 of the License, or (at your option) any later version.
  3073. +
  3074. + This program is distributed in the hope that it will be useful,
  3075. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3076. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3077. + Library General Public License for more details.
  3078. +
  3079. + You should have received a copy of the GNU Library General Public License
  3080. + along with this program; see the file COPYING. If not, write to
  3081. + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  3082. + Boston, MA 02110-1301, USA.
  3083. +*/
  3084. +
  3085. +#ifndef ASPELL_DIRENT_H
  3086. +#define ASPELL_DIRENT_H
  3087. +
  3088. +// include everywhere
  3089. +#include <sys/types.h>
  3090. +
  3091. +#include <io.h>
  3092. +#include <stdio.h>
  3093. +#include <stdlib.h>
  3094. +
  3095. +#ifdef __cplusplus
  3096. +extern "C" {
  3097. +#endif
  3098. +
  3099. +#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */
  3100. +#define HAVE_DD_LOCK /* have locking mechanism */
  3101. +
  3102. +#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */
  3103. +
  3104. +#define __dirfd(dir) (dir)->dd_fd
  3105. +
  3106. +// this one should come from unistd.h originally, but it is easier to put it here:
  3107. +#define F_OK 0
  3108. +#define ASPELL_HAVE_DIRENT_D_TYPE
  3109. +enum
  3110. + {
  3111. + DT_UNKNOWN = 0,
  3112. + DT_FIFO = 1,
  3113. + DT_CHR = 2,
  3114. + DT_DIR = 4,
  3115. + DT_BLK = 6,
  3116. + DT_REG = 8,
  3117. + DT_LNK = 10,
  3118. + DT_SOCK = 12,
  3119. + DT_WHT = 14
  3120. + };
  3121. +
  3122. +/* struct dirent - same as Unix */
  3123. +struct dirent {
  3124. + long d_ino; /* inode (always 1 in WIN32) */
  3125. + off_t d_off; /* offset to this dirent */
  3126. + unsigned short d_reclen; /* length of d_name */
  3127. + unsigned char d_type;
  3128. + char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
  3129. +};
  3130. +
  3131. +/* typedef DIR - not the same as Unix */
  3132. +typedef struct {
  3133. + long handle; /* _findfirst/_findnext handle */
  3134. + short offset; /* offset into directory */
  3135. + short finished; /* 1 if there are not more files */
  3136. + struct _finddata_t fileinfo; /* from _findfirst/_findnext */
  3137. + char *dir; /* the dir we are reading */
  3138. + struct dirent dent; /* the dirent to return */
  3139. +} DIR;
  3140. +
  3141. +/* --- redundant --- */
  3142. +
  3143. +//DIR *opendir(const char *);
  3144. +//struct dirent *readdir(DIR *);
  3145. +//void rewinddir(DIR *);
  3146. +//int closedir(DIR *);
  3147. +
  3148. +/* internal prototype */
  3149. +void _seekdir(DIR *dir,off_t offset);
  3150. +
  3151. +//#ifndef _POSIX_SOURCE
  3152. +//long telldir (DIR *);
  3153. +//void seekdir (DIR *, off_t loc);
  3154. +
  3155. +int scandir (const char *__dir,
  3156. + struct dirent ***__namelist,
  3157. + int (*select) (const struct dirent *),
  3158. + int (*compar) (const struct dirent **, const struct dirent **));
  3159. +
  3160. +DIR * opendir(const char *);
  3161. +int closedir(DIR *);
  3162. +struct dirent* readdir(DIR *);
  3163. +
  3164. +// Implement readdir_r(). For now do not provide dummy function to avoid setting HAVE_READDIR_R.
  3165. +// Code like DirectoryListThread::run() in kio/kio/kurlcompletion.cpp uses readdir() when !HAVE_READDIR_R.
  3166. +
  3167. +// struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
  3168. +
  3169. +int alphasort (const struct dirent **__a, const struct dirent **__b);
  3170. +
  3171. +#ifdef __cplusplus
  3172. +}
  3173. +#endif
  3174. +
  3175. +#endif // ASPELL_DIRENT_H
  3176. diff -Nru aspell-0.60.6.orig/win32/settings.h aspell-0.60.6/win32/settings.h
  3177. --- aspell-0.60.6.orig/win32/settings.h 2006-11-13 08:28:59.000000000 +0100
  3178. +++ aspell-0.60.6/win32/settings.h 2010-07-26 09:49:02.044884100 +0200
  3179. @@ -90,3 +90,5 @@
  3180.  
  3181. /* Version number of package */
  3182. #define VERSION "0.50.3"
  3183. +
  3184. +#define C_EXPORT extern "C" __declspec(dllexport)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement