aboutsummaryrefslogtreecommitdiffstats
path: root/ui/commandline.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-12-12 18:16:15 -0800
committerGuy Harris <guy@alum.mit.edu>2018-12-13 03:16:13 +0000
commit43dfd45faa8af0b239a671b25ab6a398fa32f5c6 (patch)
tree3ea329a4f3f702e279169382614dcaf553e79431 /ui/commandline.c
parenta34cc98b2ac5a0ad011a1c3a40ce5e59230a9498 (diff)
Move more version-info-related stuff to version_info.c.
Have a ws_init_version_info() routine that, given an application name string: constructs the app-name-and-version-information string, and saves it; adds the initial crash information on platforms that support it, and saves it. Have show_version() use the saved information and take no arguments. Add a show_help_header() routine to print the header for --help command-line options, given a description of the application; it prints the application name and version information, the description, and the "See {wireshark.org URL}" line. Use those routines in various places, including providing the "application name" string in pcapng SHBs. Change-Id: I0042a8fcc91aa919ad5c381a8b8674a007ce66df Reviewed-on: https://code.wireshark.org/review/31029 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/commandline.c')
-rw-r--r--ui/commandline.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ui/commandline.c b/ui/commandline.c
index 7c0768a0b5..fc3c375a03 100644
--- a/ui/commandline.c
+++ b/ui/commandline.c
@@ -63,11 +63,8 @@ commandline_print_usage(gboolean for_help_option) {
#endif
if (for_help_option) {
+ show_help_header("Interactively dump and analyze network traffic.");
output = stdout;
- fprintf(output, "Wireshark %s\n"
- "Interactively dump and analyze network traffic.\n"
- "See https://www.wireshark.org for more information.\n",
- get_ws_vcs_version_info());
} else {
output = stderr;
}
@@ -204,8 +201,7 @@ static void print_no_capture_support_error(void)
}
#endif
-void commandline_early_options(int argc, char *argv[],
- GString *comp_info_str, GString *runtime_info_str)
+void commandline_early_options(int argc, char *argv[])
{
int opt;
#ifdef HAVE_LIBPCAP
@@ -305,7 +301,7 @@ void commandline_early_options(int argc, char *argv[],
#ifdef _WIN32
create_console();
#endif
- show_version("Wireshark", comp_info_str, runtime_info_str);
+ show_version();
#ifdef _WIN32
destroy_console();
#endif