aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-12 00:07:46 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-12 00:07:46 +0000
commitab84d8be6efcc499b0239bb3c59df027158016cb (patch)
tree6812abf5405197bc61123201e2b7f570cbd50eaa /tethereal.c
parent50899dad380ce3ae6c846368f0e38b7ee3f1ae75 (diff)
Change the version messages to put the "compiled with" stuff on a
separate line, and to put the "running with" info on a separate line from that, to make the output narrower. svn path=/trunk/; revision=7344
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/tethereal.c b/tethereal.c
index cfb45c94c4..2a2a548be4 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.177 2003/03/08 07:00:46 guy Exp $
+ * $Id: tethereal.c,v 1.178 2003/03/12 00:07:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -104,7 +104,7 @@
static guint32 firstsec, firstusec;
static guint32 prevsec, prevusec;
-static GString *comp_info_str;
+static GString *comp_info_str, *runtime_info_str;
static gboolean quiet;
static gboolean decode;
static gboolean verbose;
@@ -214,8 +214,8 @@ print_usage(gboolean print_ver)
int i;
if (print_ver) {
- fprintf(stderr, "This is GNU t%s %s, compiled %s\n", PACKAGE, VERSION,
- comp_info_str->str);
+ fprintf(stderr, "This is GNU t%s %s\n%s\n%s\n", PACKAGE, VERSION,
+ comp_info_str->str, runtime_info_str->str);
}
#ifdef HAVE_LIBPCAP
fprintf(stderr, "\nt%s [ -DvVhqSlp ] [ -a <capture autostop condition> ] ...\n",
@@ -433,10 +433,13 @@ main(int argc, char *argv[])
init_cap_file(&cfile);
- /* Assemble the compile-time options */
- comp_info_str = g_string_new("");
+ /* Assemble the compile-time version information string */
+ comp_info_str = g_string_new("Compiled ");
+ get_compiled_version_info(comp_info_str);
- get_version_info(comp_info_str);
+ /* Assemble the run-time version information string */
+ runtime_info_str = g_string_new("Running ");
+ get_runtime_version_info(runtime_info_str);
/* Now get our args */
while ((opt = getopt(argc, argv, "a:b:c:Df:F:hi:lnN:o:pqr:R:s:St:vw:Vxz:")) != -1) {
@@ -618,7 +621,8 @@ main(int argc, char *argv[])
}
break;
case 'v': /* Show version and exit */
- printf("t%s %s, %s\n", PACKAGE, VERSION, comp_info_str->str);
+ printf("t%s %s\n%s\n%s\n", PACKAGE, VERSION, comp_info_str->str,
+ runtime_info_str->str);
exit(0);
break;
case 'w': /* Write to capture file xxx */