Aggiunto il programma di lettura che era rimasto fuori, fatte alcune
[gapil.git] / sources / DirMonitor.c
index 7e6b2884ee7866b3e666c702420266e4f1337c16..2f11833a800479a96f6c0bff6edbf34a03efc26d 100644 (file)
@@ -25,7 +25,7 @@
  *
  * Author: S. Piccardi Jan. 2003
  *
- * $Id: DirMonitor.c,v 1.2 2003/01/04 17:24:30 piccardi Exp $
+ * $Id: DirMonitor.c,v 1.4 2003/01/10 09:28:49 piccardi Exp $
  *
  *****************************************************************************/
 #include <sys/types.h>
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
     }
 }
 /*
- * Routine to print file name and size inside DirScan
+ * Routine to compute directory properties inside DirScan
  */
 int ComputeValues(struct dirent * direntry) 
 {
@@ -137,10 +137,10 @@ int ComputeValues(struct dirent * direntry)
     if (S_ISREG(data.st_mode)) shmptr->tot_regular++;
     if (S_ISFIFO(data.st_mode)) shmptr->tot_fifo++;
     if (S_ISLNK(data.st_mode)) shmptr->tot_link++;
-    if (S_ISDIR(data.st_mode)) shmptr->tot_dir;
-    if (S_ISBLK(data.st_mode)) shmptr->tot_block;
-    if (S_ISCHR(data.st_mode)) shmptr->tot_char;
-    if (S_ISSOCK(data.st_mode)) shmptr->tot_sock;
+    if (S_ISDIR(data.st_mode)) shmptr->tot_dir++;
+    if (S_ISBLK(data.st_mode)) shmptr->tot_block++;
+    if (S_ISCHR(data.st_mode)) shmptr->tot_char++;
+    if (S_ISSOCK(data.st_mode)) shmptr->tot_sock++;
     return 0;
 }
 /*