summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2010-01-11 12:39:57 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2010-01-11 12:39:57 +0000
commitcbeb3cc775abc4656d725036996bcb303cfbc5a9 (patch)
tree41bc35387909e226fbec4e6d1b0a628a61e32a97
parent87af64438238ce5931cf0afad271f49320e37192 (diff)
downloadenchant-cbeb3cc775abc4656d725036996bcb303cfbc5a9.tar.gz
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
-rw-r--r--src/Makefile.am2
-rw-r--r--src/enchant.c5
-rw-r--r--src/enchant.h4
3 files changed, 10 insertions, 1 deletions
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)