aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftype-string.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-08-23 09:25:06 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-08-23 09:25:06 +0000
commit5603cef9f2755f0826933e78f4e511bdc47d16b2 (patch)
tree49ff20550b874530e3e9ae8ca76219618cda97be /epan/ftypes/ftype-string.c
parentb213104006167e21211f7aed20754cd573c7bff0 (diff)
Remove support for libpcre, we use GRegex in GLib.
svn path=/trunk/; revision=38683
Diffstat (limited to 'epan/ftypes/ftype-string.c')
-rw-r--r--epan/ftypes/ftype-string.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c
index 24ec502d9d..3b9aaf30af 100644
--- a/epan/ftypes/ftype-string.c
+++ b/epan/ftypes/ftype-string.c
@@ -28,9 +28,6 @@
#include <ftypes-int.h>
#include <string.h>
-#ifdef HAVE_LIBPCRE
-# include <pcre.h>
-#endif
#define CMP_MATCHES cmp_matches
#include <ctype.h>
@@ -250,41 +247,6 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
}
}
-#ifdef HAVE_LIBPCRE
-static gboolean
-cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
-{
- char *str = fv_a->value.string;
- pcre_tuple_t *pcre_t = fv_b->value.re;
- int options = 0;
- int rc;
-
- /* fv_b is always a FT_PCRE, otherwise the dfilter semcheck() would have
- * warned us. For the same reason (and because we're using g_malloc()),
- * fv_b->value.re is not NULL.
- */
- if (strcmp(fv_b->ftype->name, "FT_PCRE") != 0) {
- return FALSE;
- }
- if (! pcre_t) {
- return FALSE;
- }
- rc = pcre_exec(
- pcre_t->re, /* Compiled PCRE */
- pcre_t->ex, /* PCRE extra from pcre_study() */
- str, /* The data to check for the pattern... */
- (int)strlen(str), /* ... and its length */
- 0, /* Start offset within data */
- options, /* PCRE options */
- NULL, /* We are not interested in the matched string */
- 0 /* of the pattern; only in success or failure. */
- );
- if (rc == 0) {
- return TRUE;
- }
- return FALSE;
-}
-#else /* GRegex */
static gboolean
cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
{
@@ -311,7 +273,6 @@ cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
NULL /* We don't want error information */
);
}
-#endif /* HAVE_LIBPCRE / GRegex */
void
ftype_register_string(void)