aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftype-time.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2003-08-27 15:23:11 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2003-08-27 15:23:11 +0000
commit52338a3bafa30b1c1ea6759ea14a60c5d3fd35da (patch)
treea4104c638529709d8c4f8b869d76c7f5253c6d16 /epan/ftypes/ftype-time.c
parentd3562c0480240333a99315699992e3165702a369 (diff)
Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).
The search uses a naive approach; more work is required to add a Boyer-Moore Search algorithm. svn path=/trunk/; revision=8280
Diffstat (limited to 'epan/ftypes/ftype-time.c')
-rw-r--r--epan/ftypes/ftype-time.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index dd04fa6cb9..d926d30365 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -1,5 +1,5 @@
/*
- * $Id: ftype-time.c,v 1.20 2003/07/30 22:50:39 guy Exp $
+ * $Id: ftype-time.c,v 1.21 2003/08/27 15:23:07 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -167,7 +167,7 @@ get_nsecs(char *startp, int *nsecs)
}
static gboolean
-relative_val_from_unparsed(fvalue_t *fv, char *s, LogFunc logfunc)
+relative_val_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFunc logfunc)
{
char *curptr, *endptr;
@@ -277,6 +277,12 @@ fail:
return FALSE;
}
+static gboolean
+absolute_val_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFunc logfunc)
+{
+ return absolute_val_from_string(fv, s, logfunc);
+}
+
static void
time_fvalue_new(fvalue_t *fv)
{
@@ -337,7 +343,7 @@ ftype_register_time(void)
0,
time_fvalue_new,
NULL,
- absolute_val_from_string, /* val_from_unparsed */
+ absolute_val_from_unparsed, /* val_from_unparsed */
absolute_val_from_string, /* val_from_string */
absolute_val_to_repr, /* val_to_string_repr */
absolute_val_repr_len, /* len_string_repr */
@@ -356,6 +362,8 @@ ftype_register_time(void)
cmp_ge,
cmp_lt,
cmp_le,
+ NULL, /* cmp_contains */
+
NULL,
NULL
};
@@ -384,6 +392,8 @@ ftype_register_time(void)
cmp_ge,
cmp_lt,
cmp_le,
+ NULL, /* cmp_contains */
+
NULL,
NULL
};