tPass current watcher in wdpath() - wendy - watch files/directories and run commands on any event
 (HTM) git clone git://z3bra.org/wendy
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 0aff97c697511ce29bd95b2bb1a68f5a95d6f2ed
 (DIR) parent 5cd21f9a20ee3dbd4d35d6957a5ebdb392ab8523
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Mon,  2 Mar 2020 14:59:04 +0100
       
       Pass current watcher in wdpath()
       
       Diffstat:
         M wendy.c                             |       6 ++----
       
       1 file changed, 2 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/wendy.c b/wendy.c
       t@@ -88,10 +88,8 @@ watch(int fd, char *pathname, int mask)
        }
        
        char *
       -wdpath(struct inotify_event *e)
       +wdpath(struct inotify_event *e, struct watcher *w)
        {
       -        int event;
       -        struct watcher *w;
                static char pathname[PATH_MAX];
        
                if (e->len)
       t@@ -157,7 +155,7 @@ main (int argc, char **argv)
                        }
        
                        if (verbose && e->mask & IN_ALL_EVENTS) {
       -                        printf("%s\t%s\n", evname[e->mask & IN_ALL_EVENTS], wdpath(e));
       +                        printf("%s\t%s\n", evname[e->mask & IN_ALL_EVENTS], wdpath(e, w));
                                fflush(stdout);
                        }