Add routines vfprintf_stderr() and fprintf_stderr() to print to the
[metze/wireshark/wip.git] / tshark.c
index 33cbb103d147090f8d35e84d46a29fc6ec316463..3ed559c92d0e2e9508490cf10796c8c1b70a6765 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -77,6 +77,7 @@
 #include <epan/addr_resolv.h>
 #include "util.h"
 #include "clopts_common.h"
+#include "console_io.h"
 #include "cmdarg_err.h"
 #include "version_info.h"
 #include <epan/plugins.h>
@@ -3397,6 +3398,26 @@ write_failure_message(const char *filename, int err)
           filename, strerror(err));
 }
 
+/*
+ * Print to the standard error.  This is a command-line tool, so there's
+ * no need to pop up a console.
+ */
+void
+vfprintf_stderr(const char *fmt, va_list ap)
+{
+  vfprintf(stderr, fmt, ap);
+}
+
+void
+fprintf_stderr(const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start(ap, fmt);
+  vfprintf_stderr(fmt, ap);
+  va_end(ap);
+}
+
 /*
  * Report an error in command-line arguments.
  */