diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-08-23 12:25:10 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-08-25 22:29:47 +0300 |
commit | 33d60a8ce049c623cd4885a49e0a0a80ab11bc74 (patch) | |
tree | 0d90f63b7586b5c0c031ec0ac0263c635427a020 /src/fnpat.c | |
parent | a60dcd92df15705bb84f644c99fd166e101dc681 (diff) | |
download | direvent-33d60a8ce049c623cd4885a49e0a0a80ab11bc74.tar.gz direvent-33d60a8ce049c623cd4885a49e0a0a80ab11bc74.tar.bz2 |
Add new tests + minor fixes.
* src/direvent.h (filpatlist_is_empty): New proto.
* src/fnpat.c (filpatlist_is_empty): New function.
* src/watcher.c (convert_watcher): Fix error handling.
(watchpoint_init): Remove spurious notice.
* tests/conv.at: New test.
* tests/sent.at: New test.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Likewise.
Diffstat (limited to 'src/fnpat.c')
-rw-r--r-- | src/fnpat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fnpat.c b/src/fnpat.c index 5a98053..3e282b3 100644 --- a/src/fnpat.c +++ b/src/fnpat.c @@ -137,6 +137,14 @@ filpatlist_destroy(filpatlist_t *fptr) } int +filpatlist_is_empty(filpatlist_t fp) +{ + if (!fp) + return 1; + return grecs_list_size(fp->list) == 0; +} + +int filpatlist_match(filpatlist_t fp, const char *name) { struct grecs_list_entry *ep; |