Ethereal-dev: Re: FW: [Ethereal-dev] 0.8.14 tonight

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 21 Nov 2000 16:12:43 -0800 (PST)
> Here ya go, a diff file of the changes.
> 
> diff -u ./prefs.h no_gtk/prefs.h
> --- ./prefs.h	Sat Nov 18 15:41:36 2000
> +++ no_gtk/prefs.h	Mon Nov 20 12:07:28 2000
> 
> 	...
>  #define PR_DEST_CMD  0
>  #define PR_DEST_FILE 1
>  
> +/*$$$$ A hack for building without GTK support 
>  #ifndef __GTK_H__
>  #include <gtk/gtk.h>
>  #endif
>  
> +$$$*/
> +#include <glib.h>
> +typedef struct _GdtColor{
> +	   int pixel;
> +	   int red;
> +	   int green;
> +	   int blue;
> +}GdkColor;
> +
> +/*$$$$$ end of hack $$$$$$$*/
> +

I did that a little differently; there's a "color_t" structure, which
has the same four member names as GdkColor, and there are routines to
convert between them (which is done, currently, by copying the members).

>  typedef struct {
>  	char	*name;
>  	gint	value;
> -} enum_val_t;
> +} enum_val;
>  
>  void prefs_register_enum_preference(module_t *module, const char *name,
>      const char *title, const char *description, gint *var,
> -    const enum_val_t *enumvals, gboolean radio_buttons);
> +    const enum_val *enumvals, gboolean radio_buttons);

Why are you reverting that change?  It was necessary in order to get
Ethereal to compile with PLUGINS_NEED_ADDRESS_TABLE defined.

> diff -u ./ui_util.h no_gtk/ui_util.h
> --- ./ui_util.h	Fri Jul  7 02:01:28 2000
> +++ no_gtk/ui_util.h	Mon Nov 20 12:07:28 2000
> @@ -38,7 +38,10 @@
>     ask that a window of a certain type be popped up when there can be only
>     one such window and such a window has already been popped up - we
>     pop up the existing one rather than creating a new one. */
> -void reactivate_window(GtkWidget *);
> +
> +/*$$$$ Hack to compile with GTK support 
> + void reactivate_window(GtkWidget *);
> +/*$$$$$$ end of hack $$$$*/
>  
>  /* Destroy all popup packet windows. */
>  void destroy_packet_wins(void);

The way to fix *that* is not to include "ui_util.h" in "tethereal.c";
"ui_util.h" declares GUI utilities, but Tethereal isn't a GUI program so
it doesn't need them.  I've checked in a change to remove the include of
"ui_util.h" from "tethereal.c".