diff -Nru aspell-0.60.6.orig/cmake/modules/FindWcecompat.cmake aspell-0.60.6/cmake/modules/FindWcecompat.cmake
--- aspell-0.60.6.orig/cmake/modules/FindWcecompat.cmake 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/cmake/modules/FindWcecompat.cmake 2010-07-26 09:48:59.887765200 +0200
@@ -0,0 +1,33 @@
+# Try to find Wcecompat functionality
+# Once done this will define
+#
+# WCECOMPAT_FOUND - system has Wcecompat
+# WCECOMPAT_INCLUDE_DIR - Wcecompat include directory
+# WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat
+#
+# Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+if(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
+ set(Wcecompat_FIND_QUIETLY TRUE)
+endif(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
+
+find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat)
+
+set(WCECOMPAT_LIB_FOUND FALSE)
+
+if(WCECOMPAT_INCLUDE_DIR)
+ find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex )
+
+ if(WCECOMPAT_LIBRARIES)
+ set(WCECOMPAT_LIB_FOUND TRUE)
+ endif(WCECOMPAT_LIBRARIES)
+endif(WCECOMPAT_INCLUDE_DIR)
+
+# I have no idea what this is about, but it seems to be used quite often, so I add this here
+set(WCECOMPAT_CONST const)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND)
+
diff -Nru aspell-0.60.6.orig/CMakeLists.txt aspell-0.60.6/CMakeLists.txt
--- aspell-0.60.6.orig/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/CMakeLists.txt 2010-07-26 09:48:59.903766100 +0200
@@ -0,0 +1,168 @@
+project(aspell)
+
+cmake_minimum_required(VERSION 2.6)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
+
+option(COMPILE_IN_FILTERS "include some filters into the library" ON)
+
+if(WIN32 OR WINCE)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/win32)
+ if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996 -wd4351 -wd4800 -wd4521 -wd4522)
+ endif(MSVC)
+ add_definitions(-DENABLE_WIN32_RELOCATABLE)
+endif(WIN32 OR WINCE)
+
+if(WINCE)
+ find_package(Wcecompat REQUIRED)
+ include_directories(${WCECOMPAT_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${WCECOMPAT_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${WCECOMPAT_LIBRARIES})
+endif(WINCE)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/gen
+ ${CMAKE_CURRENT_SOURCE_DIR}/common
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/speller/default
+)
+
+set(static_optfiles
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/url-filter.info
+)
+
+if(COMPILE_IN_FILTERS)
+ set(static_optfiles
+ ${static_optfiles}
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/email-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/tex-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/sgml-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/html-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/context-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/nroff-filter.info
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter/texinfo-filter.info
+ )
+endif(COMPILE_IN_FILTERS)
+
+
+find_package(Perl REQUIRED)
+
+# $prefix, $data, $lib, $conf
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dirs.h
+ 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)
+
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gen)
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gen/static_filters.src.cpp
+ COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/gen/mk-static-filter.pl ${static_optfiles}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+set(aspell_SRCS
+ common/cache.cpp
+ common/string.cpp
+ common/getdata.cpp
+ common/itemize.cpp
+ common/file_util.cpp
+ common/string_map.cpp
+ common/string_list.cpp
+ common/config.cpp
+ common/posib_err.cpp
+ common/errors.cpp
+ common/error.cpp
+ common/fstream.cpp
+ common/iostream.cpp
+ common/info.cpp
+ common/can_have_error.cpp
+ common/convert.cpp
+ common/tokenizer.cpp
+ common/speller.cpp
+ common/document_checker.cpp
+ common/filter.cpp
+ common/objstack.cpp
+ common/strtonum.cpp
+ common/gettext_init.cpp
+ common/file_data_util.cpp
+ modules/speller/default/readonly_ws.cpp
+ modules/speller/default/suggest.cpp
+ modules/speller/default/data.cpp
+ modules/speller/default/multi_ws.cpp
+ modules/speller/default/phonetic.cpp
+ modules/speller/default/writable.cpp
+ modules/speller/default/speller_impl.cpp
+ modules/speller/default/phonet.cpp
+ modules/speller/default/typo_editdist.cpp
+ modules/speller/default/editdist.cpp
+ modules/speller/default/primes.cpp
+ modules/speller/default/language.cpp
+ modules/speller/default/leditdist.cpp
+ modules/speller/default/affix.cpp
+ modules/tokenizer/basic.cpp
+ 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/new_config.cpp
+ lib/config-c.cpp
+ lib/string_enumeration-c.cpp
+ lib/can_have_error-c.cpp
+ lib/dummy.cpp
+ lib/new_filter.cpp
+ lib/new_fmode.cpp
+ lib/string_list-c.cpp
+ lib/find_speller.cpp
+ lib/speller-c.cpp
+ lib/string_pair_enumeration-c.cpp
+ lib/new_checker.cpp
+ symbols.def
+)
+
+if(COMPILE_IN_FILTERS)
+ set(aspell_SRCS
+ ${aspell_SRCS}
+ modules/filter/url.cpp
+ modules/filter/email.cpp
+ modules/filter/tex.cpp
+ modules/filter/sgml.cpp
+ modules/filter/context.cpp
+ modules/filter/nroff.cpp
+ modules/filter/texinfo.cpp
+ )
+endif(COMPILE_IN_FILTERS)
+
+set_source_files_properties(common/config.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dirs.h)
+set_source_files_properties(lib/new_filter.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gen/static_filters.src.cpp)
+if(MSVC)
+ set(aspell_SRCS
+ win32/dirent.c
+ ${aspell_SRCS}
+ )
+endif(MSVC)
+
+add_library(aspell SHARED ${aspell_SRCS})
+set_target_properties(aspell PROPERTIES DEFINE_SYMBOL MAKE_ASPELL_LIB)
+
+if(WINCE)
+ target_link_libraries(aspell ${WCECOMPAT_LIBRARIES})
+endif(WINCE)
+
+add_library(pspell SHARED lib/dummy.cpp)
+target_link_libraries(pspell aspell)
+
+add_executable(aspell_bin prog/aspell.cpp prog/check_funs.cpp prog/checker_string.cpp)
+target_link_libraries(aspell_bin aspell)
+set_target_properties(aspell_bin PROPERTIES RUNTIME_OUTPUT_NAME aspell)
+
+add_executable(prezip-bin prog/prezip.c)
+
+add_executable(word-list-compress prog/compress.c)
+
+install(TARGETS aspell pspell aspell_bin prezip-bin word-list-compress RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc/aspell.h DESTINATION include)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/cc/aspell.h DESTINATION include/pspell)
diff -Nru aspell-0.60.6.orig/common/aspell_export.h aspell-0.60.6/common/aspell_export.h
--- aspell-0.60.6.orig/common/aspell_export.h 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/common/aspell_export.h 2010-07-26 09:48:59.914766700 +0200
@@ -0,0 +1,22 @@
+// This file is added to The New Aspell
+// Copyright (C) 2010 by Patrick Spendrin under the GNU LGPL license
+// version 2.0 or 2.1. You should have received a copy of the LGPL
+// license along with this library if you did not you can find
+// it at http://www.gnu.org/.
+
+#ifndef ASPELL_EXPORT_HPP
+# define ASPELL_EXPORT_HPP
+
+# ifndef ASPELL_EXPORT // check that it isn't defined (e.g. )
+# if defined(_WIN32) || defined(_WIN64)
+# pragma warning( disable: 4251 )
+# ifdef MAKE_ASPELL_LIB
+# define ASPELL_EXPORT __declspec(dllexport)
+# else
+# define ASPELL_EXPORT __declspec(dllimport)
+# endif
+# endif
+# else
+# define ASPELL_EXPORT
+# endif
+#endif // ASPELL_EXPORT_HPP
\ No newline at end of file
diff -Nru aspell-0.60.6.orig/common/cache-t.hpp aspell-0.60.6/common/cache-t.hpp
--- aspell-0.60.6.orig/common/cache-t.hpp 2004-06-19 08:37:06.000000000 +0200
+++ aspell-0.60.6/common/cache-t.hpp 2010-07-26 09:49:00.739811700 +0200
@@ -8,7 +8,7 @@
namespace acommon {
-class GlobalCacheBase
+class ASPELL_EXPORT GlobalCacheBase
{
public:
mutable Mutex lock;
diff -Nru aspell-0.60.6.orig/common/cache.hpp aspell-0.60.6/common/cache.hpp
--- aspell-0.60.6.orig/common/cache.hpp 2004-06-19 08:37:06.000000000 +0200
+++ aspell-0.60.6/common/cache.hpp 2010-07-26 09:52:38.106114300 +0200
@@ -2,6 +2,7 @@
#define ACOMMON_CACHE__HPP
#include "posib_err.hpp"
+#include "aspell_export.h"
namespace acommon {
@@ -19,13 +20,13 @@
const typename Data::CacheKey &);
class Cacheable;
-void release_cache_data(GlobalCacheBase *, const Cacheable *);
+void ASPELL_EXPORT release_cache_data(GlobalCacheBase *, const Cacheable *);
static inline void release_cache_data(const GlobalCacheBase * c, const Cacheable * d)
{
release_cache_data(const_cast<GlobalCacheBase *>(c),d);
}
-class Cacheable
+class ASPELL_EXPORT Cacheable
{
public: // but don't use
Cacheable * next;
@@ -74,7 +75,7 @@
return no_err;
}
-bool reset_cache(const char * = 0);
+bool ASPELL_EXPORT reset_cache(const char * = 0);
}
diff -Nru aspell-0.60.6.orig/common/can_have_error.hpp aspell-0.60.6/common/can_have_error.hpp
--- aspell-0.60.6.orig/common/can_have_error.hpp 2002-08-26 23:42:05.000000000 +0200
+++ aspell-0.60.6/common/can_have_error.hpp 2010-07-26 09:49:00.813815900 +0200
@@ -7,6 +7,8 @@
#ifndef ASPELL_CAN_HAVE_ERROR__HPP
#define ASPELL_CAN_HAVE_ERROR__HPP
+#include "aspell_export.h"
+
#include "copy_ptr.hpp"
#include "error.hpp"
@@ -14,7 +16,7 @@
struct Error;
-class CanHaveError {
+class ASPELL_EXPORT CanHaveError {
public:
CanHaveError(Error * e = 0);
CopyPtr<Error> err_;
diff -Nru aspell-0.60.6.orig/common/config.hpp aspell-0.60.6/common/config.hpp
--- aspell-0.60.6.orig/common/config.hpp 2004-11-18 03:01:53.000000000 +0100
+++ aspell-0.60.6/common/config.hpp 2010-07-26 09:49:00.845817800 +0200
@@ -79,7 +79,7 @@
// -- setting a list item directly, ie with out a prefix, is the same as
// setting it to a single value
- class Config : public CanHaveError {
+ class ASPELL_EXPORT Config : public CanHaveError {
// copy and destructor provided
friend class MDInfoListofLists;
@@ -230,8 +230,8 @@
PosibErr<void> read_in_string(ParmStr str, const char * what = "");
};
- Config * new_config();
- Config * new_basic_config(); // config which doesn't require any
+ ASPELL_EXPORT Config * new_config();
+ ASPELL_EXPORT Config * new_basic_config(); // config which doesn't require any
// external symbols
class NotifierEnumeration {
@@ -271,8 +271,8 @@
class AddableContainer;
class StringList;
- void separate_list(ParmStr value, AddableContainer & out, bool do_unescape = true);
- void combine_list(String & res, const StringList &);
+ ASPELL_EXPORT void separate_list(ParmStr value, AddableContainer & out, bool do_unescape = true);
+ ASPELL_EXPORT void combine_list(String & res, const StringList &);
}
diff -Nru aspell-0.60.6.orig/common/convert.cpp aspell-0.60.6/common/convert.cpp
--- aspell-0.60.6.orig/common/convert.cpp 2007-12-03 07:55:45.000000000 +0100
+++ aspell-0.60.6/common/convert.cpp 2010-07-26 09:49:00.870819200 +0200
@@ -24,6 +24,10 @@
#include "gettext.h"
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
namespace acommon {
typedef unsigned char byte;
diff -Nru aspell-0.60.6.orig/common/convert.hpp aspell-0.60.6/common/convert.hpp
--- aspell-0.60.6.orig/common/convert.hpp 2004-11-01 21:22:03.000000000 +0100
+++ aspell-0.60.6/common/convert.hpp 2010-07-26 09:49:00.889820300 +0200
@@ -92,7 +92,7 @@
typedef FilterCharVector ConvertBuffer;
- class Convert {
+ class ASPELL_EXPORT Convert {
private:
CachePtr<Decode> decode_c;
StackPtr<Decode> decode_s;
@@ -195,16 +195,16 @@
};
- bool operator== (const Convert & rhs, const Convert & lhs);
+ bool ASPELL_EXPORT operator== (const Convert & rhs, const Convert & lhs);
- const char * fix_encoding_str(ParmStr enc, String & buf);
+ const ASPELL_EXPORT char * fix_encoding_str(ParmStr enc, String & buf);
// also returns true if the encoding is unknown
- bool ascii_encoding(const Config & c, ParmStr enc0);
+ bool ASPELL_EXPORT ascii_encoding(const Config & c, ParmStr enc0);
enum Normalize {NormNone, NormFrom, NormTo};
- PosibErr<Convert *> internal_new_convert(const Config & c,
+ PosibErr<Convert *> ASPELL_EXPORT internal_new_convert(const Config & c,
ParmString in, ParmString out,
bool if_needed,
Normalize n);
@@ -223,7 +223,7 @@
return internal_new_convert(c,in,out,true,n);
}
- struct ConvObj {
+ struct ASPELL_EXPORT ConvObj {
Convert * ptr;
ConvObj(Convert * c = 0) : ptr(c) {}
~ConvObj() {delete ptr;}
@@ -402,7 +402,7 @@
}
};
- struct MBLen
+ struct ASPELL_EXPORT MBLen
{
enum Encoding {Other, UTF8, UCS2, UCS4} encoding;
MBLen() : encoding(Other) {}
diff -Nru aspell-0.60.6.orig/common/document_checker.hpp aspell-0.60.6/common/document_checker.hpp
--- aspell-0.60.6.orig/common/document_checker.hpp 2002-08-10 17:17:06.000000000 +0200
+++ aspell-0.60.6/common/document_checker.hpp 2010-07-26 10:24:11.971091400 +0200
@@ -13,12 +13,13 @@
#include "can_have_error.hpp"
#include "filter_char.hpp"
#include "filter_char_vector.hpp"
+#include "tokenizer.hpp"
namespace acommon {
class Config;
class Speller;
- class Tokenizer;
+// class Tokenizer;
class Convert;
struct Token {
@@ -28,7 +29,7 @@
};
- class DocumentChecker : public CanHaveError {
+ class ASPELL_EXPORT DocumentChecker : public CanHaveError {
public:
// will take ownership of tokenizer and filter (even if there is an error)
// config only used for this method.
@@ -48,6 +49,9 @@
private:
CopyPtr<Filter> filter_;
CopyPtr<Tokenizer> tokenizer_;
+#if defined(_MSC_VER) && _MSC_VER < 1600
+ template class ASPELL_EXPORT CopyPtr<Tokenizer>;
+#endif
void (* status_fun_)(void *, Token, int);
void * status_fun_data_;
Speller * speller_;
@@ -55,7 +59,7 @@
FilterCharVector proc_str_;
};
- PosibErr<DocumentChecker *> new_document_checker(Speller *);
+ ASPELL_EXPORT PosibErr<DocumentChecker *> new_document_checker(Speller *);
}
diff -Nru aspell-0.60.6.orig/common/error.hpp aspell-0.60.6/common/error.hpp
--- aspell-0.60.6.orig/common/error.hpp 2004-02-21 22:19:36.000000000 +0100
+++ aspell-0.60.6/common/error.hpp 2010-07-26 09:49:00.976825300 +0200
@@ -7,11 +7,13 @@
#ifndef ASPELL_ERROR__HPP
#define ASPELL_ERROR__HPP
+#include "aspell_export.h"
+
namespace acommon {
struct ErrorInfo;
-struct Error {
+struct ASPELL_EXPORT Error {
const char * mesg; // expected to be allocated with malloc
const ErrorInfo * err;
diff -Nru aspell-0.60.6.orig/common/errors.hpp aspell-0.60.6/common/errors.hpp
--- aspell-0.60.6.orig/common/errors.hpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/common/errors.hpp 2010-07-26 09:51:52.840552000 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -14,91 +15,91 @@
struct ErrorInfo;
-extern "C" const ErrorInfo * const aerror_other;
-extern "C" const ErrorInfo * const aerror_operation_not_supported;
-extern "C" const ErrorInfo * const aerror_cant_copy;
-extern "C" const ErrorInfo * const aerror_unimplemented_method;
-extern "C" const ErrorInfo * const aerror_file;
-extern "C" const ErrorInfo * const aerror_cant_open_file;
-extern "C" const ErrorInfo * const aerror_cant_read_file;
-extern "C" const ErrorInfo * const aerror_cant_write_file;
-extern "C" const ErrorInfo * const aerror_invalid_name;
-extern "C" const ErrorInfo * const aerror_bad_file_format;
-extern "C" const ErrorInfo * const aerror_dir;
-extern "C" const ErrorInfo * const aerror_cant_read_dir;
-extern "C" const ErrorInfo * const aerror_config;
-extern "C" const ErrorInfo * const aerror_unknown_key;
-extern "C" const ErrorInfo * const aerror_cant_change_value;
-extern "C" const ErrorInfo * const aerror_bad_key;
-extern "C" const ErrorInfo * const aerror_bad_value;
-extern "C" const ErrorInfo * const aerror_duplicate;
-extern "C" const ErrorInfo * const aerror_key_not_string;
-extern "C" const ErrorInfo * const aerror_key_not_int;
-extern "C" const ErrorInfo * const aerror_key_not_bool;
-extern "C" const ErrorInfo * const aerror_key_not_list;
-extern "C" const ErrorInfo * const aerror_no_value_reset;
-extern "C" const ErrorInfo * const aerror_no_value_enable;
-extern "C" const ErrorInfo * const aerror_no_value_disable;
-extern "C" const ErrorInfo * const aerror_no_value_clear;
-extern "C" const ErrorInfo * const aerror_language_related;
-extern "C" const ErrorInfo * const aerror_unknown_language;
-extern "C" const ErrorInfo * const aerror_unknown_soundslike;
-extern "C" const ErrorInfo * const aerror_language_not_supported;
-extern "C" const ErrorInfo * const aerror_no_wordlist_for_lang;
-extern "C" const ErrorInfo * const aerror_mismatched_language;
-extern "C" const ErrorInfo * const aerror_affix;
-extern "C" const ErrorInfo * const aerror_corrupt_affix;
-extern "C" const ErrorInfo * const aerror_invalid_cond;
-extern "C" const ErrorInfo * const aerror_invalid_cond_strip;
-extern "C" const ErrorInfo * const aerror_incorrect_encoding;
-extern "C" const ErrorInfo * const aerror_encoding;
-extern "C" const ErrorInfo * const aerror_unknown_encoding;
-extern "C" const ErrorInfo * const aerror_encoding_not_supported;
-extern "C" const ErrorInfo * const aerror_conversion_not_supported;
-extern "C" const ErrorInfo * const aerror_pipe;
-extern "C" const ErrorInfo * const aerror_cant_create_pipe;
-extern "C" const ErrorInfo * const aerror_process_died;
-extern "C" const ErrorInfo * const aerror_bad_input;
-extern "C" const ErrorInfo * const aerror_invalid_string;
-extern "C" const ErrorInfo * const aerror_invalid_word;
-extern "C" const ErrorInfo * const aerror_invalid_affix;
-extern "C" const ErrorInfo * const aerror_inapplicable_affix;
-extern "C" const ErrorInfo * const aerror_unknown_unichar;
-extern "C" const ErrorInfo * const aerror_word_list_flags;
-extern "C" const ErrorInfo * const aerror_invalid_flag;
-extern "C" const ErrorInfo * const aerror_conflicting_flags;
-extern "C" const ErrorInfo * const aerror_version_control;
-extern "C" const ErrorInfo * const aerror_bad_version_string;
-extern "C" const ErrorInfo * const aerror_filter;
-extern "C" const ErrorInfo * const aerror_cant_dlopen_file;
-extern "C" const ErrorInfo * const aerror_empty_filter;
-extern "C" const ErrorInfo * const aerror_no_such_filter;
-extern "C" const ErrorInfo * const aerror_confusing_version;
-extern "C" const ErrorInfo * const aerror_bad_version;
-extern "C" const ErrorInfo * const aerror_identical_option;
-extern "C" const ErrorInfo * const aerror_options_only;
-extern "C" const ErrorInfo * const aerror_invalid_option_modifier;
-extern "C" const ErrorInfo * const aerror_cant_describe_filter;
-extern "C" const ErrorInfo * const aerror_filter_mode_file;
-extern "C" const ErrorInfo * const aerror_mode_option_name;
-extern "C" const ErrorInfo * const aerror_no_filter_to_option;
-extern "C" const ErrorInfo * const aerror_bad_mode_key;
-extern "C" const ErrorInfo * const aerror_expect_mode_key;
-extern "C" const ErrorInfo * const aerror_mode_version_requirement;
-extern "C" const ErrorInfo * const aerror_confusing_mode_version;
-extern "C" const ErrorInfo * const aerror_bad_mode_version;
-extern "C" const ErrorInfo * const aerror_missing_magic_expression;
-extern "C" const ErrorInfo * const aerror_empty_file_ext;
-extern "C" const ErrorInfo * const aerror_filter_mode_expand;
-extern "C" const ErrorInfo * const aerror_unknown_mode;
-extern "C" const ErrorInfo * const aerror_mode_extend_expand;
-extern "C" const ErrorInfo * const aerror_filter_mode_magic;
-extern "C" const ErrorInfo * const aerror_file_magic_pos;
-extern "C" const ErrorInfo * const aerror_file_magic_range;
-extern "C" const ErrorInfo * const aerror_missing_magic;
-extern "C" const ErrorInfo * const aerror_bad_magic;
-extern "C" const ErrorInfo * const aerror_expression;
-extern "C" const ErrorInfo * const aerror_invalid_expression;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_other;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_operation_not_supported;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_copy;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unimplemented_method;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_open_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_read_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_write_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_name;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_file_format;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_dir;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_read_dir;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_config;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_key;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_change_value;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_key;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_value;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_duplicate;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_string;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_int;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_bool;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_key_not_list;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_reset;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_enable;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_disable;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_value_clear;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_language_related;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_language;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_soundslike;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_language_not_supported;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_wordlist_for_lang;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mismatched_language;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_affix;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_corrupt_affix;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_cond;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_cond_strip;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_incorrect_encoding;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_encoding;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_encoding;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_encoding_not_supported;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_conversion_not_supported;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_pipe;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_create_pipe;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_process_died;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_input;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_string;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_word;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_affix;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_inapplicable_affix;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_unichar;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_word_list_flags;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_flag;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_conflicting_flags;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_version_control;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_version_string;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_dlopen_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_empty_filter;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_such_filter;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_confusing_version;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_version;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_identical_option;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_options_only;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_option_modifier;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_cant_describe_filter;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_file;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_option_name;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_no_filter_to_option;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_mode_key;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_expect_mode_key;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_version_requirement;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_confusing_mode_version;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_mode_version;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_missing_magic_expression;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_empty_file_ext;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_expand;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_unknown_mode;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_mode_extend_expand;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_filter_mode_magic;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file_magic_pos;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_file_magic_range;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_missing_magic;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_bad_magic;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_expression;
+extern "C" ASPELL_EXPORT const ErrorInfo * const aerror_invalid_expression;
static const ErrorInfo * const other_error = aerror_other;
diff -Nru aspell-0.60.6.orig/common/file_data_util.hpp aspell-0.60.6/common/file_data_util.hpp
--- aspell-0.60.6.orig/common/file_data_util.hpp 2004-03-31 13:16:05.000000000 +0200
+++ aspell-0.60.6/common/file_data_util.hpp 2010-07-26 09:49:01.103832500 +0200
@@ -7,11 +7,11 @@
namespace acommon {
- void fill_data_dir(const Config *, String & dir1, String & dir2);
- const String & find_file(String & path,
+ ASPELL_EXPORT void fill_data_dir(const Config *, String & dir1, String & dir2);
+ ASPELL_EXPORT const String & find_file(String & path,
const String & dir1, const String & dir2,
const String & name, const char * extension);
- bool find_file(String & file,
+ ASPELL_EXPORT bool find_file(String & file,
const String & dir1, const String & dir2,
const String & name,
ParmString preext, ParmString ext);
diff -Nru aspell-0.60.6.orig/common/file_util.cpp aspell-0.60.6/common/file_util.cpp
--- aspell-0.60.6.orig/common/file_util.cpp 2004-11-15 13:29:53.000000000 +0100
+++ aspell-0.60.6/common/file_util.cpp 2010-07-26 09:49:01.137834500 +0200
@@ -25,14 +25,12 @@
#include <dirent.h>
#ifdef WIN32
-
# include <io.h>
# define ACCESS _access
+# define asc_isalpha isalpha
# include <windows.h>
# include <winbase.h>
-
#else
-
# include <unistd.h>
# define ACCESS access
diff -Nru aspell-0.60.6.orig/common/file_util.hpp aspell-0.60.6/common/file_util.hpp
--- aspell-0.60.6.orig/common/file_util.hpp 2004-06-17 14:41:33.000000000 +0200
+++ aspell-0.60.6/common/file_util.hpp 2010-07-26 09:49:01.182837000 +0200
@@ -18,32 +18,32 @@
class Config;
class StringList;
- bool need_dir(ParmString file);
- String add_possible_dir(ParmString dir, ParmString file);
- String figure_out_dir(ParmString dir, ParmString file);
+ ASPELL_EXPORT bool need_dir(ParmString file);
+ ASPELL_EXPORT String add_possible_dir(ParmString dir, ParmString file);
+ ASPELL_EXPORT String figure_out_dir(ParmString dir, ParmString file);
// FIXME: Possible remove
//void open_file(FStream & in, const string & file,
// ParmString mode = "r");
- time_t get_modification_time(FStream & f);
- PosibErr<void> open_file_readlock(FStream& in, ParmString file);
- PosibErr<bool> open_file_writelock(FStream & in, ParmString file);
+ ASPELL_EXPORT time_t get_modification_time(FStream & f);
+ ASPELL_EXPORT PosibErr<void> open_file_readlock(FStream& in, ParmString file);
+ ASPELL_EXPORT PosibErr<bool> open_file_writelock(FStream & in, ParmString file);
// returns true if the file already exists
- void truncate_file(FStream & f, ParmString name);
- bool remove_file(ParmString name);
- bool file_exists(ParmString name);
- bool rename_file(ParmString orig, ParmString new_name);
+ ASPELL_EXPORT void truncate_file(FStream & f, ParmString name);
+ ASPELL_EXPORT bool remove_file(ParmString name);
+ ASPELL_EXPORT bool file_exists(ParmString name);
+ ASPELL_EXPORT bool rename_file(ParmString orig, ParmString new_name);
// will return NULL if path is NULL.
- const char * get_file_name(const char * path);
+ ASPELL_EXPORT const char * get_file_name(const char * path);
// expands filename to the full path
// returns the length of the directory part or 0 if nothing found
- unsigned find_file(const Config *, const char * option, String & filename);
- unsigned find_file(const StringList &, String & filename);
+ ASPELL_EXPORT unsigned find_file(const Config *, const char * option, String & filename);
+ ASPELL_EXPORT unsigned find_file(const StringList &, String & filename);
class StringEnumeration;
- class PathBrowser
+ class ASPELL_EXPORT PathBrowser
{
String suffix;
String path;
diff -Nru aspell-0.60.6.orig/common/filter.hpp aspell-0.60.6/common/filter.hpp
--- aspell-0.60.6.orig/common/filter.hpp 2004-10-28 02:41:04.000000000 +0200
+++ aspell-0.60.6/common/filter.hpp 2010-07-26 09:49:01.207838500 +0200
@@ -14,6 +14,8 @@
#include "vector.hpp"
#include "string_pair_enumeration.hpp"
+#include "aspell_export.h"
+
#include <stdio.h>
namespace acommon {
@@ -24,7 +26,7 @@
class StringList;
struct ConfigModule;
- class Filter : public CanHaveError {
+ class ASPELL_EXPORT Filter : public CanHaveError {
public:
bool empty() const {return filters_.empty();}
@@ -42,25 +44,25 @@
Filters filters_;
};
- PosibErr<void> set_mode_from_extension(Config * config,
+ PosibErr<void> ASPELL_EXPORT set_mode_from_extension(Config * config,
ParmString filename,
FILE * in = NULL);
- PosibErr<void> setup_filter(Filter &, Config *,
+ PosibErr<void> ASPELL_EXPORT setup_filter(Filter &, Config *,
bool use_decoder,
bool use_filter,
bool use_encoder);
- void activate_dynamic_filteroptions(Config *c);
- void activate_filter_modes(Config * config);
+ void ASPELL_EXPORT activate_dynamic_filteroptions(Config *c);
+ void ASPELL_EXPORT activate_filter_modes(Config * config);
- void load_all_filters(Config * config);
+ void ASPELL_EXPORT load_all_filters(Config * config);
- PosibErr<bool> verify_version(const char * relOp,
+ PosibErr<bool> ASPELL_EXPORT verify_version(const char * relOp,
const char * actual, const char * required);
- PosibErr<void> check_version(const char * requirement);
+ PosibErr<void> ASPELL_EXPORT check_version(const char * requirement);
- PosibErr<StringPairEnumeration *> available_filters(Config *);
- PosibErr<StringPairEnumeration *> available_filter_modes(Config *);
+ PosibErr<StringPairEnumeration *> ASPELL_EXPORT available_filters(Config *);
+ PosibErr<StringPairEnumeration *> ASPELL_EXPORT available_filter_modes(Config *);
};
diff -Nru aspell-0.60.6.orig/common/filter_char_vector.hpp aspell-0.60.6/common/filter_char_vector.hpp
--- aspell-0.60.6.orig/common/filter_char_vector.hpp 2004-02-20 22:24:16.000000000 +0100
+++ aspell-0.60.6/common/filter_char_vector.hpp 2010-07-26 09:49:01.225839500 +0200
@@ -12,7 +12,7 @@
namespace acommon {
- class FilterCharVector : public Vector<FilterChar>
+ class ASPELL_EXPORT FilterCharVector : public Vector<FilterChar>
{
typedef Vector<FilterChar> Base;
public:
diff -Nru aspell-0.60.6.orig/common/fstream.hpp aspell-0.60.6/common/fstream.hpp
--- aspell-0.60.6.orig/common/fstream.hpp 2004-06-17 14:41:35.000000000 +0200
+++ aspell-0.60.6/common/fstream.hpp 2010-07-26 09:49:01.240840400 +0200
@@ -20,7 +20,7 @@
namespace acommon {
class String;
- class FStream : public IStream, public OStream
+ class ASPELL_EXPORT FStream : public IStream, public OStream
{
private:
FILE * file_;
diff -Nru aspell-0.60.6.orig/common/getdata.hpp aspell-0.60.6/common/getdata.hpp
--- aspell-0.60.6.orig/common/getdata.hpp 2004-06-17 14:41:35.000000000 +0200
+++ aspell-0.60.6/common/getdata.hpp 2010-07-26 09:49:01.273842200 +0200
@@ -26,9 +26,9 @@
DataPair() : line_num(0) {}
};
- bool getdata_pair(IStream & in, DataPair & d, String & buf);
+ ASPELL_EXPORT bool getdata_pair(IStream & in, DataPair & d, String & buf);
- char * unescape(char * dest, const char * src);
+ ASPELL_EXPORT char * unescape(char * dest, const char * src);
static inline char * unescape(char * dest) {return unescape(dest, dest);}
static inline void unescape(MutableString & d) {
char * e = unescape(d.str, d.str);
@@ -42,11 +42,11 @@
// if limit is not given than dest should have enough space for
// twice the number of characters of src
- bool escape(char * dest, const char * src,
+ ASPELL_EXPORT bool escape(char * dest, const char * src,
size_t limit = INT_MAX, const char * others = 0);
- void to_lower(char *);
- void to_lower(String &, const char *);
+ ASPELL_EXPORT void to_lower(char *);
+ ASPELL_EXPORT void to_lower(String &, const char *);
// extract the first whitespace delimited word from d.value and put
// it in d.key. d.value is expected not to have any leading
@@ -54,15 +54,15 @@
// null terminated. d.value is modified to point to any additional
// data after key with any leading white space removed. Returns
// false when there are no more words to extract
- bool split(DataPair & d);
+ ASPELL_EXPORT bool split(DataPair & d);
// preps a string for split
- void init(ParmString str, DataPair & d, String & buf);
+ ASPELL_EXPORT void init(ParmString str, DataPair & d, String & buf);
- bool getline(IStream & in, DataPair & d, String & buf);
+ ASPELL_EXPORT bool getline(IStream & in, DataPair & d, String & buf);
- char * get_nb_line(IStream & in, String & buf);
- void remove_comments(String & buf);
+ ASPELL_EXPORT char * get_nb_line(IStream & in, String & buf);
+ ASPELL_EXPORT void remove_comments(String & buf);
}
#endif
diff -Nru aspell-0.60.6.orig/common/gettext.h aspell-0.60.6/common/gettext.h
--- aspell-0.60.6.orig/common/gettext.h 2004-11-21 03:52:22.000000000 +0100
+++ aspell-0.60.6/common/gettext.h 2010-07-26 09:51:52.888554800 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
@@ -92,7 +93,7 @@
return str[0] == '\0' ? str : _(str);
}
-extern "C" void aspell_gettext_init();
+extern "C" ASPELL_EXPORT void aspell_gettext_init();
/* NOTE: DO NOT USE "gettext", ALWAYS USE "_" BECAUSE WHEN ASPELL IS USED
AS A LIBRARY THE DOMAIN IS NOT GUARANTEED TO BE ASPELL */
diff -Nru aspell-0.60.6.orig/common/indiv_filter.hpp aspell-0.60.6/common/indiv_filter.hpp
--- aspell-0.60.6.orig/common/indiv_filter.hpp 2004-06-27 06:54:00.000000000 +0200
+++ aspell-0.60.6/common/indiv_filter.hpp 2010-07-26 09:49:01.292843300 +0200
@@ -17,7 +17,7 @@
class Config;
- class FilterHandle {
+ class ASPELL_EXPORT FilterHandle {
public:
FilterHandle() : handle(0) {}
~FilterHandle();
@@ -42,7 +42,7 @@
void * handle;
};
- class IndividualFilter {
+ class ASPELL_EXPORT IndividualFilter {
public:
// sets up the filter
diff -Nru aspell-0.60.6.orig/common/info.hpp aspell-0.60.6/common/info.hpp
--- aspell-0.60.6.orig/common/info.hpp 2004-05-30 12:49:17.000000000 +0200
+++ aspell-0.60.6/common/info.hpp 2010-07-26 09:49:01.341846100 +0200
@@ -34,7 +34,7 @@
StringList * dict_dirs;
};
- PosibErr<void> get_dict_file_name(const DictInfo *,
+ ASPELL_EXPORT PosibErr<void> get_dict_file_name(const DictInfo *,
String & main_wl, String & flags);
struct DictInfo {
@@ -50,7 +50,7 @@
struct ModuleInfoNode;
- class ModuleInfoList {
+ class ASPELL_EXPORT ModuleInfoList {
public:
ModuleInfoList() : size_(0), head_(0) {}
void clear();
@@ -70,11 +70,11 @@
ModuleInfoNode * head_;
};
- const ModuleInfoList * get_module_info_list(Config *);
+ ASPELL_EXPORT const ModuleInfoList * get_module_info_list(Config *);
struct DictInfoNode;
- class DictInfoList {
+ class ASPELL_EXPORT DictInfoList {
public:
DictInfoList() : size_(0), head_(0) {}
void clear();
@@ -93,11 +93,11 @@
DictInfoNode * head_;
};
- const DictInfoList * get_dict_info_list(Config *);
+ ASPELL_EXPORT const DictInfoList * get_dict_info_list(Config *);
- const StringMap * get_dict_aliases(Config *);
+ ASPELL_EXPORT const StringMap * get_dict_aliases(Config *);
- class ModuleInfoEnumeration {
+ class ASPELL_EXPORT ModuleInfoEnumeration {
public:
typedef const ModuleInfo * Value;
@@ -119,7 +119,7 @@
struct DictInfoNode;
- class DictInfoEnumeration {
+ class ASPELL_EXPORT DictInfoEnumeration {
public:
const DictInfoNode * node_;
DictInfoEnumeration(const DictInfoNode * n) : node_(n) {}
diff -Nru aspell-0.60.6.orig/common/iostream.hpp aspell-0.60.6/common/iostream.hpp
--- aspell-0.60.6.orig/common/iostream.hpp 2004-09-25 14:47:47.000000000 +0200
+++ aspell-0.60.6/common/iostream.hpp 2010-07-26 09:49:01.362847300 +0200
@@ -9,6 +9,8 @@
#include "fstream.hpp"
+#include "aspell_export.h"
+
namespace acommon {
// These streams for the time being will be based on stdin, stdout,
@@ -16,9 +18,9 @@
// functions. It is also safe to assume that modifications to the
// state of the standard streams will effect these.
- extern FStream CIN;
- extern FStream COUT;
- extern FStream CERR;
+ extern ASPELL_EXPORT FStream CIN;
+ extern ASPELL_EXPORT FStream COUT;
+ extern ASPELL_EXPORT FStream CERR;
}
#endif
diff -Nru aspell-0.60.6.orig/common/istream.hpp aspell-0.60.6/common/istream.hpp
--- aspell-0.60.6.orig/common/istream.hpp 2004-02-21 21:43:31.000000000 +0100
+++ aspell-0.60.6/common/istream.hpp 2010-07-26 09:49:01.376848100 +0200
@@ -11,7 +11,7 @@
class String;
- class IStream {
+ class ASPELL_EXPORT IStream {
private:
char delem;
public:
diff -Nru aspell-0.60.6.orig/common/itemize.hpp aspell-0.60.6/common/itemize.hpp
--- aspell-0.60.6.orig/common/itemize.hpp 2002-07-22 09:07:24.000000000 +0200
+++ aspell-0.60.6/common/itemize.hpp 2010-07-26 09:49:01.391849000 +0200
@@ -7,13 +7,15 @@
#ifndef ITEMIZE__HPP
#define ITEMIZE__HPP
+#include "aspell_export.h"
+
#include "parm_string.hpp"
#include "posib_err.hpp"
namespace acommon {
class MutableContainer;
- PosibErr<void> itemize(ParmString, MutableContainer &);
+ ASPELL_EXPORT PosibErr<void> itemize(ParmString, MutableContainer &);
}
diff -Nru aspell-0.60.6.orig/common/lock.hpp aspell-0.60.6/common/lock.hpp
--- aspell-0.60.6.orig/common/lock.hpp 2004-09-23 15:25:24.000000000 +0200
+++ aspell-0.60.6/common/lock.hpp 2010-07-26 09:49:01.410850100 +0200
@@ -15,6 +15,8 @@
#ifndef DISTRIBNET_LOCK__HPP
#define DISTRIBNET_LOCK__HPP
+#include "aspell_export.h"
+
#include "settings.h"
#ifdef USE_POSIX_MUTEX
@@ -26,7 +28,7 @@
#define LOCK(l) const Lock the_lock(l);
#ifdef USE_POSIX_MUTEX
- class Mutex {
+ class ASPELL_EXPORT Mutex {
pthread_mutex_t l_;
private:
Mutex(const Mutex &);
@@ -38,7 +40,7 @@
void unlock() {pthread_mutex_unlock(&l_);}
};
#else
- class Mutex {
+ class ASPELL_EXPORT Mutex {
private:
Mutex(const Mutex &);
void operator=(const Mutex &);
@@ -50,7 +52,7 @@
};
#endif
- class Lock {
+ class ASPELL_EXPORT Lock {
private:
Lock(const Lock &);
void operator= (const Lock &);
diff -Nru aspell-0.60.6.orig/common/mutable_container.hpp aspell-0.60.6/common/mutable_container.hpp
--- aspell-0.60.6.orig/common/mutable_container.hpp 2004-06-17 14:41:47.000000000 +0200
+++ aspell-0.60.6/common/mutable_container.hpp 2010-07-26 09:49:01.425850900 +0200
@@ -7,18 +7,20 @@
#ifndef ASPELL_MUTABLE_CONTAINER__HPP
#define ASPELL_MUTABLE_CONTAINER__HPP
+#include "aspell_export.h"
+
#include "parm_string.hpp"
namespace acommon {
-class AddableContainer {
+class ASPELL_EXPORT AddableContainer {
public:
virtual PosibErr<bool> add(ParmStr to_add) = 0;
virtual ~AddableContainer() {}
};
-class MutableContainer : public AddableContainer {
+class ASPELL_EXPORT MutableContainer : public AddableContainer {
public:
virtual PosibErr<bool> remove(ParmStr to_rem) = 0;
virtual PosibErr<void> clear() = 0;
diff -Nru aspell-0.60.6.orig/common/objstack.cpp aspell-0.60.6/common/objstack.cpp
--- aspell-0.60.6.orig/common/objstack.cpp 2006-11-24 04:46:09.000000000 +0100
+++ aspell-0.60.6/common/objstack.cpp 2010-07-26 09:49:01.441851900 +0200
@@ -1,5 +1,6 @@
#include "objstack.hpp"
+#include <iostream>
namespace acommon {
diff -Nru aspell-0.60.6.orig/common/objstack.hpp aspell-0.60.6/common/objstack.hpp
--- aspell-0.60.6.orig/common/objstack.hpp 2006-11-24 04:37:39.000000000 +0100
+++ aspell-0.60.6/common/objstack.hpp 2010-07-26 09:49:01.462853100 +0200
@@ -2,13 +2,15 @@
#ifndef ACOMMON_OBJSTACK__HPP
#define ACOMMON_OBJSTACK__HPP
+#include "aspell_export.h"
+
#include "parm_string.hpp"
#include <stdlib.h>
#include <assert.h>
namespace acommon {
-class ObjStack
+class ASPELL_EXPORT ObjStack
{
typedef unsigned char byte;
struct Node
diff -Nru aspell-0.60.6.orig/common/ostream.hpp aspell-0.60.6/common/ostream.hpp
--- aspell-0.60.6.orig/common/ostream.hpp 2004-07-24 14:03:58.000000000 +0200
+++ aspell-0.60.6/common/ostream.hpp 2010-07-26 09:49:01.483854300 +0200
@@ -9,6 +9,8 @@
#include <stdarg.h>
+#include "aspell_export.h"
+
#include "parm_string.hpp"
namespace acommon {
@@ -17,7 +19,7 @@
// Than avoid code bloat by using it in many places instead of
// out << "Bla " << something << " djdkdk " << something else << "\n"
- class OStream {
+ class ASPELL_EXPORT OStream {
public:
virtual void write (char c) = 0;
virtual void write (ParmStr) = 0;
diff -Nru aspell-0.60.6.orig/common/parm_string.hpp aspell-0.60.6/common/parm_string.hpp
--- aspell-0.60.6.orig/common/parm_string.hpp 2005-02-20 22:47:07.000000000 +0100
+++ aspell-0.60.6/common/parm_string.hpp 2010-07-26 09:49:01.506855600 +0200
@@ -10,6 +10,8 @@
#include <string.h>
#include <limits.h>
+#include "aspell_export.h"
+
//
// ParmString is a special string class that is designed to be used as
// a parameter for a function that is expecting a string It will allow
@@ -40,7 +42,7 @@
class String;
- class ParmString {
+ class ASPELL_EXPORT ParmString {
public:
ParmString() : str_(0) {}
ParmString(const char * str, unsigned int sz = UINT_MAX)
diff -Nru aspell-0.60.6.orig/common/posib_err.cpp aspell-0.60.6/common/posib_err.cpp
--- aspell-0.60.6.orig/common/posib_err.cpp 2004-11-21 03:52:22.000000000 +0100
+++ aspell-0.60.6/common/posib_err.cpp 2010-07-26 09:49:01.522856500 +0200
@@ -14,6 +14,9 @@
#include "gettext.h"
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
namespace acommon {
diff -Nru aspell-0.60.6.orig/common/posib_err.hpp aspell-0.60.6/common/posib_err.hpp
--- aspell-0.60.6.orig/common/posib_err.hpp 2004-12-17 09:23:33.000000000 +0100
+++ aspell-0.60.6/common/posib_err.hpp 2010-07-26 09:49:01.675863000 +0200
@@ -7,6 +7,8 @@
#ifndef PCOMMON_POSIB_ERR__HPP
#define PCOMMON_POSIB_ERR__HPP
+#include "aspell_export.h"
+
#include "string.hpp"
#include "error.hpp"
@@ -32,7 +34,7 @@
template <typename Ret> class PosibErr;
- class PosibErrBase {
+ class ASPELL_EXPORT PosibErrBase {
private:
struct ErrPtr {
const Error * err;
diff -Nru aspell-0.60.6.orig/common/speller.hpp aspell-0.60.6/common/speller.hpp
--- aspell-0.60.6.orig/common/speller.hpp 2007-10-13 10:20:16.000000000 +0200
+++ aspell-0.60.6/common/speller.hpp 2010-07-26 09:49:01.690863900 +0200
@@ -15,6 +15,8 @@
#ifndef ASPELL_SPELLER__HPP
#define ASPELL_SPELLER__HPP
+#include "aspell_export.h"
+
#include "can_have_error.hpp"
#include "copy_ptr.hpp"
#include "clone_ptr.hpp"
@@ -49,7 +51,7 @@
short compound;
};
- class Speller : public CanHaveError
+ class ASPELL_EXPORT Speller : public CanHaveError
{
private:
SpellerLtHandle lt_handle_;
@@ -121,10 +123,10 @@
// This function is current a hack to reload the filters in the
// speller class. I hope to eventually find a better way.
- PosibErr<void> reload_filters(Speller * m);
+ ASPELL_EXPORT PosibErr<void> reload_filters(Speller * m);
- PosibErr<Speller *> new_speller(Config * c);
+ ASPELL_EXPORT PosibErr<Speller *> new_speller(Config * c);
}
diff -Nru aspell-0.60.6.orig/common/string.hpp aspell-0.60.6/common/string.hpp
--- aspell-0.60.6.orig/common/string.hpp 2007-12-03 03:08:11.000000000 +0100
+++ aspell-0.60.6/common/string.hpp 2010-07-26 09:49:01.706864800 +0200
@@ -12,6 +12,8 @@
#include <algorithm>
+#include "aspell_export.h"
+
#include "hash_fun.hpp"
#include "parm_string.hpp"
#include "mutable_string.hpp"
@@ -35,7 +37,7 @@
template <typename Ret> class PosibErr;
- class String : public OStream
+ class ASPELL_EXPORT String : public OStream
{
public:
typedef const char * const_iterator;
diff -Nru aspell-0.60.6.orig/common/string_enumeration.hpp aspell-0.60.6/common/string_enumeration.hpp
--- aspell-0.60.6.orig/common/string_enumeration.hpp 2004-02-02 03:48:50.000000000 +0100
+++ aspell-0.60.6/common/string_enumeration.hpp 2010-07-26 09:49:01.723865800 +0200
@@ -7,6 +7,8 @@
#ifndef ASPELL_STRING_ENUMERATION__HPP
#define ASPELL_STRING_ENUMERATION__HPP
+#include "aspell_export.h"
+
#include "parm_string.hpp"
#include "type_id.hpp"
#include "char_vector.hpp"
@@ -16,7 +18,7 @@
class StringEnumeration;
class Convert;
- class StringEnumeration {
+ class ASPELL_EXPORT StringEnumeration {
public:
typedef const char * Value;
virtual bool at_end() const = 0;
diff -Nru aspell-0.60.6.orig/common/string_list.hpp aspell-0.60.6/common/string_list.hpp
--- aspell-0.60.6.orig/common/string_list.hpp 2004-06-17 14:41:47.000000000 +0200
+++ aspell-0.60.6/common/string_list.hpp 2010-07-26 09:49:01.742866800 +0200
@@ -6,6 +6,8 @@
#ifndef STRING_LIST_HP_HEADER
#define STRING_LIST_HP_HEADER
+#include "aspell_export.h"
+
#include "string.hpp"
#include "string_enumeration.hpp"
#include "mutable_container.hpp"
@@ -15,7 +17,7 @@
namespace acommon {
- struct StringListNode {
+ struct ASPELL_EXPORT StringListNode {
// private data structure
// default copy & destructor unsafe
String data;
@@ -25,7 +27,7 @@
}
};
- class StringListEnumeration : public StringEnumeration {
+ class ASPELL_EXPORT StringListEnumeration : public StringEnumeration {
// default copy and destructor safe
private:
StringListNode * n_;
@@ -50,7 +52,7 @@
};
- class StringList : public MutableContainer {
+ class ASPELL_EXPORT StringList : public MutableContainer {
// copy and destructor provided
private:
StringListNode * first;
@@ -94,7 +96,7 @@
};
- StringList * new_string_list();
+ ASPELL_EXPORT StringList * new_string_list();
}
#endif
diff -Nru aspell-0.60.6.orig/common/string_map.hpp aspell-0.60.6/common/string_map.hpp
--- aspell-0.60.6.orig/common/string_map.hpp 2004-06-17 14:41:47.000000000 +0200
+++ aspell-0.60.6/common/string_map.hpp 2010-07-26 09:49:01.762868000 +0200
@@ -7,6 +7,8 @@
#ifndef ASPELL_STRING_MAP__HPP
#define ASPELL_STRING_MAP__HPP
+#include "aspell_export.h"
+
#include "mutable_container.hpp"
#include "parm_string.hpp"
#include "posib_err.hpp"
@@ -21,7 +23,7 @@
using std::pair;
-class StringMap : public MutableContainer {
+class ASPELL_EXPORT StringMap : public MutableContainer {
public: // but don't use
struct Parms {
typedef StringPair Value;
@@ -117,7 +119,7 @@
};
-StringMap * new_string_map();
+ASPELL_EXPORT StringMap * new_string_map();
}
diff -Nru aspell-0.60.6.orig/common/string_pair.hpp aspell-0.60.6/common/string_pair.hpp
--- aspell-0.60.6.orig/common/string_pair.hpp 2004-02-19 10:14:06.000000000 +0100
+++ aspell-0.60.6/common/string_pair.hpp 2010-07-26 09:49:01.778868900 +0200
@@ -7,10 +7,9 @@
#ifndef ASPELL_STRING_PAIR__HPP
#define ASPELL_STRING_PAIR__HPP
-
namespace acommon {
-
+extern "C" {
struct StringPair {
const char * first;
const char * second;
@@ -18,7 +17,7 @@
: first(f), second(s) {}
StringPair() : first(""), second("") {}
};
-
+}
}
diff -Nru aspell-0.60.6.orig/common/string_pair_enumeration.hpp aspell-0.60.6/common/string_pair_enumeration.hpp
--- aspell-0.60.6.orig/common/string_pair_enumeration.hpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/common/string_pair_enumeration.hpp 2010-07-26 09:49:01.791869600 +0200
@@ -9,13 +9,15 @@
#ifndef ASPELL_STRING_PAIR_ENUMERATION__HPP
#define ASPELL_STRING_PAIR_ENUMERATION__HPP
+#include "aspell_export.h"
+
#include "string_pair.hpp"
namespace acommon {
class StringPairEnumeration;
-class StringPairEnumeration {
+class ASPELL_EXPORT StringPairEnumeration {
public:
virtual bool at_end() const = 0;
virtual StringPair next() = 0;
diff -Nru aspell-0.60.6.orig/common/strtonum.hpp aspell-0.60.6/common/strtonum.hpp
--- aspell-0.60.6.orig/common/strtonum.hpp 2004-10-28 02:41:04.000000000 +0200
+++ aspell-0.60.6/common/strtonum.hpp 2010-07-26 09:49:01.806870500 +0200
@@ -7,12 +7,14 @@
#ifndef ASPELL_STRTONUM__HPP
#define ASPELL_STRTONUM__HPP
+#include "aspell_export.h"
+
namespace acommon {
// Local independent numeric conversion. It is OK if
// nptr == *endptr
- double strtod_c(const char * nptr, const char ** endptr);
- long strtoi_c(const char * npter, const char ** endptr);
+ ASPELL_EXPORT double strtod_c(const char * nptr, const char ** endptr);
+ ASPELL_EXPORT long strtoi_c(const char * npter, const char ** endptr);
}
diff -Nru aspell-0.60.6.orig/common/tokenizer.cpp aspell-0.60.6/common/tokenizer.cpp
--- aspell-0.60.6.orig/common/tokenizer.cpp 2004-04-13 09:13:39.000000000 +0200
+++ aspell-0.60.6/common/tokenizer.cpp 2010-07-26 09:49:01.817871100 +0200
@@ -28,4 +28,6 @@
end = end;
}
+ bool Tokenizer::advance(){ return false; }; // returns false if there is nothing left
+
}
diff -Nru aspell-0.60.6.orig/common/tokenizer.hpp aspell-0.60.6/common/tokenizer.hpp
--- aspell-0.60.6.orig/common/tokenizer.hpp 2004-06-02 17:07:34.000000000 +0200
+++ aspell-0.60.6/common/tokenizer.hpp 2010-07-26 09:49:01.829871800 +0200
@@ -7,6 +7,8 @@
#ifndef ACOMMON_TOKENIZER__HPP
#define ACOMMON_TOKENIZER__HPP
+#include "aspell_export.h"
+
#include "char_vector.hpp"
#include "filter_char.hpp"
#include "filter_char_vector.hpp"
@@ -36,7 +38,7 @@
void reset (FilterChar * in, FilterChar * stop);
bool at_end() const {return word_begin == word_end;}
- virtual bool advance() = 0; // returns false if there is nothing left
+ virtual bool advance(); // returns false if there is nothing left
bool is_begin(unsigned char c) const
{return char_type_[c].begin;}
@@ -65,7 +67,7 @@
// returns a new tokenizer and sets it up with the given speller
// class
- PosibErr<Tokenizer *> new_tokenizer(Speller *);
+ ASPELL_EXPORT PosibErr<Tokenizer *> new_tokenizer(Speller *);
}
diff -Nru aspell-0.60.6.orig/export2.pl aspell-0.60.6/export2.pl
--- aspell-0.60.6.orig/export2.pl 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/export2.pl 2010-07-26 09:51:31.793356000 +0200
@@ -0,0 +1,68 @@
+use Cwd;
+
+sub trim($)
+{
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
+
+$cwd = getcwd();
+@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');
+@filelist = ();
+foreach $flName (@fl){
+ $tmp = scalar(grep(/.*$flName.*/,@filelist));
+ print $flName."\n";
+ print $tmp;
+ if(scalar($tmp) ==0 ){
+ push(@filelist,$cwd.$flName );
+ }
+}
+
+
+open(FILE, "symbols.def")||die("Shit couldnt open symbols.def");
+@symbols = <FILE>;
+$symbols_length = scalar (@symbols);
+close(FILE);
+
+
+foreach(@filelist){
+ $fileName = $_;
+ open(FILE, $fileName )||die("File ".$fileName." not found");
+ @content = <FILE>;
+ unshift(@content,"#include \"aspell_export.h\"\n");
+ close(FILE);
+ for($i=0;$i<$symbols_length;++$i){
+ $sym = trim($symbols[$i]);
+ if( ! defined $sym ){
+ delete $symbols[$i];
+ next;
+ }else{
+ foreach $line (@content){
+ if($line =~ m/^\s*extern "C".*$sym\s*\(.*\).*/
+ || $line =~ m/^\s*extern "C".*$sym;/){
+ print "Found Symbols: ". $symbols[$i]." in File: ".$fileName;
+ @sp = split(/\"C\"/, trim($line));
+ $tmp = $sp[0]."\"C\" ASPELL_EXPORT ".$sp[1];
+ $tmp = $tmp."\n";
+
+ print "modified\n".$line."\nto\n".$tmp;
+ print $line
+ $line = $tmp;
+ }
+ }
+ }
+ }
+ open(FILE, ">" ,$fileName );
+ print FILE @content;
+ close(FILE);
+}
+
+#foreach(@symbols){
+# if(defined $_){
+# print "\ncouldn't find ".$_;
+# }
+#}
+
+
diff -Nru aspell-0.60.6.orig/gen/mk-static-filter.pl aspell-0.60.6/gen/mk-static-filter.pl
--- aspell-0.60.6.orig/gen/mk-static-filter.pl 2007-12-03 07:43:09.000000000 +0100
+++ aspell-0.60.6/gen/mk-static-filter.pl 2010-07-26 09:49:01.845872700 +0200
@@ -12,7 +12,6 @@
%filters=();
while ($filename=shift) {
-
#check if filter description file (*-filter.info) has been read before
$filtername=$filename;
$filtername=~s/-filter\.info$//;
@@ -93,7 +92,9 @@
#statically linked into Aspell
(scalar (@allfilters = keys %filters)) || exit 0;
+
open STATICFILTERS, ">gen/static_filters.src.cpp" || die "cant generate static filter description\n";
+print "STATICFILTERS\n";
printf STATICFILTERS "/*File generated during static filter build\n".
" Automatically generated file\n*/\n";
@@ -137,8 +138,10 @@
#create KeyInfo structs and begin end handles
$firstopt = 1;
+ $needdummy = 1;
while (($name,$option)=each %{$filter}) {
($name=~/(?:NAME|(?:DE|EN)CODER|FILTER|DESCRIPTION)/) && next;
+ $needdummy = 0;
( $firstopt != 1 ) && ( printf STATICFILTERS ",\n" );
$firstopt = 0;
printf STATICFILTERS " {\n".
@@ -155,6 +158,13 @@
" \"".${$option}{"DESCRIPTION"}."\"\n".
" }";
}
+ if( $needdummy ) {
+ printf STATICFILTERS " {\n \"f-${$filter}{NAME}-$name\",\n";
+ printf STATICFILTERS " KeyInfoBool,\n";
+ print STATICFILTERS " \"false\",\n".
+ " \"dummy option\"\n".
+ " }";
+ }
printf STATICFILTERS "\n };\n";
printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
${$filter}{"NAME"}."_options;\n";
diff -Nru aspell-0.60.6.orig/lib/can_have_error-c.cpp aspell-0.60.6/lib/can_have_error-c.cpp
--- aspell-0.60.6.orig/lib/can_have_error-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/can_have_error-c.cpp 2010-07-26 09:51:53.950615500 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -14,22 +15,22 @@
class CanHaveError;
struct Error;
-extern "C" unsigned int aspell_error_number(const CanHaveError * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_error_number(const CanHaveError * ths)
{
return ths->err_ == 0 ? 0 : 1;
}
-extern "C" const char * aspell_error_message(const CanHaveError * ths)
+extern "C" ASPELL_EXPORT const char * aspell_error_message(const CanHaveError * ths)
{
return ths->err_ ? ths->err_->mesg : "";
}
-extern "C" const Error * aspell_error(const CanHaveError * ths)
+extern "C" ASPELL_EXPORT const Error * aspell_error(const CanHaveError * ths)
{
return ths->err_;
}
-extern "C" void delete_aspell_can_have_error(CanHaveError * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_can_have_error(CanHaveError * ths)
{
delete ths;
}
diff -Nru aspell-0.60.6.orig/lib/config-c.cpp aspell-0.60.6/lib/config-c.cpp
--- aspell-0.60.6.orig/lib/config-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/config-c.cpp 2010-07-26 09:51:53.859610300 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -20,72 +21,72 @@
class MutableContainer;
class StringPairEnumeration;
-extern "C" int aspell_key_info_enumeration_at_end(const KeyInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT int aspell_key_info_enumeration_at_end(const KeyInfoEnumeration * ths)
{
return ths->at_end();
}
-extern "C" const KeyInfo * aspell_key_info_enumeration_next(KeyInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT const KeyInfo * aspell_key_info_enumeration_next(KeyInfoEnumeration * ths)
{
return ths->next();
}
-extern "C" void delete_aspell_key_info_enumeration(KeyInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_key_info_enumeration(KeyInfoEnumeration * ths)
{
delete ths;
}
-extern "C" KeyInfoEnumeration * aspell_key_info_enumeration_clone(const KeyInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT KeyInfoEnumeration * aspell_key_info_enumeration_clone(const KeyInfoEnumeration * ths)
{
return ths->clone();
}
-extern "C" void aspell_key_info_enumeration_assign(KeyInfoEnumeration * ths, const KeyInfoEnumeration * other)
+extern "C" ASPELL_EXPORT void aspell_key_info_enumeration_assign(KeyInfoEnumeration * ths, const KeyInfoEnumeration * other)
{
ths->assign(other);
}
-extern "C" Config * new_aspell_config()
+extern "C" ASPELL_EXPORT Config * new_aspell_config()
{
return new_config();
}
-extern "C" void delete_aspell_config(Config * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_config(Config * ths)
{
delete ths;
}
-extern "C" Config * aspell_config_clone(const Config * ths)
+extern "C" ASPELL_EXPORT Config * aspell_config_clone(const Config * ths)
{
return ths->clone();
}
-extern "C" void aspell_config_assign(Config * ths, const Config * other)
+extern "C" ASPELL_EXPORT void aspell_config_assign(Config * ths, const Config * other)
{
ths->assign(other);
}
-extern "C" unsigned int aspell_config_error_number(const Config * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_config_error_number(const Config * ths)
{
return ths->err_ == 0 ? 0 : 1;
}
-extern "C" const char * aspell_config_error_message(const Config * ths)
+extern "C" ASPELL_EXPORT const char * aspell_config_error_message(const Config * ths)
{
return ths->err_ ? ths->err_->mesg : "";
}
-extern "C" const Error * aspell_config_error(const Config * ths)
+extern "C" ASPELL_EXPORT const Error * aspell_config_error(const Config * ths)
{
return ths->err_;
}
-extern "C" void aspell_config_set_extra(Config * ths, const KeyInfo * begin, const KeyInfo * end)
+extern "C" ASPELL_EXPORT void aspell_config_set_extra(Config * ths, const KeyInfo * begin, const KeyInfo * end)
{
ths->set_extra(begin, end);
}
-extern "C" const KeyInfo * aspell_config_keyinfo(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT const KeyInfo * aspell_config_keyinfo(Config * ths, const char * key)
{
PosibErr<const KeyInfo *> ret = ths->keyinfo(key);
ths->err_.reset(ret.release_err());
@@ -93,12 +94,12 @@
return ret.data;
}
-extern "C" KeyInfoEnumeration * aspell_config_possible_elements(Config * ths, int include_extra)
+extern "C" ASPELL_EXPORT KeyInfoEnumeration * aspell_config_possible_elements(Config * ths, int include_extra)
{
return ths->possible_elements(include_extra);
}
-extern "C" const char * aspell_config_get_default(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT const char * aspell_config_get_default(Config * ths, const char * key)
{
PosibErr<String> ret = ths->get_default(key);
ths->err_.reset(ret.release_err());
@@ -107,12 +108,12 @@
return ths->temp_str.c_str();
}
-extern "C" StringPairEnumeration * aspell_config_elements(Config * ths)
+extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_config_elements(Config * ths)
{
return ths->elements();
}
-extern "C" int aspell_config_replace(Config * ths, const char * key, const char * value)
+extern "C" ASPELL_EXPORT int aspell_config_replace(Config * ths, const char * key, const char * value)
{
PosibErr<void> ret = ths->replace(key, value);
ths->err_.reset(ret.release_err());
@@ -120,7 +121,7 @@
return 1;
}
-extern "C" int aspell_config_remove(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT int aspell_config_remove(Config * ths, const char * key)
{
PosibErr<void> ret = ths->remove(key);
ths->err_.reset(ret.release_err());
@@ -128,12 +129,12 @@
return 1;
}
-extern "C" int aspell_config_have(const Config * ths, const char * key)
+extern "C" ASPELL_EXPORT int aspell_config_have(const Config * ths, const char * key)
{
return ths->have(key);
}
-extern "C" const char * aspell_config_retrieve(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT const char * aspell_config_retrieve(Config * ths, const char * key)
{
PosibErr<String> ret = ths->retrieve(key);
ths->err_.reset(ret.release_err());
@@ -142,7 +143,7 @@
return ths->temp_str.c_str();
}
-extern "C" int aspell_config_retrieve_list(Config * ths, const char * key, MutableContainer * lst)
+extern "C" ASPELL_EXPORT int aspell_config_retrieve_list(Config * ths, const char * key, MutableContainer * lst)
{
PosibErr<void> ret = ths->retrieve_list(key, lst);
ths->err_.reset(ret.release_err());
@@ -150,7 +151,7 @@
return 1;
}
-extern "C" int aspell_config_retrieve_bool(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT int aspell_config_retrieve_bool(Config * ths, const char * key)
{
PosibErr<bool> ret = ths->retrieve_bool(key);
ths->err_.reset(ret.release_err());
@@ -158,7 +159,7 @@
return ret.data;
}
-extern "C" int aspell_config_retrieve_int(Config * ths, const char * key)
+extern "C" ASPELL_EXPORT int aspell_config_retrieve_int(Config * ths, const char * key)
{
PosibErr<unsigned int> ret = ths->retrieve_int(key);
ths->err_.reset(ret.release_err());
diff -Nru aspell-0.60.6.orig/lib/document_checker-c.cpp aspell-0.60.6/lib/document_checker-c.cpp
--- aspell-0.60.6.orig/lib/document_checker-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/document_checker-c.cpp 2010-07-26 09:51:53.531591600 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -17,27 +18,27 @@
class Filter;
class Speller;
-extern "C" void delete_aspell_document_checker(DocumentChecker * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_document_checker(DocumentChecker * ths)
{
delete ths;
}
-extern "C" unsigned int aspell_document_checker_error_number(const DocumentChecker * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_document_checker_error_number(const DocumentChecker * ths)
{
return ths->err_ == 0 ? 0 : 1;
}
-extern "C" const char * aspell_document_checker_error_message(const DocumentChecker * ths)
+extern "C" ASPELL_EXPORT const char * aspell_document_checker_error_message(const DocumentChecker * ths)
{
return ths->err_ ? ths->err_->mesg : "";
}
-extern "C" const Error * aspell_document_checker_error(const DocumentChecker * ths)
+extern "C" ASPELL_EXPORT const Error * aspell_document_checker_error(const DocumentChecker * ths)
{
return ths->err_;
}
-extern "C" CanHaveError * new_aspell_document_checker(Speller * speller)
+extern "C" ASPELL_EXPORT CanHaveError * new_aspell_document_checker(Speller * speller)
{
PosibErr<DocumentChecker *> ret = new_document_checker(speller);
if (ret.has_err()) {
@@ -47,27 +48,27 @@
}
}
-extern "C" DocumentChecker * to_aspell_document_checker(CanHaveError * obj)
+extern "C" ASPELL_EXPORT DocumentChecker * to_aspell_document_checker(CanHaveError * obj)
{
return static_cast<DocumentChecker *>(obj);
}
-extern "C" void aspell_document_checker_reset(DocumentChecker * ths)
+extern "C" ASPELL_EXPORT void aspell_document_checker_reset(DocumentChecker * ths)
{
ths->reset();
}
-extern "C" void aspell_document_checker_process(DocumentChecker * ths, const char * str, int size)
+extern "C" ASPELL_EXPORT void aspell_document_checker_process(DocumentChecker * ths, const char * str, int size)
{
ths->process(str, size);
}
-extern "C" Token aspell_document_checker_next_misspelling(DocumentChecker * ths)
+extern "C" ASPELL_EXPORT Token aspell_document_checker_next_misspelling(DocumentChecker * ths)
{
return ths->next_misspelling();
}
-extern "C" Filter * aspell_document_checker_filter(DocumentChecker * ths)
+extern "C" ASPELL_EXPORT Filter * aspell_document_checker_filter(DocumentChecker * ths)
{
return ths->filter();
}
diff -Nru aspell-0.60.6.orig/lib/dummy.cpp aspell-0.60.6/lib/dummy.cpp
--- aspell-0.60.6.orig/lib/dummy.cpp 2002-09-09 07:57:09.000000000 +0200
+++ aspell-0.60.6/lib/dummy.cpp 2010-07-26 09:49:01.860873600 +0200
@@ -1 +1,5 @@
+#include <aspell_export.h>
+
+void ASPELL_EXPORT pspell_aspell_dummy();
+
void pspell_aspell_dummy() {}
diff -Nru aspell-0.60.6.orig/lib/error-c.cpp aspell-0.60.6/lib/error-c.cpp
--- aspell-0.60.6.orig/lib/error-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/error-c.cpp 2010-07-26 09:51:53.444586600 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -13,7 +14,7 @@
struct Error;
struct ErrorInfo;
-extern "C" int aspell_error_is_a(const Error * ths, const ErrorInfo * e)
+extern "C" ASPELL_EXPORT int aspell_error_is_a(const Error * ths, const ErrorInfo * e)
{
return ths->is_a(e);
}
diff -Nru aspell-0.60.6.orig/lib/filter-c.cpp aspell-0.60.6/lib/filter-c.cpp
--- aspell-0.60.6.orig/lib/filter-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/filter-c.cpp 2010-07-26 09:51:52.996561000 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -15,27 +16,27 @@
struct Error;
class Filter;
-extern "C" void delete_aspell_filter(Filter * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_filter(Filter * ths)
{
delete ths;
}
-extern "C" unsigned int aspell_filter_error_number(const Filter * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_filter_error_number(const Filter * ths)
{
return ths->err_ == 0 ? 0 : 1;
}
-extern "C" const char * aspell_filter_error_message(const Filter * ths)
+extern "C" ASPELL_EXPORT const char * aspell_filter_error_message(const Filter * ths)
{
return ths->err_ ? ths->err_->mesg : "";
}
-extern "C" const Error * aspell_filter_error(const Filter * ths)
+extern "C" ASPELL_EXPORT const Error * aspell_filter_error(const Filter * ths)
{
return ths->err_;
}
-extern "C" Filter * to_aspell_filter(CanHaveError * obj)
+extern "C" ASPELL_EXPORT Filter * to_aspell_filter(CanHaveError * obj)
{
return static_cast<Filter *>(obj);
}
diff -Nru aspell-0.60.6.orig/lib/info-c.cpp aspell-0.60.6/lib/info-c.cpp
--- aspell-0.60.6.orig/lib/info-c.cpp 2004-01-25 04:20:28.000000000 +0100
+++ aspell-0.60.6/lib/info-c.cpp 2010-07-26 09:51:53.306578700 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* This file is part of The New Aspell
* Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
* license version 2.0 or 2.1. You should have received a copy of the
@@ -16,92 +17,92 @@
class ModuleInfoEnumeration;
class ModuleInfoList;
-extern "C" ModuleInfoList * get_aspell_module_info_list(Config * config)
+extern "C" ASPELL_EXPORT ModuleInfoList * get_aspell_module_info_list(Config * config)
{
return const_cast<ModuleInfoList *>(get_module_info_list(config));
}
-extern "C" int aspell_module_info_list_empty(const ModuleInfoList * ths)
+extern "C" ASPELL_EXPORT int aspell_module_info_list_empty(const ModuleInfoList * ths)
{
return ths->empty();
}
-extern "C" unsigned int aspell_module_info_list_size(const ModuleInfoList * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_module_info_list_size(const ModuleInfoList * ths)
{
return ths->size();
}
-extern "C" ModuleInfoEnumeration * aspell_module_info_list_elements(const ModuleInfoList * ths)
+extern "C" ASPELL_EXPORT ModuleInfoEnumeration * aspell_module_info_list_elements(const ModuleInfoList * ths)
{
return ths->elements();
}
-extern "C" DictInfoList * get_aspell_dict_info_list(Config * config)
+extern "C" ASPELL_EXPORT DictInfoList * get_aspell_dict_info_list(Config * config)
{
return const_cast<DictInfoList *>(get_dict_info_list(config));
}
-extern "C" int aspell_dict_info_list_empty(const DictInfoList * ths)
+extern "C" ASPELL_EXPORT int aspell_dict_info_list_empty(const DictInfoList * ths)
{
return ths->empty();
}
-extern "C" unsigned int aspell_dict_info_list_size(const DictInfoList * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_dict_info_list_size(const DictInfoList * ths)
{
return ths->size();
}
-extern "C" DictInfoEnumeration * aspell_dict_info_list_elements(const DictInfoList * ths)
+extern "C" ASPELL_EXPORT DictInfoEnumeration * aspell_dict_info_list_elements(const DictInfoList * ths)
{
return ths->elements();
}
-extern "C" int aspell_module_info_enumeration_at_end(const ModuleInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT int aspell_module_info_enumeration_at_end(const ModuleInfoEnumeration * ths)
{
return ths->at_end();
}
-extern "C" const ModuleInfo * aspell_module_info_enumeration_next(ModuleInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT const ModuleInfo * aspell_module_info_enumeration_next(ModuleInfoEnumeration * ths)
{
return ths->next();
}
-extern "C" void delete_aspell_module_info_enumeration(ModuleInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_module_info_enumeration(ModuleInfoEnumeration * ths)
{
delete ths;
}
-extern "C" ModuleInfoEnumeration * aspell_module_info_enumeration_clone(const ModuleInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT ModuleInfoEnumeration * aspell_module_info_enumeration_clone(const ModuleInfoEnumeration * ths)
{
return ths->clone();
}
-extern "C" void aspell_module_info_enumeration_assign(ModuleInfoEnumeration * ths, const ModuleInfoEnumeration * other)
+extern "C" ASPELL_EXPORT void aspell_module_info_enumeration_assign(ModuleInfoEnumeration * ths, const ModuleInfoEnumeration * other)
{
ths->assign(other);
}
-extern "C" int aspell_dict_info_enumeration_at_end(const DictInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT int aspell_dict_info_enumeration_at_end(const DictInfoEnumeration * ths)
{
return ths->at_end();
}
-extern "C" const DictInfo * aspell_dict_info_enumeration_next(DictInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT const DictInfo * aspell_dict_info_enumeration_next(DictInfoEnumeration * ths)
{
return ths->next();
}
-extern "C" void delete_aspell_dict_info_enumeration(DictInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_dict_info_enumeration(DictInfoEnumeration * ths)
{
delete ths;
}
-extern "C" DictInfoEnumeration * aspell_dict_info_enumeration_clone(const DictInfoEnumeration * ths)
+extern "C" ASPELL_EXPORT DictInfoEnumeration * aspell_dict_info_enumeration_clone(const DictInfoEnumeration * ths)
{
return ths->clone();
}
-extern "C" void aspell_dict_info_enumeration_assign(DictInfoEnumeration * ths, const DictInfoEnumeration * other)
+extern "C" ASPELL_EXPORT void aspell_dict_info_enumeration_assign(DictInfoEnumeration * ths, const DictInfoEnumeration * other)
{
ths->assign(other);
}
diff -Nru aspell-0.60.6.orig/lib/mutable_container-c.cpp aspell-0.60.6/lib/mutable_container-c.cpp
--- aspell-0.60.6.orig/lib/mutable_container-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/mutable_container-c.cpp 2010-07-26 09:51:53.417585000 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -13,22 +14,22 @@
class MutableContainer;
-extern "C" int aspell_mutable_container_add(MutableContainer * ths, const char * to_add)
+extern "C" ASPELL_EXPORT int aspell_mutable_container_add(MutableContainer * ths, const char * to_add)
{
return ths->add(to_add);
}
-extern "C" int aspell_mutable_container_remove(MutableContainer * ths, const char * to_rem)
+extern "C" ASPELL_EXPORT int aspell_mutable_container_remove(MutableContainer * ths, const char * to_rem)
{
return ths->remove(to_rem);
}
-extern "C" void aspell_mutable_container_clear(MutableContainer * ths)
+extern "C" ASPELL_EXPORT void aspell_mutable_container_clear(MutableContainer * ths)
{
ths->clear();
}
-extern "C" MutableContainer * aspell_mutable_container_to_mutable_container(MutableContainer * ths)
+extern "C" ASPELL_EXPORT MutableContainer * aspell_mutable_container_to_mutable_container(MutableContainer * ths)
{
return ths;
}
diff -Nru aspell-0.60.6.orig/lib/speller-c.cpp aspell-0.60.6/lib/speller-c.cpp
--- aspell-0.60.6.orig/lib/speller-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/speller-c.cpp 2010-07-26 09:51:54.131625900 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -21,7 +22,7 @@
class Speller;
class WordList;
-extern "C" CanHaveError * new_aspell_speller(Config * config)
+extern "C" ASPELL_EXPORT CanHaveError * new_aspell_speller(Config * config)
{
PosibErr<Speller *> ret = new_speller(config);
if (ret.has_err()) {
@@ -31,37 +32,37 @@
}
}
-extern "C" Speller * to_aspell_speller(CanHaveError * obj)
+extern "C" ASPELL_EXPORT Speller * to_aspell_speller(CanHaveError * obj)
{
return static_cast<Speller *>(obj);
}
-extern "C" void delete_aspell_speller(Speller * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_speller(Speller * ths)
{
delete ths;
}
-extern "C" unsigned int aspell_speller_error_number(const Speller * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_speller_error_number(const Speller * ths)
{
return ths->err_ == 0 ? 0 : 1;
}
-extern "C" const char * aspell_speller_error_message(const Speller * ths)
+extern "C" ASPELL_EXPORT const char * aspell_speller_error_message(const Speller * ths)
{
return ths->err_ ? ths->err_->mesg : "";
}
-extern "C" const Error * aspell_speller_error(const Speller * ths)
+extern "C" ASPELL_EXPORT const Error * aspell_speller_error(const Speller * ths)
{
return ths->err_;
}
-extern "C" Config * aspell_speller_config(Speller * ths)
+extern "C" ASPELL_EXPORT Config * aspell_speller_config(Speller * ths)
{
return ths->config();
}
-extern "C" int aspell_speller_check(Speller * ths, const char * word, int word_size)
+extern "C" ASPELL_EXPORT int aspell_speller_check(Speller * ths, const char * word, int word_size)
{
ths->temp_str_0.clear();
ths->to_internal_->convert(word, word_size, ths->temp_str_0);
@@ -72,7 +73,7 @@
return ret.data;
}
-extern "C" int aspell_speller_add_to_personal(Speller * ths, const char * word, int word_size)
+extern "C" ASPELL_EXPORT int aspell_speller_add_to_personal(Speller * ths, const char * word, int word_size)
{
ths->temp_str_0.clear();
ths->to_internal_->convert(word, word_size, ths->temp_str_0);
@@ -83,7 +84,7 @@
return 1;
}
-extern "C" int aspell_speller_add_to_session(Speller * ths, const char * word, int word_size)
+extern "C" ASPELL_EXPORT int aspell_speller_add_to_session(Speller * ths, const char * word, int word_size)
{
ths->temp_str_0.clear();
ths->to_internal_->convert(word, word_size, ths->temp_str_0);
@@ -94,7 +95,7 @@
return 1;
}
-extern "C" const WordList * aspell_speller_personal_word_list(Speller * ths)
+extern "C" ASPELL_EXPORT const WordList * aspell_speller_personal_word_list(Speller * ths)
{
PosibErr<const WordList *> ret = ths->personal_word_list();
ths->err_.reset(ret.release_err());
@@ -104,7 +105,7 @@
return ret.data;
}
-extern "C" const WordList * aspell_speller_session_word_list(Speller * ths)
+extern "C" ASPELL_EXPORT const WordList * aspell_speller_session_word_list(Speller * ths)
{
PosibErr<const WordList *> ret = ths->session_word_list();
ths->err_.reset(ret.release_err());
@@ -114,7 +115,7 @@
return ret.data;
}
-extern "C" const WordList * aspell_speller_main_word_list(Speller * ths)
+extern "C" ASPELL_EXPORT const WordList * aspell_speller_main_word_list(Speller * ths)
{
PosibErr<const WordList *> ret = ths->main_word_list();
ths->err_.reset(ret.release_err());
@@ -124,7 +125,7 @@
return ret.data;
}
-extern "C" int aspell_speller_save_all_word_lists(Speller * ths)
+extern "C" ASPELL_EXPORT int aspell_speller_save_all_word_lists(Speller * ths)
{
PosibErr<void> ret = ths->save_all_word_lists();
ths->err_.reset(ret.release_err());
@@ -132,7 +133,7 @@
return 1;
}
-extern "C" int aspell_speller_clear_session(Speller * ths)
+extern "C" ASPELL_EXPORT int aspell_speller_clear_session(Speller * ths)
{
PosibErr<void> ret = ths->clear_session();
ths->err_.reset(ret.release_err());
@@ -140,7 +141,7 @@
return 1;
}
-extern "C" const WordList * aspell_speller_suggest(Speller * ths, const char * word, int word_size)
+extern "C" ASPELL_EXPORT const WordList * aspell_speller_suggest(Speller * ths, const char * word, int word_size)
{
ths->temp_str_0.clear();
ths->to_internal_->convert(word, word_size, ths->temp_str_0);
@@ -153,7 +154,7 @@
return ret.data;
}
-extern "C" int aspell_speller_store_replacement(Speller * ths, const char * mis, int mis_size, const char * cor, int cor_size)
+extern "C" ASPELL_EXPORT int aspell_speller_store_replacement(Speller * ths, const char * mis, int mis_size, const char * cor, int cor_size)
{
ths->temp_str_0.clear();
ths->to_internal_->convert(mis, mis_size, ths->temp_str_0);
diff -Nru aspell-0.60.6.orig/lib/string_enumeration-c.cpp aspell-0.60.6/lib/string_enumeration-c.cpp
--- aspell-0.60.6.orig/lib/string_enumeration-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/string_enumeration-c.cpp 2010-07-26 09:51:53.905613000 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -13,27 +14,27 @@
class StringEnumeration;
-extern "C" void delete_aspell_string_enumeration(StringEnumeration * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_string_enumeration(StringEnumeration * ths)
{
delete ths;
}
-extern "C" StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths)
+extern "C" ASPELL_EXPORT StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths)
{
return ths->clone();
}
-extern "C" void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other)
+extern "C" ASPELL_EXPORT void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other)
{
ths->assign(other);
}
-extern "C" int aspell_string_enumeration_at_end(const StringEnumeration * ths)
+extern "C" ASPELL_EXPORT int aspell_string_enumeration_at_end(const StringEnumeration * ths)
{
return ths->at_end();
}
-extern "C" const char * aspell_string_enumeration_next(StringEnumeration * ths)
+extern "C" ASPELL_EXPORT const char * aspell_string_enumeration_next(StringEnumeration * ths)
{
const char * s = ths->next();
if (s == 0 || ths->from_internal_ == 0) {
diff -Nru aspell-0.60.6.orig/lib/string_list-c.cpp aspell-0.60.6/lib/string_list-c.cpp
--- aspell-0.60.6.orig/lib/string_list-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/string_list-c.cpp 2010-07-26 09:51:53.995618100 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -15,57 +16,57 @@
class StringEnumeration;
class StringList;
-extern "C" StringList * new_aspell_string_list()
+extern "C" ASPELL_EXPORT StringList * new_aspell_string_list()
{
return new_string_list();
}
-extern "C" int aspell_string_list_empty(const StringList * ths)
+extern "C" ASPELL_EXPORT int aspell_string_list_empty(const StringList * ths)
{
return ths->empty();
}
-extern "C" unsigned int aspell_string_list_size(const StringList * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_string_list_size(const StringList * ths)
{
return ths->size();
}
-extern "C" StringEnumeration * aspell_string_list_elements(const StringList * ths)
+extern "C" ASPELL_EXPORT StringEnumeration * aspell_string_list_elements(const StringList * ths)
{
return ths->elements();
}
-extern "C" int aspell_string_list_add(StringList * ths, const char * to_add)
+extern "C" ASPELL_EXPORT int aspell_string_list_add(StringList * ths, const char * to_add)
{
return ths->add(to_add);
}
-extern "C" int aspell_string_list_remove(StringList * ths, const char * to_rem)
+extern "C" ASPELL_EXPORT int aspell_string_list_remove(StringList * ths, const char * to_rem)
{
return ths->remove(to_rem);
}
-extern "C" void aspell_string_list_clear(StringList * ths)
+extern "C" ASPELL_EXPORT void aspell_string_list_clear(StringList * ths)
{
ths->clear();
}
-extern "C" MutableContainer * aspell_string_list_to_mutable_container(StringList * ths)
+extern "C" ASPELL_EXPORT MutableContainer * aspell_string_list_to_mutable_container(StringList * ths)
{
return ths;
}
-extern "C" void delete_aspell_string_list(StringList * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_string_list(StringList * ths)
{
delete ths;
}
-extern "C" StringList * aspell_string_list_clone(const StringList * ths)
+extern "C" ASPELL_EXPORT StringList * aspell_string_list_clone(const StringList * ths)
{
return ths->clone();
}
-extern "C" void aspell_string_list_assign(StringList * ths, const StringList * other)
+extern "C" ASPELL_EXPORT void aspell_string_list_assign(StringList * ths, const StringList * other)
{
ths->assign(other);
}
diff -Nru aspell-0.60.6.orig/lib/string_map-c.cpp aspell-0.60.6/lib/string_map-c.cpp
--- aspell-0.60.6.orig/lib/string_map-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/string_map-c.cpp 2010-07-26 09:51:53.687600500 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -15,72 +16,72 @@
class StringMap;
class StringPairEnumeration;
-extern "C" StringMap * new_aspell_string_map()
+extern "C" ASPELL_EXPORT StringMap * new_aspell_string_map()
{
return new_string_map();
}
-extern "C" int aspell_string_map_add(StringMap * ths, const char * to_add)
+extern "C" ASPELL_EXPORT int aspell_string_map_add(StringMap * ths, const char * to_add)
{
return ths->add(to_add);
}
-extern "C" int aspell_string_map_remove(StringMap * ths, const char * to_rem)
+extern "C" ASPELL_EXPORT int aspell_string_map_remove(StringMap * ths, const char * to_rem)
{
return ths->remove(to_rem);
}
-extern "C" void aspell_string_map_clear(StringMap * ths)
+extern "C" ASPELL_EXPORT void aspell_string_map_clear(StringMap * ths)
{
ths->clear();
}
-extern "C" MutableContainer * aspell_string_map_to_mutable_container(StringMap * ths)
+extern "C" ASPELL_EXPORT MutableContainer * aspell_string_map_to_mutable_container(StringMap * ths)
{
return ths;
}
-extern "C" void delete_aspell_string_map(StringMap * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_string_map(StringMap * ths)
{
delete ths;
}
-extern "C" StringMap * aspell_string_map_clone(const StringMap * ths)
+extern "C" ASPELL_EXPORT StringMap * aspell_string_map_clone(const StringMap * ths)
{
return ths->clone();
}
-extern "C" void aspell_string_map_assign(StringMap * ths, const StringMap * other)
+extern "C" ASPELL_EXPORT void aspell_string_map_assign(StringMap * ths, const StringMap * other)
{
ths->assign(other);
}
-extern "C" int aspell_string_map_empty(const StringMap * ths)
+extern "C" ASPELL_EXPORT int aspell_string_map_empty(const StringMap * ths)
{
return ths->empty();
}
-extern "C" unsigned int aspell_string_map_size(const StringMap * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_string_map_size(const StringMap * ths)
{
return ths->size();
}
-extern "C" StringPairEnumeration * aspell_string_map_elements(const StringMap * ths)
+extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_string_map_elements(const StringMap * ths)
{
return ths->elements();
}
-extern "C" int aspell_string_map_insert(StringMap * ths, const char * key, const char * value)
+extern "C" ASPELL_EXPORT int aspell_string_map_insert(StringMap * ths, const char * key, const char * value)
{
return ths->insert(key, value);
}
-extern "C" int aspell_string_map_replace(StringMap * ths, const char * key, const char * value)
+extern "C" ASPELL_EXPORT int aspell_string_map_replace(StringMap * ths, const char * key, const char * value)
{
return ths->replace(key, value);
}
-extern "C" const char * aspell_string_map_lookup(const StringMap * ths, const char * key)
+extern "C" ASPELL_EXPORT const char * aspell_string_map_lookup(const StringMap * ths, const char * key)
{
return ths->lookup(key);
}
diff -Nru aspell-0.60.6.orig/lib/string_pair_enumeration-c.cpp aspell-0.60.6/lib/string_pair_enumeration-c.cpp
--- aspell-0.60.6.orig/lib/string_pair_enumeration-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/string_pair_enumeration-c.cpp 2010-07-26 09:51:54.208630300 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -13,27 +14,27 @@
class StringPairEnumeration;
-extern "C" int aspell_string_pair_enumeration_at_end(const StringPairEnumeration * ths)
+extern "C" ASPELL_EXPORT int aspell_string_pair_enumeration_at_end(const StringPairEnumeration * ths)
{
return ths->at_end();
}
-extern "C" StringPair aspell_string_pair_enumeration_next(StringPairEnumeration * ths)
+extern "C" ASPELL_EXPORT StringPair aspell_string_pair_enumeration_next(StringPairEnumeration * ths)
{
return ths->next();
}
-extern "C" void delete_aspell_string_pair_enumeration(StringPairEnumeration * ths)
+extern "C" ASPELL_EXPORT void delete_aspell_string_pair_enumeration(StringPairEnumeration * ths)
{
delete ths;
}
-extern "C" StringPairEnumeration * aspell_string_pair_enumeration_clone(const StringPairEnumeration * ths)
+extern "C" ASPELL_EXPORT StringPairEnumeration * aspell_string_pair_enumeration_clone(const StringPairEnumeration * ths)
{
return ths->clone();
}
-extern "C" void aspell_string_pair_enumeration_assign(StringPairEnumeration * ths, const StringPairEnumeration * other)
+extern "C" ASPELL_EXPORT void aspell_string_pair_enumeration_assign(StringPairEnumeration * ths, const StringPairEnumeration * other)
{
ths->assign(other);
}
diff -Nru aspell-0.60.6.orig/lib/word_list-c.cpp aspell-0.60.6/lib/word_list-c.cpp
--- aspell-0.60.6.orig/lib/word_list-c.cpp 2008-04-07 06:31:19.000000000 +0200
+++ aspell-0.60.6/lib/word_list-c.cpp 2010-07-26 09:51:53.065564900 +0200
@@ -1,3 +1,4 @@
+#include "aspell_export.h"
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
@@ -14,17 +15,17 @@
class StringEnumeration;
class WordList;
-extern "C" int aspell_word_list_empty(const WordList * ths)
+extern "C" ASPELL_EXPORT int aspell_word_list_empty(const WordList * ths)
{
return ths->empty();
}
-extern "C" unsigned int aspell_word_list_size(const WordList * ths)
+extern "C" ASPELL_EXPORT unsigned int aspell_word_list_size(const WordList * ths)
{
return ths->size();
}
-extern "C" StringEnumeration * aspell_word_list_elements(const WordList * ths)
+extern "C" ASPELL_EXPORT StringEnumeration * aspell_word_list_elements(const WordList * ths)
{
StringEnumeration * els = ths->elements();
els->from_internal_ = ths->from_internal_;
diff -Nru aspell-0.60.6.orig/modules/speller/default/affix.hpp aspell-0.60.6/modules/speller/default/affix.hpp
--- aspell-0.60.6.orig/modules/speller/default/affix.hpp 2007-12-03 02:51:23.000000000 +0100
+++ aspell-0.60.6/modules/speller/default/affix.hpp 2010-07-26 09:49:01.874874400 +0200
@@ -19,6 +19,8 @@
#include "char_vector.hpp"
#include "objstack.hpp"
+#include "aspell_export.h"
+
#define SETSIZE 256
#define MAXAFFIXES 256
#define MAXWORDLEN 255
@@ -58,7 +60,7 @@
enum CheckAffixRes {InvalidAffix, InapplicableAffix, ValidAffix};
- class AffixMgr
+ class ASPELL_EXPORT AffixMgr
{
const Language * lang;
diff -Nru aspell-0.60.6.orig/modules/speller/default/data.hpp aspell-0.60.6/modules/speller/default/data.hpp
--- aspell-0.60.6.orig/modules/speller/default/data.hpp 2004-05-24 06:50:27.000000000 +0200
+++ aspell-0.60.6/modules/speller/default/data.hpp 2010-07-26 09:49:01.891875400 +0200
@@ -15,6 +15,8 @@
#include "cache.hpp"
#include "wordinfo.hpp"
+#include "aspell_export.h"
+
using namespace acommon;
namespace acommon {
@@ -31,7 +33,7 @@
typedef Enumeration<WordEntry *> WordEntryEnumeration;
typedef Enumeration<Dictionary *> DictsEnumeration;
- class SoundslikeEnumeration
+ class ASPELL_EXPORT SoundslikeEnumeration
{
public:
virtual WordEntry * next(int) = 0;
@@ -170,7 +172,7 @@
return !(rhs == lhs);
}
- class DictList {
+ class ASPELL_EXPORT DictList {
// well a stack at the moment but it may eventually become a list
// NOT necessarily first in first out
Vector<Dict *> data;
@@ -195,7 +197,7 @@
static const DataType DT_Any = 0xFF;
// any new extra dictionaries that were loaded will be ii
- PosibErr<Dict *> add_data_set(ParmString file_name,
+ PosibErr<Dict *> ASPELL_EXPORT add_data_set(ParmString file_name,
Config &,
DictList * other_dicts = 0,
SpellerImpl * = 0,
@@ -203,19 +205,19 @@
DataType allowed = DT_Any);
// implemented in readonly_ws.cc
- Dictionary * new_default_readonly_dict();
+ ASPELL_EXPORT Dictionary * new_default_readonly_dict();
- PosibErr<void> create_default_readonly_dict(StringEnumeration * els,
+ PosibErr<void> ASPELL_EXPORT create_default_readonly_dict(StringEnumeration * els,
Config & config);
// implemented in multi_ws.cc
- MultiDict * new_default_multi_dict();
+ ASPELL_EXPORT MultiDict * new_default_multi_dict();
// implemented in writable.cpp
- Dictionary * new_default_writable_dict();
+ ASPELL_EXPORT Dictionary * new_default_writable_dict();
// implemented in writable.cpp
- ReplacementDict * new_default_replacement_dict();
+ ASPELL_EXPORT ReplacementDict * new_default_replacement_dict();
}
#endif
diff -Nru aspell-0.60.6.orig/modules/speller/default/language.cpp aspell-0.60.6/modules/speller/default/language.cpp
--- aspell-0.60.6.orig/modules/speller/default/language.cpp 2005-02-20 22:47:07.000000000 +0100
+++ aspell-0.60.6/modules/speller/default/language.cpp 2010-07-26 09:49:01.914876700 +0200
@@ -26,6 +26,10 @@
#include "gettext.h"
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
namespace aspeller {
static const char TO_CHAR_TYPE[256] = {
diff -Nru aspell-0.60.6.orig/modules/speller/default/language.hpp aspell-0.60.6/modules/speller/default/language.hpp
--- aspell-0.60.6.orig/modules/speller/default/language.hpp 2005-02-20 22:47:08.000000000 +0100
+++ aspell-0.60.6/modules/speller/default/language.hpp 2010-07-26 09:49:01.933877800 +0200
@@ -14,6 +14,8 @@
#include "objstack.hpp"
#include "string_enumeration.hpp"
+#include "aspell_export.h"
+
#include "iostream.hpp"
using namespace acommon;
@@ -60,7 +62,7 @@
enum StoreAs {Stripped, Lower};
- class Language : public Cacheable {
+ class ASPELL_EXPORT Language : public Cacheable {
public:
typedef const Config CacheConfig;
typedef String CacheKey;
@@ -424,7 +426,7 @@
char * operator() (ParmStr word, char * aff);
};
- class WordListIterator
+ class ASPELL_EXPORT WordListIterator
{
public:
struct Value {
@@ -458,18 +460,18 @@
CleanAffix clean_affix;
};
- String get_stripped_chars(const Language & l);
+ String ASPELL_EXPORT get_stripped_chars(const Language & l);
- String get_clean_chars(const Language & l);
+ String ASPELL_EXPORT get_clean_chars(const Language & l);
- PosibErr<void> check_if_valid(const Language & l, ParmStr word);
- PosibErr<void> validate_affix(const Language & l, ParmStr word, ParmStr aff);
+ PosibErr<void> ASPELL_EXPORT check_if_valid(const Language & l, ParmStr word);
+ PosibErr<void> ASPELL_EXPORT validate_affix(const Language & l, ParmStr word, ParmStr aff);
- bool find_language(Config & c);
+ bool ASPELL_EXPORT find_language(Config & c);
- PosibErr<Language *> new_language(const Config &, ParmStr lang = 0);
+ PosibErr<Language *> ASPELL_EXPORT new_language(const Config &, ParmStr lang = 0);
- PosibErr<void> open_affix_file(const Config &, FStream & o);
+ PosibErr<void> ASPELL_EXPORT open_affix_file(const Config &, FStream & o);
}
diff -Nru aspell-0.60.6.orig/modules/speller/default/speller_impl.hpp aspell-0.60.6/modules/speller/default/speller_impl.hpp
--- aspell-0.60.6.orig/modules/speller/default/speller_impl.hpp 2007-10-13 10:20:17.000000000 +0200
+++ aspell-0.60.6/modules/speller/default/speller_impl.hpp 2010-07-26 09:49:01.953878900 +0200
@@ -27,7 +27,7 @@
namespace aspeller {
class Language;
- class SensitiveCompare;
+ struct SensitiveCompare;
class Suggest;
enum SpecialId {main_id, personal_id, session_id,
diff -Nru aspell-0.60.6.orig/modules/speller/default/wordinfo.hpp aspell-0.60.6/modules/speller/default/wordinfo.hpp
--- aspell-0.60.6.orig/modules/speller/default/wordinfo.hpp 2004-05-24 06:50:29.000000000 +0200
+++ aspell-0.60.6/modules/speller/default/wordinfo.hpp 2010-07-26 09:49:01.967879700 +0200
@@ -6,6 +6,8 @@
#include <assert.h>
#include "string.hpp"
+#include "aspell_export.h"
+
namespace acommon {
class OStream;
class Convert;
@@ -35,7 +37,7 @@
struct ConvertWord;
// WordEntry is an entry in the dictionary.
- struct WordEntry
+ struct ASPELL_EXPORT WordEntry
{
const char * word;
const char * aff;
diff -Nru aspell-0.60.6.orig/symbols.def aspell-0.60.6/symbols.def
--- aspell-0.60.6.orig/symbols.def 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/symbols.def 2010-07-26 09:49:01.983880600 +0200
@@ -0,0 +1,210 @@
+LIBRARY aspell.DLL
+EXPORTS
+aerror_affix
+aerror_bad_file_format
+aerror_bad_input
+aerror_bad_key
+aerror_bad_magic
+aerror_bad_mode_key
+aerror_bad_mode_version
+aerror_bad_value
+aerror_bad_version
+aerror_bad_version_string
+aerror_cant_change_value
+aerror_cant_copy
+aerror_cant_create_pipe
+aerror_cant_describe_filter
+aerror_cant_dlopen_file
+aerror_cant_open_file
+aerror_cant_read_dir
+aerror_cant_read_file
+aerror_cant_write_file
+aerror_config
+aerror_conflicting_flags
+aerror_confusing_mode_version
+aerror_confusing_version
+aerror_conversion_not_supported
+aerror_corrupt_affix
+aerror_dir
+aerror_duplicate
+aerror_empty_file_ext
+aerror_empty_filter
+aerror_encoding
+aerror_encoding_not_supported
+aerror_expect_mode_key
+aerror_expression
+aerror_file
+aerror_file_magic_pos
+aerror_file_magic_range
+aerror_filter
+aerror_filter_mode_expand
+aerror_filter_mode_file
+aerror_filter_mode_magic
+aerror_identical_option
+aerror_inapplicable_affix
+aerror_incorrect_encoding
+aerror_invalid_affix
+aerror_invalid_cond
+aerror_invalid_cond_strip
+aerror_invalid_expression
+aerror_invalid_flag
+aerror_invalid_name
+aerror_invalid_option_modifier
+aerror_invalid_string
+aerror_invalid_word
+aerror_key_not_bool
+aerror_key_not_int
+aerror_key_not_list
+aerror_key_not_string
+aerror_language_not_supported
+aerror_language_related
+aerror_mismatched_language
+aerror_missing_magic
+aerror_missing_magic_expression
+aerror_mode_extend_expand
+aerror_mode_option_name
+aerror_mode_version_requirement
+aerror_no_filter_to_option
+aerror_no_such_filter
+aerror_no_value_clear
+aerror_no_value_disable
+aerror_no_value_enable
+aerror_no_value_reset
+aerror_no_wordlist_for_lang
+aerror_operation_not_supported
+aerror_options_only
+aerror_other
+aerror_pipe
+aerror_process_died
+aerror_unimplemented_method
+aerror_unknown_encoding
+aerror_unknown_key
+aerror_unknown_language
+aerror_unknown_mode
+aerror_unknown_soundslike
+aerror_unknown_unichar
+aerror_version_control
+aerror_word_list_flags
+aspell_config_assign
+aspell_config_clone
+aspell_config_elements
+aspell_config_error
+aspell_config_error_message
+aspell_config_error_number
+aspell_config_get_default
+aspell_config_have
+aspell_config_keyinfo
+aspell_config_possible_elements
+aspell_config_remove
+aspell_config_replace
+aspell_config_retrieve
+aspell_config_retrieve_bool
+aspell_config_retrieve_int
+aspell_config_retrieve_list
+aspell_config_set_extra
+aspell_dict_info_enumeration_assign
+aspell_dict_info_enumeration_at_end
+aspell_dict_info_enumeration_clone
+aspell_dict_info_enumeration_next
+aspell_dict_info_list_elements
+aspell_dict_info_list_empty
+aspell_dict_info_list_size
+aspell_document_checker_error
+aspell_document_checker_error_message
+aspell_document_checker_error_number
+aspell_document_checker_filter
+aspell_document_checker_next_misspelling
+aspell_document_checker_process
+aspell_document_checker_reset
+aspell_error
+aspell_error_is_a
+aspell_error_message
+aspell_error_number
+aspell_filter_error
+aspell_filter_error_message
+aspell_filter_error_number
+aspell_gettext_init
+aspell_key_info_enumeration_assign
+aspell_key_info_enumeration_at_end
+aspell_key_info_enumeration_clone
+aspell_key_info_enumeration_next
+aspell_module_info_enumeration_assign
+aspell_module_info_enumeration_at_end
+aspell_module_info_enumeration_clone
+aspell_module_info_enumeration_next
+aspell_module_info_list_elements
+aspell_module_info_list_empty
+aspell_module_info_list_size
+aspell_mutable_container_add
+aspell_mutable_container_clear
+aspell_mutable_container_remove
+aspell_mutable_container_to_mutable_container
+aspell_speller_add_to_personal
+aspell_speller_add_to_session
+aspell_speller_check
+aspell_speller_clear_session
+aspell_speller_config
+aspell_speller_error
+aspell_speller_error_message
+aspell_speller_error_number
+aspell_speller_main_word_list
+aspell_speller_personal_word_list
+aspell_speller_save_all_word_lists
+aspell_speller_session_word_list
+aspell_speller_store_replacement
+aspell_speller_suggest
+aspell_string_enumeration_assign
+aspell_string_enumeration_at_end
+aspell_string_enumeration_clone
+aspell_string_enumeration_next
+aspell_string_list_add
+aspell_string_list_assign
+aspell_string_list_clear
+aspell_string_list_clone
+aspell_string_list_elements
+aspell_string_list_empty
+aspell_string_list_remove
+aspell_string_list_size
+aspell_string_list_to_mutable_container
+aspell_string_map_add
+aspell_string_map_assign
+aspell_string_map_clear
+aspell_string_map_clone
+aspell_string_map_elements
+aspell_string_map_empty
+aspell_string_map_insert
+aspell_string_map_lookup
+aspell_string_map_remove
+aspell_string_map_replace
+aspell_string_map_size
+aspell_string_map_to_mutable_container
+aspell_string_pair_enumeration_assign
+aspell_string_pair_enumeration_at_end
+aspell_string_pair_enumeration_clone
+aspell_string_pair_enumeration_next
+aspell_word_list_elements
+aspell_word_list_empty
+aspell_word_list_size
+delete_aspell_can_have_error
+delete_aspell_config
+delete_aspell_dict_info_enumeration
+delete_aspell_document_checker
+delete_aspell_filter
+delete_aspell_key_info_enumeration
+delete_aspell_module_info_enumeration
+delete_aspell_speller
+delete_aspell_string_enumeration
+delete_aspell_string_list
+delete_aspell_string_map
+delete_aspell_string_pair_enumeration
+get_aspell_dict_info_list
+get_aspell_module_info_list
+new_aspell_config
+new_aspell_document_checker
+new_aspell_speller
+new_aspell_string_list
+new_aspell_string_map
+;perror_bad_file_format
+to_aspell_document_checker
+to_aspell_filter
+to_aspell_speller
diff -Nru aspell-0.60.6.orig/win32/dirent.c aspell-0.60.6/win32/dirent.c
--- aspell-0.60.6.orig/win32/dirent.c 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/win32/dirent.c 2010-07-26 09:49:02.000881600 +0200
@@ -0,0 +1,149 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * Portions of this software are based upon public domain software
+ * originally written at the National Center for Supercomputing Applications,
+ * University of Illinois, Urbana-Champaign.
+ */
+
+#include <windows.h>
+
+#include <malloc.h>
+#include <string.h>
+#include <errno.h>
+
+#include "dirent.h"
+
+/**********************************************************************
+ * Implement dirent-style opendir/readdir/closedir on Window 95/NT
+ *
+ * Functions defined are opendir(), readdir() and closedir() with the
+ * same prototypes as the normal dirent.h implementation.
+ *
+ * Does not implement telldir(), seekdir(), rewinddir() or scandir().
+ * The dirent struct is compatible with Unix, except that d_ino is
+ * always 1 and d_off is made up as we go along.
+ *
+ * The DIR typedef is not compatible with Unix.
+ **********************************************************************/
+
+#ifndef __MINGW32__
+
+DIR * opendir(const char *dir)
+{
+ DIR *dp;
+ char *filespec;
+ long handle;
+ int index;
+
+ filespec = malloc(strlen(dir) + 2 + 1);
+ strcpy(filespec, dir);
+ index = strlen(filespec) - 1;
+ if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\'))
+ filespec[index] = '\0';
+ strcat(filespec, "\\*");
+
+ dp = (DIR *)malloc(sizeof(DIR));
+ dp->offset = 0;
+ dp->finished = 0;
+ dp->dir = strdup(dir);
+
+ if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0) {
+ if (errno == ENOENT)
+ dp->finished = 1;
+ else
+ return NULL;
+ }
+
+ dp->handle = handle;
+ free(filespec);
+
+ return dp;
+}
+
+struct dirent * readdir(DIR *dp)
+{
+ if (!dp || dp->finished) return NULL;
+
+ if (dp->offset != 0) {
+ if (_findnext(dp->handle, &(dp->fileinfo)) < 0) {
+ dp->finished = 1;
+ /* posix does not set errno in this case */
+ errno = 0;
+ return NULL;
+ }
+ }
+ dp->offset++;
+
+ strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME);
+#ifdef ASPELL_HAVE_DIRENT_D_TYPE
+ dp->dent.d_type = DT_UNKNOWN;
+#endif
+ dp->dent.d_ino = 1;
+ dp->dent.d_reclen = strlen(dp->dent.d_name);
+ dp->dent.d_off = dp->offset;
+
+ return &(dp->dent);
+}
+
+int closedir(DIR *dp)
+{
+ if (!dp) return 0;
+ if ((HANDLE)dp->handle != INVALID_HANDLE_VALUE) _findclose(dp->handle);
+ if (dp->dir) free(dp->dir);
+ if (dp) free(dp);
+
+ return 0;
+}
+
+#endif // #ifndef __MINGW32__
diff -Nru aspell-0.60.6.orig/win32/dirent.h aspell-0.60.6/win32/dirent.h
--- aspell-0.60.6.orig/win32/dirent.h 1970-01-01 01:00:00.000000000 +0100
+++ aspell-0.60.6/win32/dirent.h 2010-07-26 09:49:02.029883300 +0200
@@ -0,0 +1,112 @@
+/* This file is part of the KDE project
+ Copyright (C) 2000 Werner Almesberger
+
+ libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ASPELL_DIRENT_H
+#define ASPELL_DIRENT_H
+
+// include everywhere
+#include <sys/types.h>
+
+#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */
+#define HAVE_DD_LOCK /* have locking mechanism */
+
+#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */
+
+#define __dirfd(dir) (dir)->dd_fd
+
+// this one should come from unistd.h originally, but it is easier to put it here:
+#define F_OK 0
+#define ASPELL_HAVE_DIRENT_D_TYPE
+enum
+ {
+ DT_UNKNOWN = 0,
+ DT_FIFO = 1,
+ DT_CHR = 2,
+ DT_DIR = 4,
+ DT_BLK = 6,
+ DT_REG = 8,
+ DT_LNK = 10,
+ DT_SOCK = 12,
+ DT_WHT = 14
+ };
+
+/* struct dirent - same as Unix */
+struct dirent {
+ long d_ino; /* inode (always 1 in WIN32) */
+ off_t d_off; /* offset to this dirent */
+ unsigned short d_reclen; /* length of d_name */
+ unsigned char d_type;
+ char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
+};
+
+/* typedef DIR - not the same as Unix */
+typedef struct {
+ long handle; /* _findfirst/_findnext handle */
+ short offset; /* offset into directory */
+ short finished; /* 1 if there are not more files */
+ struct _finddata_t fileinfo; /* from _findfirst/_findnext */
+ char *dir; /* the dir we are reading */
+ struct dirent dent; /* the dirent to return */
+} DIR;
+
+/* --- redundant --- */
+
+//DIR *opendir(const char *);
+//struct dirent *readdir(DIR *);
+//void rewinddir(DIR *);
+//int closedir(DIR *);
+
+/* internal prototype */
+void _seekdir(DIR *dir,off_t offset);
+
+//#ifndef _POSIX_SOURCE
+//long telldir (DIR *);
+//void seekdir (DIR *, off_t loc);
+
+int scandir (const char *__dir,
+ struct dirent ***__namelist,
+ int (*select) (const struct dirent *),
+ int (*compar) (const struct dirent **, const struct dirent **));
+
+DIR * opendir(const char *);
+int closedir(DIR *);
+struct dirent* readdir(DIR *);
+
+// Implement readdir_r(). For now do not provide dummy function to avoid setting HAVE_READDIR_R.
+// Code like DirectoryListThread::run() in kio/kio/kurlcompletion.cpp uses readdir() when !HAVE_READDIR_R.
+
+// struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
+
+int alphasort (const struct dirent **__a, const struct dirent **__b);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ASPELL_DIRENT_H
diff -Nru aspell-0.60.6.orig/win32/settings.h aspell-0.60.6/win32/settings.h
--- aspell-0.60.6.orig/win32/settings.h 2006-11-13 08:28:59.000000000 +0100
+++ aspell-0.60.6/win32/settings.h 2010-07-26 09:49:02.044884100 +0200
@@ -90,3 +90,5 @@
/* Version number of package */
#define VERSION "0.50.3"
+
+#define C_EXPORT extern "C" __declspec(dllexport)