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
This commit is contained in:
parent
0a25d2df5b
commit
b85bb70925
|
@ -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);
|
||||
|
|
|
@ -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\:\.]+ {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue