summaryrefslogtreecommitdiff
path: root/epan/ftypes/ftype-double.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2003-07-25 03:44:05 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2003-07-25 03:44:05 +0000
commit086774b71f236b797a9e7a14e2bbb444b55e6d79 (patch)
treec295c5d9f4e05517f4d56f17032183c996ab27df /epan/ftypes/ftype-double.c
parentc2150d9d778613bb7eb8135ea1f155346f26e473 (diff)
downloadwireshark-086774b71f236b797a9e7a14e2bbb444b55e6d79.tar.gz
Add to the fundamental types passed between the scanner and the parser.
Besides "STRING", there is now "UNPARSED_STRING", where the distinction is that "STRING" was a double-quoted string and "UNPARSED_STRING" is just a sequence of characters that the scanner didn't know how to scan/parse, so it's up to the Ftype to parse it. This gives us more flexibility and prepares the dfilter parsing engine for the upcoming addition of the "contains" operator. In the process of doing this, I also re-did the double-quoted string support in the scanner, so that instead of the naively-simple support we used to have, double-quoted strings now can have embedded dobule-quotes, embedded octal sequences, and embedded hexadecimal sequences: "\"" embedded double-quote "\110" embedded octal "\x48" embedded hex Enhance the dfilter unit test script to be able to run a single collection of tests instead of having to run all of them all the time. svn path=/trunk/; revision=8083
Diffstat (limited to 'epan/ftypes/ftype-double.c')
-rw-r--r--epan/ftypes/ftype-double.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/ftypes/ftype-double.c b/epan/ftypes/ftype-double.c
index 2091bda846..5ee3aee44d 100644
--- a/epan/ftypes/ftype-double.c
+++ b/epan/ftypes/ftype-double.c
@@ -1,5 +1,5 @@
/*
- * $Id: ftype-double.c,v 1.8 2003/02/08 04:22:37 gram Exp $
+ * $Id: ftype-double.c,v 1.9 2003/07/25 03:44:02 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -48,7 +48,7 @@ value_get_floating(fvalue_t *fv)
}
static gboolean
-val_from_string(fvalue_t *fv, char *s, LogFunc logfunc)
+val_from_unparsed(fvalue_t *fv, char *s, LogFunc logfunc)
{
char *endptr = NULL;
@@ -123,7 +123,8 @@ ftype_register_double(void)
0,
double_fvalue_new,
NULL,
- val_from_string,
+ val_from_unparsed, /* val_from_unparsed */
+ NULL, /* val_from_string */
NULL, /* val_to_string_repr */
NULL, /* len_string_repr */
@@ -152,7 +153,8 @@ ftype_register_double(void)
0,
double_fvalue_new,
NULL,
- val_from_string,
+ val_from_unparsed, /* val_from_unparsed */
+ NULL, /* val_from_string */
NULL, /* val_to_string_repr */
NULL, /* len_string_repr */