aboutsummaryrefslogtreecommitdiff
path: root/src/fnpat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-08-23 12:25:10 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-08-25 22:29:47 +0300
commit33d60a8ce049c623cd4885a49e0a0a80ab11bc74 (patch)
tree0d90f63b7586b5c0c031ec0ac0263c635427a020 /src/fnpat.c
parenta60dcd92df15705bb84f644c99fd166e101dc681 (diff)
downloaddirevent-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.c8
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;

Return to:

Send suggestions and report system problems to the System administrator.