]> code.citadel.org Git - citadel.git/blobdiff - citadel/stats.c
* added RCS Id keyword strings to sources
[citadel.git] / citadel / stats.c
index 0d7f4ce169353f5492dc32d291eaa9ebc4a10093..c88a166a29aa0224198063a917424e69c7a7a108 100644 (file)
@@ -1,4 +1,5 @@
 /* Citadel/UX call log stats program
+ * $Id$
  */
 #include <stdlib.h>
 #include <unistd.h>
@@ -7,7 +8,9 @@
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include "citadel.h"
+#include "config.h"
 
 #define disply(x,y) printf("%20s            %4.1f    %4.1f    %4d\n",x,((float)y)/calls,((float)y)/days,y)
 
@@ -22,9 +25,6 @@ struct caller
     int Ctimescalled;
   };
 
-void get_config (void);
-struct config config;
-
 
 void
 prompt (void)
@@ -42,7 +42,7 @@ prompt (void)
 }
 
 int
-halfhour (long int time)                       /* Returns half-hour time period of time */
+halfhour (time_t time)                 /* Returns half-hour time period of time */
                
 {
   int a;
@@ -92,7 +92,7 @@ progress (long int curr, long int max)
 
 
 
-void
+int
 main (int argc, char **argv)
 {
   time_t LogTime;
@@ -107,7 +107,7 @@ main (int argc, char **argv)
   long cftime, cttime, aa;
   int calls, logins, newusers;
   int badpws, terms, drops, sleeps;
-  long from, to, tottime;
+  time_t from, to, tottime;
   int days, hours, minutes;
   char aaa[100];
   struct tm *tm;
@@ -140,8 +140,8 @@ main (int argc, char **argv)
   if (!batch_mode)
     printf ("Scanning call log, please wait...\n\n\n\n");
 
-  from = 0L;
-  to = 0L;
+  from = 0;
+  to = 0;
   for (a = 0; a < 72; ++a)
     {
       timeon[a] = 0L;
@@ -345,7 +345,9 @@ main (int argc, char **argv)
        }
       prompt ();
 
-    PC_ONLY_HERE:
+    PC_ONLY_HERE:; /* yes this semicolon is necessary; the DEC C compiler
+                     complains that a label must be followed by an actual
+                     statement. */
 
 
 /*
@@ -369,4 +371,5 @@ main (int argc, char **argv)
       exit (0);
  */
     }
+    return 0;
 }