Browse Source

+ f2b_filter_append()

master
Alex 'AdUser' Z 8 years ago
parent
commit
64ca6cb323
  1. 8
      src/filter.c
  2. 1
      src/filter.h

8
src/filter.c

@ -149,6 +149,14 @@ f2b_filter_destroy(f2b_filter_t *filter) {
free(filter); free(filter);
} }
bool
f2b_filter_append(f2b_filter_t *filter, const char *pattern) {
assert(filter != NULL);
assert(pattern != NULL);
return filter->append(filter->cfg, pattern);
}
bool bool
f2b_filter_match(f2b_filter_t *filter, const char *line, char *buf, size_t buf_size) { f2b_filter_match(f2b_filter_t *filter, const char *line, char *buf, size_t buf_size) {
assert(filter != NULL); assert(filter != NULL);

1
src/filter.h

@ -26,6 +26,7 @@ typedef struct f2b_filter_t {
f2b_filter_t * f2b_filter_create (f2b_config_section_t *config, const char *id); f2b_filter_t * f2b_filter_create (f2b_config_section_t *config, const char *id);
void f2b_filter_destroy(f2b_filter_t *b); void f2b_filter_destroy(f2b_filter_t *b);
bool f2b_filter_append(f2b_filter_t *b, const char *pattern);
bool f2b_filter_match(f2b_filter_t *b, const char *line, char *buf, size_t buf_size); bool f2b_filter_match(f2b_filter_t *b, const char *line, char *buf, size_t buf_size);
const char * f2b_filter_error(f2b_filter_t *b); const char * f2b_filter_error(f2b_filter_t *b);

Loading…
Cancel
Save