diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-10-13 06:01:04 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-10-13 06:01:04 +0000 |
commit | 98ce0fcfabac47d81a2d3513b751b3174b6101f3 (patch) | |
tree | d9775b4ac32f98173a0da7d3dbfdf367be736672 | |
parent | c00955d8fbbbed8b4b8250cd2cb119c96c02ce2e (diff) | |
download | wireshark-98ce0fcfabac47d81a2d3513b751b3174b6101f3.tar.gz |
Fix the
Field "XXX" has N byte[s] being compared, but M byte[s] were
supplied.
and the
The "XXX" field is only N byte[s] wide, but M byte[s] were
supplied.
messages to have "was supplied" if M is 1.
svn path=/trunk/; revision=821
-rw-r--r-- | dfilter-grammar.y | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dfilter-grammar.y b/dfilter-grammar.y index 766f8b9c0b..39ac97f086 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.29 1999/10/12 06:19:58 gram Exp $ + * $Id: dfilter-grammar.y,v 1.30 1999/10/13 06:01:04 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -160,7 +160,6 @@ dfilter *global_df = NULL; %token <operand> TOK_AND TOK_OR TOK_NOT TOK_XOR %token <operand> TOK_EQ TOK_NE TOK_GT TOK_GE TOK_LT TOK_LE -%expect 4 %left TOK_AND %left TOK_OR TOK_XOR %nonassoc TOK_NOT @@ -248,10 +247,11 @@ relation: numeric_variable numeric_relation numeric_value if (a_len != b_len) { dfilter_fail("Field \"%s\" has %u byte%s being compared, but %u byte%s " - "were supplied.", + "%s supplied.", dfilter_get_variable_abbrev($1), a_len, plurality(a_len, "", "s"), - b_len, plurality(b_len, "", "s")); + b_len, plurality(b_len, "", "s"), + plurality(b_len, "was", "were")); YYERROR; } @@ -929,10 +929,11 @@ check_bytes_variable_sanity(GNode *gnode) t_off = a_off >= 0 ? a_off : reg_len + a_off; if (t_off + a_len > reg_len) { dfilter_fail("The \"%s\" field is only %u byte%s wide, but " - "%u byte%s were supplied.", + "%u byte%s %s supplied.", dfilter_get_variable_abbrev(gnode), reg_len, plurality(reg_len, "", "s"), - a_len, plurality(a_len, "", "s")); + a_len, plurality(a_len, "", "s"), + plurality(a_len, "was", "were")); return 0; } } |