From cbeb3cc775abc4656d725036996bcb303cfbc5a9 Mon Sep 17 00:00:00 2001 From: Dom Lachowicz Date: Mon, 11 Jan 2010 12:39:57 +0000 Subject: add a function to get enchant's version git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@28600 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6 --- src/Makefile.am | 2 +- src/enchant.c | 5 +++++ src/enchant.h | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 81de590..db69beb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS=. aspell ispell uspell myspell hspell applespell voikko zemberek -INCLUDES=-I$(top_srcdir) $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) -DENCHANT_GLOBAL_MODULE_DIR=\"$(libdir)/enchant\" -DENCHANT_GLOBAL_ORDERING=\"$(datadir)/enchant\" -D_ENCHANT_BUILD=1 +INCLUDES=-I$(top_srcdir) $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) -DENCHANT_GLOBAL_MODULE_DIR=\"$(libdir)/enchant\" -DENCHANT_GLOBAL_ORDERING=\"$(datadir)/enchant\" -D_ENCHANT_BUILD=1 -DENCHANT_VERSION_STRING=\"@ENCHANT_MAJOR_VERSION@.@ENCHANT_MINOR_VERSION@.@ENCHANT_MICRO_VERSION@\" lib_LTLIBRARIES = libenchant.la diff --git a/src/enchant.c b/src/enchant.c index 0446f1a..79fb21c 100644 --- a/src/enchant.c +++ b/src/enchant.c @@ -2330,3 +2330,8 @@ enchant_get_dirs_from_param (EnchantBroker * broker, const char * const param_na return dirs; } + +ENCHANT_MODULE_EXPORT(char *) +enchant_get_version (void) { + return ENCHANT_VERSION_STRING; +} diff --git a/src/enchant.h b/src/enchant.h index 785a326..bcc2fa4 100644 --- a/src/enchant.h +++ b/src/enchant.h @@ -51,6 +51,10 @@ extern "C" { typedef struct str_enchant_broker EnchantBroker; typedef struct str_enchant_dict EnchantDict; +/* const */ +ENCHANT_MODULE_EXPORT (char *) + enchant_get_version (void); + ENCHANT_MODULE_EXPORT (EnchantBroker *) enchant_broker_init (void); ENCHANT_MODULE_EXPORT (void) -- cgit v1.2.1