Ethereal-dev: Re: [Ethereal-dev] ASN.1 dissector.

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

From: Matthijs Melchior <mmelchior@xxxxxxxxx>
Date: Tue, 28 Oct 2003 23:55:15 +0100
Guy Harris wrote:

On Oct 28, 2003, at 12:12 PM, Matthijs Melchior wrote:

Well, that is debugging stuff to show the possible structure of the
ASN.1 messages.  So I will have to find another way to give the
dissector this extra user interface.....

If it's debugging stuff, in the sense of something used to debug the dissector itself, I'd #ifdef it out, and either have a configure-script option for it, or require the person doing the debugging to put in a #define for it.
Yes, for now it can be #ifdef'ed out, but I think the info presented
there if of more value than just debugging the dissector. I will
have to find another solution for giving a dissector a private
gui interface....

The attached patch adds a #ifdef on an undefined symbol to *not*
activate this gui code.

Thanks.

--
Regards,
----------------------------------------------------------------  -o)
Matthijs Melchior                                       Maarssen  /\\
mmelchior@xxxxxxxxx                                  Netherlands _\_v
---------------------------------------------------------------- ----

--- packet-asn1.c-release1	2003-10-12 23:01:27.000000000 +0200
+++ packet-asn1.c	2003-10-28 23:41:25.000000000 +0100
@@ -3324,9 +3324,12 @@
 }
 
 
+#ifdef DISSECTOR_WITH_GUI
+/* This cannot work in tethereal.... don't include for now */
 #if GTK_MAJOR_VERSION >= 2
 #define SHOWPDU	/* this needs GTK2, which is not yet on Win32 .............. */
 #endif
+#endif /* DISSECTOR_WITH_GUI */
 #ifdef SHOWPDU
 
 static GtkWidget *window = NULL;