Set Version 4.1
[src/app-framework-binder.git] / src / afb-config.c
index 7635575..016da83 100644 (file)
@@ -33,8 +33,9 @@
 #if !defined(BINDING_INSTALL_DIR)
 #error "you should define BINDING_INSTALL_DIR"
 #endif
-
-#define AFB_VERSION    "0.6"
+#if !defined(AFB_VERSION)
+#error "you should define AFB_VERSION"
+#endif
 
 // default
 #define DEFLT_CNTX_TIMEOUT  3600       // default Client Connection
@@ -229,14 +230,16 @@ static struct enumdesc mode_desc[] = {
  +--------------------------------------------------------- */
 static void printVersion(FILE * file)
 {
-       fprintf(file, "\n----------------------------------------- \n");
-       fprintf(file, "  AFB [Application Framework Binder] version=%s |\n",
-               AFB_VERSION);
-       fprintf(file, " \n");
-       fprintf(file,
-               "  Copyright (C) 2015, 2016, 2017 \"IoT.bzh\" [fulup -at- iot.bzh]\n");
-       fprintf(file, "  AFB comes with ABSOLUTELY NO WARRANTY.\n");
-       fprintf(file, "  Licence Apache 2\n\n");
+       static const char version[] =
+               "\n"
+               "  AFB [Application Framework Binder] version="AFB_VERSION"\n"
+               "\n"
+               "  Copyright (C) 2015, 2016, 2017 \"IoT.bzh\"\n"
+               "  AFB comes with ABSOLUTELY NO WARRANTY.\n"
+               "  Licence Apache 2\n"
+               "\n";
+
+       fprintf(file, "%s", version);
 }
 
 /*----------------------------------------------------------