#ifndef FILTER_H #define FILTER_H #define FILTER_LL_NEW(x) { \ if (x == NULL) \ x = xmalloc(sizeof(struct FILTER_LIST_LIST)); \ else { \ while (x->next != NULL) x = x->next; \ x->next = xmalloc(sizeof(struct FILTER_LIST_LIST)); \ x = x->next; \ } \ x->next = NULL; \ x->he = NULL; \ x->fe = NULL; \ x->host = NULL; \ x->file = NULL; \ x->template = NULL; \ }; #define FILTER_LL_INSERT(x, a, b, c) { \ if (a != NULL && x->he == NULL) { \ x->he = reg_compile(a, REGFLAGS | REG_NOSUB); \ x->host = xstrdup(a); \ } \ if (b != NULL && x->fe == NULL) { \ x->fe = reg_compile(b, REGFLAGS | REG_NOSUB); \ x->file = xstrdup(b); \ } \ if (c != NULL && x->template == NULL) \ x->template = xstrdup(c); \ }; #endif /* FILTER_H */