Merge branch 'master' of ssh://gapil.gnulinux.it/srv/git/gapil
[gapil.git] / sources / PXDirMonitor.c
index 4c14abbebd9e8e81ecd94268c55b3070fdea53a3..49405e4200ccc0d18143e268daf2515de0489892 100644 (file)
  *
  * Author: S. Piccardi Jan. 2003
  *
- * $Id: PXDirMonitor.c,v 1.1 2003/05/02 09:50:55 piccardi Exp $
- *
  *****************************************************************************/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>        /* directory */
-#include <stdlib.h>        /* C standard library */
-#include <unistd.h>
+#include <sys/types.h>   /* primitive system data types */
+#include <sys/stat.h>    /* file characteristics constants and functions */
+#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);
 
@@ -125,13 +124,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) 
 {