aboutsummaryrefslogtreecommitdiffstats
path: root/dfilter.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-07-07 23:54:13 +0000
committerGuy Harris <guy@alum.mit.edu>1999-07-07 23:54:13 +0000
commit856e356a7a544706cf27edad3113db1acaa6704c (patch)
treeffa42eda17ab9825b2367756d53fdb2f8cf34386 /dfilter.c
parent9f9d19f529f1d4b854184356116946ae73930f4f (diff)
downloadwireshark-856e356a7a544706cf27edad3113db1acaa6704c.tar.gz
wireshark-856e356a7a544706cf27edad3113db1acaa6704c.tar.bz2
wireshark-856e356a7a544706cf27edad3113db1acaa6704c.zip
"const"ifty some function arguments and structure members, and "#if 0"
out the declaration of a variable used only by "#if 0"ed out code, to eliminate some compiler warnings. svn path=/trunk/; revision=344
Diffstat (limited to 'dfilter.c')
-rw-r--r--dfilter.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/dfilter.c b/dfilter.c
index 91d1bc57ab..3d0af0af75 100644
--- a/dfilter.c
+++ b/dfilter.c
@@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
- * $Id: dfilter.c,v 1.1 1999/07/07 22:51:37 gram Exp $
+ * $Id: dfilter.c,v 1.2 1999/07/07 23:54:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -71,10 +71,10 @@ extern GMemChunk *gmc_dfilter_nodes;
extern GNode *dfilter_tree;
extern GSList *dfilter_list_byte_arrays;
-static gboolean dfilter_apply_node(GNode *gnode, proto_tree *ptree, guint8 *pd);
-static gboolean check_relation(gint operand, GNode *a, GNode *b, proto_tree *ptree, guint8 *pd);
-static gboolean check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, guint8 *pd);
-static GArray* get_values_from_ptree(dfilter_node *dnode, proto_tree *ptree, guint8 *pd);
+static gboolean dfilter_apply_node(GNode *gnode, proto_tree *ptree, const guint8 *pd);
+static gboolean check_relation(gint operand, GNode *a, GNode *b, proto_tree *ptree, const guint8 *pd);
+static gboolean check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, const guint8 *pd);
+static GArray* get_values_from_ptree(dfilter_node *dnode, proto_tree *ptree, const guint8 *pd);
static GArray* get_values_from_dfilter(dfilter_node *dnode, GNode *gnode);
static gboolean check_existence_in_ptree(dfilter_node *dnode, proto_tree *ptree);
static void clear_byte_array(gpointer data, gpointer user_data);
@@ -86,7 +86,7 @@ static void clear_byte_array(gpointer data, gpointer user_data);
*/
#define g_array_index_ptr(a,s,i) (((guint8*) (a)->data) + (i*s))
-static const GScannerConfig dfilter_scanner_config =
+static GScannerConfig dfilter_scanner_config =
{
(
" \t\n"
@@ -301,7 +301,7 @@ dfilter_yyerror(char *fmt, ...)
}
gboolean
-dfilter_apply(GNode *dfcode, proto_tree *ptree, guint8* pd)
+dfilter_apply(GNode *dfcode, proto_tree *ptree, const guint8* pd)
{
gboolean retval;
retval = dfilter_apply_node(dfcode, ptree, pd);
@@ -309,7 +309,7 @@ dfilter_apply(GNode *dfcode, proto_tree *ptree, guint8* pd)
}
static gboolean
-dfilter_apply_node(GNode *gnode, proto_tree *ptree, guint8* pd)
+dfilter_apply_node(GNode *gnode, proto_tree *ptree, const guint8* pd)
{
GNode *gnode_a, *gnode_b;
dfilter_node *dnode = (dfilter_node*) (gnode->data);
@@ -362,7 +362,7 @@ dfilter_apply_node(GNode *gnode, proto_tree *ptree, guint8* pd)
}
static gboolean
-check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, guint8 *pd)
+check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, const guint8 *pd)
{
switch(operand) {
case TOK_AND:
@@ -387,7 +387,7 @@ check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, guint8 *pd)
* faster.
*/
static gboolean
-check_relation(gint operand, GNode *a, GNode *b, proto_tree *ptree, guint8* pd)
+check_relation(gint operand, GNode *a, GNode *b, proto_tree *ptree, const guint8* pd)
{
dfilter_node *node_a = (dfilter_node*) (a->data);
dfilter_node *node_b = (dfilter_node*) (b->data);
@@ -453,7 +453,7 @@ check_existence_in_ptree(dfilter_node *dnode, proto_tree *ptree)
}
static GArray*
-get_values_from_ptree(dfilter_node *dnode, proto_tree *ptree, guint8 *pd)
+get_values_from_ptree(dfilter_node *dnode, proto_tree *ptree, const guint8 *pd)
{
GArray *array;
int parent_protocol;