aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-07 08:40:02 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-07 08:40:02 +0000
commitb0a89981ad61c0db1f3e14a0815ff7f3a97c0339 (patch)
tree8d6e002c3ba1b61b00021232f4dea1037808f024 /capture_opts.c
parent201c0874833f535f70bc6a1e6ee4f0e47c3dd729 (diff)
Add routines vfprintf_stderr() and fprintf_stderr() to print to the
standard error and, in Wireshark on Windows, create a console if necessary. Have the cmdarg_err routines use them. Use *fprintf_stderr() to print the output of -L, rather than using cmdarg_err_cont(), so that we don't get extra newlines in the output (it should look similar to the output of tcpdump). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32711 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 67d4237a80..f69f791f08 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -66,6 +66,7 @@
#include "capture_opts.h"
#include "ringbuffer.h"
#include "clopts_common.h"
+#include "console_io.h"
#include "cmdarg_err.h"
#include "capture_ifinfo.h"
@@ -577,16 +578,16 @@ capture_opts_print_link_layer_types(GList *lt_list)
GList *lt_entry;
data_link_info_t *data_link_info;
- cmdarg_err_cont("Data link types (use option -y to set):");
+ fprintf_stderr("Data link types (use option -y to set):\n");
for (lt_entry = lt_list; lt_entry != NULL;
lt_entry = g_list_next(lt_entry)) {
data_link_info = (data_link_info_t *)lt_entry->data;
- cmdarg_err_cont(" %s", data_link_info->name);
+ fprintf_stderr(" %s", data_link_info->name);
if (data_link_info->description != NULL)
- cmdarg_err_cont(" (%s)", data_link_info->description);
+ fprintf_stderr(" (%s)", data_link_info->description);
else
- cmdarg_err_cont(" (not supported)");
- putchar('\n');
+ fprintf_stderr(" (not supported)");
+ fprintf_stderr("\n");
}
}