Merge branch 'master' of ssh://gapil.gnulinux.it/srv/git/gapil
[gapil.git] / sources / DirMonitor.c
index 91198d4ee6b1ff6ead6473636f87b300c9b8cfb5..aece529fcef7c3302aa62e3cb160e80f18fc48fe 100644 (file)
 #include <dirent.h>      /* directory operation constants and functions */
 #include <stdlib.h>      /* C standard library */
 #include <unistd.h>      /* unix standard library */
+#include <string.h>     /* C strings library */
 
 #include "Gapil.h"
 #include "macros.h"
 
 /* Help printing routine */
 void usage(void);
-/* computation function for DirScan */
+/* computation function for dir_scan */
 int ComputeValues(struct dirent * direntry);
 void HandSIGTERM(int signo);
 
@@ -117,13 +118,13 @@ int main(int argc, char *argv[])
     while (1) {
        MutexLock(mutex);                              /* lock shared memory */
        memset(shmptr, 0, sizeof(struct DirProp));    /* erase previous data */
-       DirScan(argv[1], ComputeValues);                     /* execute scan */
+       dir_scan(argv[1], ComputeValues);                    /* execute scan */
        MutexUnlock(mutex);                          /* unlock shared memory */
        sleep(pause);                              /* sleep until next watch */
     }
 }
 /*
- * Routine to compute directory properties inside DirScan
+ * Routine to compute directory properties inside dir_scan
  */
 int ComputeValues(struct dirent * direntry) 
 {