Ethereal-dev: Re: [Ethereal-dev] help dfilter.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Mon, 19 Feb 2001 14:46:31 -0800
On Wed, Feb 14, 2001 at 06:55:21PM -0000, Graham Bloice wrote:
> I did supply some code last year to do this (it actually opened a console
> window)

The only code I've seen posted to do that pops up a console window if
you run "ethereal -v"; it doesn't pop up a console window for arbitrary
printed messages, which is what Gilbert was talking about.

The way to handle this might be to, in Ethereal on Windows, check
whether it's built as a console or a GUI app (yes, it might be built as
a console app - I build it as a console app when testing it), and, if
it's a GUI app, call "g_log_set_handler()" to set a log handler for the
default domain and all levels, and have that routine

	pop up a console if one hasn't already been popped up, and set
	"stdin" and "stdout" as per your patch;

	call "g_log_default_handler()" with the arguments passed into
	our handler.