diff options
author | Olivier Biot <obiot.ethereal@gmail.com> | 2004-01-26 21:02:36 +0000 |
---|---|---|
committer | Olivier Biot <obiot.ethereal@gmail.com> | 2004-01-26 21:02:36 +0000 |
commit | a165b0d6bec7d2186d6106f145d8b123ea93077f (patch) | |
tree | 92b17b6f769c114be49bdfded41f8a25b3c56e38 /gtk/dfilter_expr_dlg.c | |
parent | 1f078d0fff1f2b2e0386ab25d172b75286474288 (diff) |
Add support for the "matches" operator if HAVE_LIBPCRE is defined.
svn path=/trunk/; revision=9865
Diffstat (limited to 'gtk/dfilter_expr_dlg.c')
-rw-r--r-- | gtk/dfilter_expr_dlg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c index 0a990a90f1..d51dc658ae 100644 --- a/gtk/dfilter_expr_dlg.c +++ b/gtk/dfilter_expr_dlg.c @@ -7,7 +7,7 @@ * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> and * Guy Harris <guy@alum.mit.edu> * - * $Id: dfilter_expr_dlg.c,v 1.46 2004/01/21 21:19:32 ulfl Exp $ + * $Id: dfilter_expr_dlg.c,v 1.47 2004/01/26 21:02:36 obiot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -281,6 +281,11 @@ show_relations(GtkWidget *relation_list, ftenum_t ftype) if (ftype_can_contains(ftype) || (ftype_can_slice(ftype) && ftype_can_contains(FT_BYTES))) add_relation_list(relation_list, "contains"); +#ifdef HAVE_LIBPCRE + if (ftype_can_matches(ftype) || + (ftype_can_slice(ftype) && ftype_can_matches(FT_BYTES))) + add_relation_list(relation_list, "matches"); +#endif #if GTK_MAJOR_VERSION >= 2 gtk_tree_model_get_iter_first(gtk_tree_view_get_model(GTK_TREE_VIEW(relation_list)), &iter); @@ -889,6 +894,8 @@ dfilter_expr_dlg_accept_cb(GtkWidget *w, gpointer filter_te_arg) can_compare = ftype_can_le(ftype); else if (strcmp(item_str, "contains") == 0) can_compare = ftype_can_contains(ftype); + else if (strcmp(item_str, "matches") == 0) + can_compare = ftype_can_matches(ftype); else can_compare = TRUE; /* not a comparison */ if (!can_compare) { |