projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable many "stupid" CLI options or some that will have better equivalents soon...
[apps/madmutt.git]
/
lib-lib
/
rx.h
diff --git
a/lib-lib/rx.h
b/lib-lib/rx.h
index
3b57168
..
6decaa6
100644
(file)
--- a/
lib-lib/rx.h
+++ b/
lib-lib/rx.h
@@
-40,27
+40,36
@@
typedef struct rx_t {
struct rx_t *next;
typedef struct rx_t {
struct rx_t *next;
- char *pattern; /* printable version */
- regex_t *rx; /* compiled expression */
- int not; /* do not match */
+ unsigned neg : 1; /* do not match */
+ int flags;
int nmatch; /* nb matches */
int nmatch; /* nb matches */
- char *template; /* out template */
+
+ char *pattern; /* printable version */
+ char *tpl; /* out template */
+
+ regex_t *rx; /* compiled expression */
} rx_t;
rx_t *rx_compile(const char*, int);
} rx_t;
rx_t *rx_compile(const char*, int);
-int rx_validate(const char*, char*, ssize_t);
-void rx_set_template(rx_t *, const char*);
void rx_wipe(rx_t *);
void rx_wipe(rx_t *);
+rx_t *rx_dup(rx_t *);
DO_DELETE(rx_t, rx);
DO_DELETE(rx_t, rx);
-
DO_SLIST(rx_t, rx, rx_delete);
DO_SLIST(rx_t, rx, rx_delete);
+int rx_validate(const char*, char*, ssize_t);
+void rx_set_template(rx_t *, const char*);
+int rx_sanitize_string(char *, ssize_t, const char *);
+
/* for handling lists */
/* for handling lists */
+rx_t **rx_lookup(rx_t**, const char*); /* lookup pattern */
+
int rx_list_match(rx_t *, const char*); /* match all items list agains string */
int rx_list_match(rx_t *, const char*); /* match all items list agains string */
+void rx_list_add(rx_t **, rx_t *);
+void rx_list_remove(rx_t **, const rx_t *);
+
int rx_list_match2(rx_t *l, const char *s, char *dst, int dlen);
int rx_list_match2(rx_t *l, const char *s, char *dst, int dlen);
-rx_t **rx_lookup(rx_t**, const char*); /* lookup pattern */
-int rx_sanitize_string(char *, ssize_t, const char *);
+void rx_list_add2(rx_t **, rx_t **);
#define REGCOMP(X,Y,Z) regcomp(X, Y, REG_WORDS|REG_EXTENDED|(Z))
#define REGEXEC(X,Y) regexec(X, Y, 0, NULL, 0)
#define REGCOMP(X,Y,Z) regcomp(X, Y, REG_WORDS|REG_EXTENDED|(Z))
#define REGEXEC(X,Y) regexec(X, Y, 0, NULL, 0)