aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorStephen Fisher <sfisher@sdf.org>2014-12-23 14:58:38 -0700
committerStephen Fisher <sfisher@sdf.org>2014-12-24 16:51:45 +0000
commit2d8ec49ffad14a1f1ea7a71c99e617bbfd0767a9 (patch)
tree714a232ac88a3631b37398520ace89902081e42b /wsutil
parent45daef629d249b1b632efa9fe9e1167a8cc1a936 (diff)
Move twelve show_version() functions from the varoius programs and
Wireshark UI files into a single one in wsutil. Change-Id: I0a64f0cc8106bd681bd185289c36272c4c43baad Reviewed-on: https://code.wireshark.org/review/6026 Reviewed-by: Stephen Fisher <sfisher@sdf.org>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/ws_version_info.c18
-rw-r--r--wsutil/ws_version_info.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/wsutil/ws_version_info.c b/wsutil/ws_version_info.c
index f3d5dc1789..4fb68dd2bc 100644
--- a/wsutil/ws_version_info.c
+++ b/wsutil/ws_version_info.c
@@ -22,11 +22,29 @@
#include "config.h"
+#include <stdio.h>
+
#include <glib.h>
#include "version.h"
#include <wsutil/ws_version_info.h>
+#include <wsutil/copyright_info.h>
+
+void
+show_version(const gchar *prog_name_str, GString *comp_info_str,
+ GString *runtime_info_str)
+{
+ printf("%s %s\n"
+ "\n"
+ "%s"
+ "\n"
+ "%s"
+ "\n"
+ "%s",
+ prog_name_str, get_ws_vcs_version_info(), get_copyright_info(),
+ comp_info_str->str, runtime_info_str->str);
+}
/*
* Return a version number string for Wireshark, including, for builds
diff --git a/wsutil/ws_version_info.h b/wsutil/ws_version_info.h
index e9e718e10e..6d573e2105 100644
--- a/wsutil/ws_version_info.h
+++ b/wsutil/ws_version_info.h
@@ -30,6 +30,8 @@
extern "C" {
#endif /* __cplusplus */
+WS_DLL_PUBLIC void show_version(const gchar *prog_name, GString *comp_info_str, GString *runtime_info_str);
+
/*
* Return a version number string for Wireshark, including, for builds
* from a tree checked out from Wireshark's version control system,