aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ini_read.c10
-rw-r--r--src/lightconfini.h1
-rw-r--r--src/main.c9
3 files changed, 19 insertions, 1 deletions
diff --git a/src/ini_read.c b/src/ini_read.c
index e58bc80..b712163 100644
--- a/src/ini_read.c
+++ b/src/ini_read.c
@@ -994,3 +994,13 @@ int lciniGetFromFileStr(const char *filename, const char *section, const char *p
}
return r;
}
+
+
+char *lciniGetVersionStr(void){
+#ifdef GIT_LAST
+ char *ret = GIT_LAST;
+# else
+ char *ret = "";
+#endif
+ return ret;
+} \ No newline at end of file
diff --git a/src/lightconfini.h b/src/lightconfini.h
index 748e1cd..44929db 100644
--- a/src/lightconfini.h
+++ b/src/lightconfini.h
@@ -59,6 +59,7 @@ size_t lciniFileMaxLineLen(FILE *tfd);
lcini_shortret *lciniMKShortRet(int bufflen);
void lciniDestroyShortRet(lcini_shortret *dt);
+char *lciniGetVersionStr(void);
#endif /* LIGHTCONFINI_H_INCLUDED */
diff --git a/src/main.c b/src/main.c
index ff84fd4..c5d9690 100644
--- a/src/main.c
+++ b/src/main.c
@@ -60,6 +60,7 @@ int main(int argc, char* argv[]){
/*lcini_data *(*lciniCreateNode)( lcini_data *head, int lineLen ); */
/*lcini_shortret *(*lciniMKShortRet)(int bufflen); */
void (*lciniDestroyShortRet)(lcini_shortret *dt);
+ char *(*lciniGetVersionStr)(void);
#endif
if(argc > 1){
memset(filename, 0, 4096);
@@ -78,6 +79,8 @@ int main(int argc, char* argv[]){
if(!hl){
printf("\nDynamic Library load error - %s \nexit\n",dlerror());
exit(1);
+ } else {
+ printf("\nDynamic Library loaded: %s", linkpath);
}
lciniFileMaxLineLen = dlsym(hl, "lciniFileMaxLineLen");
if((buff1 = dlerror()) != NULL){
@@ -127,8 +130,11 @@ int main(int argc, char* argv[]){
if((buff1 = dlerror()) != NULL){
printf("\nsym err - %s\n", buff1);
}
+ lciniGetVersionStr = dlsym(hl, "lciniGetVersionStr");
+ if((buff1 = dlerror()) != NULL){
+ printf("\nsym err - %s\n", buff1);
+ }
-
#endif
@@ -233,6 +239,7 @@ int main(int argc, char* argv[]){
free(buff4);
free(buff5);
free(buff6);
+ printf("\n\nLightConfINI Version: %s \n", lciniGetVersionStr());
printf("\n -- end --\n");
#ifdef TESTLIBD
dlclose(hl);