Now that FT_BOOLEAN display filter fields are treated differently (only
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Aug 1999 16:01:42 +0000 (16:01 +0000)
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Aug 1999 16:01:42 +0000 (16:01 +0000)
their existence is checked), some FT_BOOLEAN-related functions in dfilter.c
are no longer called. So I removed them.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@611 f5534014-38df-0310-8fa8-9805f1628bb7

dfilter-int.h
dfilter.c

index deb785b5146483ab2f1326c6bcc27bfee0b74845..9de93a5303c649a14f2a8601cebd6d50ceb28051 100644 (file)
@@ -2,7 +2,7 @@
  * Definitions for routines common to multiple modules in the display
  * filter code, but not used outside that code.
  *
  * Definitions for routines common to multiple modules in the display
  * filter code, but not used outside that code.
  *
- * $Id: dfilter-int.h,v 1.3 1999/08/26 06:20:48 gram Exp $
+ * $Id: dfilter-int.h,v 1.4 1999/08/30 16:01:42 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -45,7 +45,6 @@ void dfilter_yyerror(char *fmt, ...);
 gboolean check_relation_numeric(gint operand, GArray *a, GArray *b);
 gboolean check_relation_ether(gint operand, GArray *a, GArray *b);
 gboolean check_relation_bytes(gint operand, GArray *a, GArray *b);
 gboolean check_relation_numeric(gint operand, GArray *a, GArray *b);
 gboolean check_relation_ether(gint operand, GArray *a, GArray *b);
 gboolean check_relation_bytes(gint operand, GArray *a, GArray *b);
-gboolean check_relation_boolean(gint operand, GArray *a, GArray *b);
 
 gboolean fill_array_numeric_value(GNode *gnode, gpointer data);
 gboolean fill_array_numeric_variable(GNode *gnode, gpointer data);
 
 gboolean fill_array_numeric_value(GNode *gnode, gpointer data);
 gboolean fill_array_numeric_variable(GNode *gnode, gpointer data);
@@ -53,8 +52,6 @@ gboolean fill_array_ether_value(GNode *gnode, gpointer data);
 gboolean fill_array_ether_variable(GNode *gnode, gpointer data);
 gboolean fill_array_bytes_value(GNode *gnode, gpointer data);
 gboolean fill_array_bytes_variable(GNode *gnode, gpointer data);
 gboolean fill_array_ether_variable(GNode *gnode, gpointer data);
 gboolean fill_array_bytes_value(GNode *gnode, gpointer data);
 gboolean fill_array_bytes_variable(GNode *gnode, gpointer data);
-gboolean fill_array_boolean_value(GNode *gnode, gpointer data);
-gboolean fill_array_boolean_variable(GNode *gnode, gpointer data);
 
 #ifdef WIN32
 #define boolean truth_value
 
 #ifdef WIN32
 #define boolean truth_value
@@ -96,7 +93,6 @@ typedef struct dfilter_node {
                gint            variable; /* if type == variable (protocol or header field abbrev) */
                gint            alternation; /* if type == alternation (& or |) */
 
                gint            variable; /* if type == variable (protocol or header field abbrev) */
                gint            alternation; /* if type == alternation (& or |) */
 
-               gboolean        boolean;
                guint32         numeric;
                struct timeval  abs_time; /* the whole struct, not a pointer */
                gchar           *string;
                guint32         numeric;
                struct timeval  abs_time; /* the whole struct, not a pointer */
                gchar           *string;
index 57ac05be7f8fb6910577c675a1f0340f9c26b025..916bf849c881ad0fb67b524dbc6de45988cfc251 100644 (file)
--- a/dfilter.c
+++ b/dfilter.c
@@ -1,7 +1,7 @@
 /* dfilter.c
  * Routines for display filters
  *
 /* dfilter.c
  * Routines for display filters
  *
- * $Id: dfilter.c,v 1.18 1999/08/30 15:51:43 gram Exp $
+ * $Id: dfilter.c,v 1.19 1999/08/30 16:01:42 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -535,18 +535,6 @@ gboolean fill_array_bytes_variable(GNode *gnode, gpointer data)
        return FALSE; /* FALSE = do not end traversal of GNode tree */
 }
 
        return FALSE; /* FALSE = do not end traversal of GNode tree */
 }
 
-gboolean fill_array_boolean_variable(GNode *gnode, gpointer data)
-{
-       proto_tree_search_info  *sinfo = (proto_tree_search_info*)data;
-       field_info              *fi = (field_info*) (gnode->data);
-
-       if (fi->hfinfo->id == sinfo->target) {
-               g_array_append_val(sinfo->result.array, fi->value.boolean);
-       }
-
-       return FALSE; /* FALSE = do not end traversal of GNode tree */
-}
-
 gboolean fill_array_numeric_value(GNode *gnode, gpointer data)
 {
        GArray          *array = (GArray*)data;
 gboolean fill_array_numeric_value(GNode *gnode, gpointer data)
 {
        GArray          *array = (GArray*)data;
@@ -577,17 +565,6 @@ gboolean fill_array_bytes_value(GNode *gnode, gpointer data)
        return FALSE; /* FALSE = do not end traversal of GNode tree */
 }
 
        return FALSE; /* FALSE = do not end traversal of GNode tree */
 }
 
-gboolean fill_array_boolean_value(GNode *gnode, gpointer data)
-{
-       GArray          *array = (GArray*)data;
-       dfilter_node    *dnode = (dfilter_node*) (gnode->data);
-
-       g_array_append_val(array, dnode->value.boolean);
-
-       return FALSE; /* FALSE = do not end traversal of GNode tree */
-}
-
-
 gboolean check_relation_numeric(gint operand, GArray *a, GArray *b)
 {
        int     i, j, len_a, len_b;
 gboolean check_relation_numeric(gint operand, GArray *a, GArray *b)
 {
        int     i, j, len_a, len_b;
@@ -763,41 +740,3 @@ gboolean check_relation_bytes(gint operand, GArray *a, GArray *b)
        return FALSE;
 }
 
        return FALSE;
 }
 
-gboolean check_relation_boolean(gint operand, GArray *a, GArray *b)
-{
-       int     i, j, len_a, len_b;
-       guint32 val_a;
-
-       len_a = a->len;
-       len_b = b->len;
-
-
-       switch(operand) {
-       case TOK_EQ:
-               for(i = 0; i < len_a; i++) {
-                       val_a = g_array_index(a, guint32, i);
-                       for (j = 0; j < len_b; j++) {
-                               if (val_a == g_array_index(b, guint32, j))
-                                       return TRUE;
-                       }
-               }
-               return FALSE;
-
-       case TOK_NE:
-               for(i = 0; i < len_a; i++) {
-                       val_a = g_array_index(a, guint32, i);
-                       for (j = 0; j < len_b; j++) {
-                               if (val_a != g_array_index(b, guint32, j))
-                                       return TRUE;
-                       }
-               }
-               return FALSE;
-
-       default:
-               g_assert_not_reached();
-       }
-
-       g_assert_not_reached();
-       return FALSE;
-}
-