X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Frx.h;h=14709d1038d8914d84a731110dd9c9b335f4999a;hp=d12fe85bcb10609814d9133a29ab940c0da8ba68;hb=5a4df9d0e93209aeade80f632158036799f3e9bc;hpb=a3279f2d891e671cdc7dde36a48572b5572058f2 diff --git a/lib-lib/rx.h b/lib-lib/rx.h index d12fe85..14709d1 100644 --- a/lib-lib/rx.h +++ b/lib-lib/rx.h @@ -29,7 +29,7 @@ #ifndef MUTT_LIB_LIB_RX_H #define MUTT_LIB_LIB_RX_H -#include "../lib/list.h" +#include /* this is a non-standard option supported by Solaris 2.5.x which allows * patterns of the form \<...\> @@ -39,6 +39,7 @@ #endif typedef struct rx_t { + struct rx_t *next; char *pattern; /* printable version */ regex_t *rx; /* compiled expression */ int not; /* do not match */ @@ -46,13 +47,13 @@ typedef struct rx_t { rx_t* rx_compile (const char*, int); void rx_delete(rx_t **); +DO_SLIST(rx_t, rx, rx_delete); /* for handling lists */ -int rx_list_match(list2_t*, const char*); /* match all items list agains string */ -int rx_lookup(list2_t*, const char*); /* lookup pattern */ +int rx_list_match(rx_t *, const char*); /* match all items list agains string */ +rx_t **rx_lookup(rx_t**, const char*); /* lookup pattern */ int rx_sanitize_string(char *, ssize_t, const char *); - #define REGCOMP(X,Y,Z) regcomp(X, Y, REG_WORDS|REG_EXTENDED|(Z)) #define REGEXEC(X,Y) regexec(X, Y, 0, NULL, 0)