Annotation of libaitio/example/watchdir.c, revision 1.2

1.2     ! misho       1: #include <stdio.h>
        !             2: #include <string.h>
        !             3: #include <aitio.h>
        !             4: 
        !             5: 
        !             6: int
        !             7: show(const char *csName, int nOp)
        !             8: {
        !             9:        switch (nOp) {
        !            10:                case -1:
        !            11:                        printf("Delete %s\n", csName);
        !            12:                        break;
        !            13:                case 0:
        !            14:                        printf("Move %s\n", csName);
        !            15:                        break;
        !            16:                case 1:
        !            17:                        printf("Create %s\n", csName);
        !            18:                        break;
        !            19:                default:
        !            20:                        printf("Unknown code ??? %d\n", nOp);
        !            21:                        return -1;
        !            22:        }
        !            23: 
        !            24:        return 0;
        !            25: }
        !            26: 
        !            27: int
        !            28: main(int argc, char **argv)
        !            29: {
        !            30: 
        !            31:        if (argc < 2)
        !            32:                return 1;
        !            33: 
        !            34:        printf("events=%d\n", ioWatchDirLoop(argv[1], show));
        !            35: 
        !            36:        return 0;
        !            37: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>