diff options
Diffstat (limited to 'src/filter')
| -rw-r--r-- | src/filter/filter.h | 15 | ||||
| -rw-r--r-- | src/filter/uniq.c | 0 | ||||
| -rw-r--r-- | src/filter/uniq.h | 12 |
3 files changed, 27 insertions, 0 deletions
diff --git a/src/filter/filter.h b/src/filter/filter.h new file mode 100644 index 0000000..7cdb640 --- /dev/null +++ b/src/filter/filter.h @@ -0,0 +1,15 @@ +#ifndef PLOC_GEN_FILTER_H +#define PLOC_GEN_FILTER_H + +#include "stdbool.h" +#include "pattern/pattern.h" + +struct filter +{ + void *state; + void *(*create)(); + void (*free)(void *); + bool (*filter)(void *, struct pattern *); +}; + +#endif
\ No newline at end of file diff --git a/src/filter/uniq.c b/src/filter/uniq.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/filter/uniq.c diff --git a/src/filter/uniq.h b/src/filter/uniq.h new file mode 100644 index 0000000..fa235a5 --- /dev/null +++ b/src/filter/uniq.h @@ -0,0 +1,12 @@ +#ifndef PLOC_GEN_FILTER_UNIQ_H +#define PLOC_GEN_FILTER_UNIQ_H + +#include "stdbool.h" +#include "pattern/pattern.h" + +void *create_uniq(); +void free_uniq(void *state); + +bool uniq(void *state, struct pattern *pattern); + +#endif
\ No newline at end of file |
