summaryrefslogtreecommitdiffstats
path: root/libversion/fullversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libversion/fullversion.cpp')
-rw-r--r--libversion/fullversion.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libversion/fullversion.cpp b/libversion/fullversion.cpp
new file mode 100644
index 0000000..dfc2b0d
--- /dev/null
+++ b/libversion/fullversion.cpp
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <version.h>
+
+const char *getFullVersion(void)
+{
+#define BUF_SIZE 100
+ static char fullVersionString[BUF_SIZE];
+ static bool init = false;
+ if (!init)
+ {
+ strlcpy(fullVersionString,getDoxygenVersion(),BUF_SIZE);
+ if (strlen(getGitVersion())>0)
+ {
+ strlcat(fullVersionString," (",BUF_SIZE);
+ strlcat(fullVersionString,getGitVersion(),BUF_SIZE);
+ strlcat(fullVersionString,")",BUF_SIZE);
+ }
+ fullVersionString[BUF_SIZE-1]='\0';
+ init = true;
+ }
+ return fullVersionString;
+}