aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-08-20 21:19:28 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-08-20 21:19:28 +0000
commitb85bb70925f642507fb4a292fe60a751bd5f6617 (patch)
tree81ed19d098908e97cd496e0a47560ce90313bac4
parent0a25d2df5b7af97ab60ee9599c2e52c2ace73f60 (diff)
downloadwireshark-b85bb70925f642507fb4a292fe60a751bd5f6617.tar.gz
wireshark-b85bb70925f642507fb4a292fe60a751bd5f6617.tar.bz2
wireshark-b85bb70925f642507fb4a292fe60a751bd5f6617.zip
Changed some symbols inside parser, fixed default error message in
dfilter_compile, and removed debug printf that I left in match_selected. svn path=/trunk/; revision=532
-rw-r--r--dfilter-grammar.y7
-rw-r--r--dfilter-scanner.l6
-rw-r--r--dfilter.c4
-rw-r--r--ethereal.c3
4 files changed, 10 insertions, 10 deletions
diff --git a/dfilter-grammar.y b/dfilter-grammar.y
index 74171c2e80..c8ab1c54b8 100644
--- a/dfilter-grammar.y
+++ b/dfilter-grammar.y
@@ -3,7 +3,7 @@
/* dfilter-grammar.y
* Parser for display filters
*
- * $Id: dfilter-grammar.y,v 1.13 1999/08/20 20:45:14 guy Exp $
+ * $Id: dfilter-grammar.y,v 1.14 1999/08/20 21:19:27 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -139,6 +139,7 @@ dfilter *global_df = NULL;;
%token <string> T_VAL_UNQUOTED_STRING
%token <string> T_VAL_BYTE_STRING
+%token <string> T_VAL_NUMBER_STRING
%token <byte_range> T_VAL_BYTE_RANGE
%token <operand> TOK_AND TOK_OR TOK_NOT TOK_XOR
@@ -226,7 +227,7 @@ relation: numeric_variable numeric_relation numeric_value
;
-numeric_value: T_VAL_UNQUOTED_STRING
+numeric_value: T_VAL_NUMBER_STRING
{
$$ = dfilter_mknode_numeric_value(string_to_value($1));
g_free($1);
@@ -243,7 +244,7 @@ ether_value: T_VAL_BYTE_STRING
}
;
-ipxnet_value: T_VAL_UNQUOTED_STRING
+ipxnet_value: T_VAL_NUMBER_STRING
{
$$ = dfilter_mknode_ipxnet_value(string_to_value($1));
g_free($1);
diff --git a/dfilter-scanner.l b/dfilter-scanner.l
index b435025056..53b1b13f25 100644
--- a/dfilter-scanner.l
+++ b/dfilter-scanner.l
@@ -3,7 +3,7 @@
/* dfilter-scanner.l
* Scanner for display filters
*
- * $Id: dfilter-scanner.l,v 1.9 1999/08/20 06:01:07 gram Exp $
+ * $Id: dfilter-scanner.l,v 1.10 1999/08/20 21:19:27 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -195,13 +195,13 @@ false { dfilter_lval.operand = TOK_FALSE; return TOK_FALSE; }
[0-9]+ { /* decimal or octal values */
dfilter_lval.string = g_strdup(yytext);
- return T_VAL_UNQUOTED_STRING;
+ return T_VAL_NUMBER_STRING;
}
0[xX][A-Fa-f0-9]+ { /* hex values */
dfilter_lval.string = g_strdup(yytext);
- return T_VAL_UNQUOTED_STRING;
+ return T_VAL_NUMBER_STRING;
}
[0-9\:\.]+ {
diff --git a/dfilter.c b/dfilter.c
index fbf5e7c1f1..a81d396fb9 100644
--- a/dfilter.c
+++ b/dfilter.c
@@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
- * $Id: dfilter.c,v 1.13 1999/08/20 20:45:13 guy Exp $
+ * $Id: dfilter.c,v 1.14 1999/08/20 21:19:28 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -161,7 +161,7 @@ dfilter_compile(dfilter *df, gchar *dfilter_text)
if (retval != 0) {
if (dfilter_error_msg == NULL) {
dfilter_error_msg = &dfilter_error_msg_buf[0];
- snprintf(dfilter_error_msg, sizeof(dfilter_error_msg),
+ snprintf(dfilter_error_msg, sizeof(dfilter_error_msg_buf),
"Unable to parse filter string \"%s\".",
dfilter_text);
}
diff --git a/ethereal.c b/ethereal.c
index b6add49d59..ef84f43c0c 100644
--- a/ethereal.c
+++ b/ethereal.c
@@ -1,6 +1,6 @@
/* ethereal.c
*
- * $Id: ethereal.c,v 1.99 1999/08/20 20:37:47 gram Exp $
+ * $Id: ethereal.c,v 1.100 1999/08/20 21:19:28 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -365,7 +365,6 @@ match_selected_cb(GtkWidget *w, gpointer data)
cf.dfilter = buf;
if (filter_te) {
gtk_entry_set_text(GTK_ENTRY(filter_te), cf.dfilter);
- printf("set text to %s\n", cf.dfilter);
}
/* Run the display filter so it goes in effect. */
filter_packets(&cf);