/* Citadel/UX call log stats program
+ * $Id$
*/
#include <stdlib.h>
#include <unistd.h>
#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)
int Ctimescalled;
};
-void get_config ();
-struct config config;
-
void
-prompt ()
+prompt (void)
{
char buf[16];
if (batch_mode == 0)
}
int
-halfhour (time) /* Returns half-hour time period of time */
- long time;
+halfhour (time_t time) /* Returns half-hour time period of time */
+
{
int a;
struct tm *tm;
void
-progress (curr, max)
- long curr;
- long max;
+progress (long int curr, long int max)
{
static int dots;
int pos;
-void
-main (argc, argv)
- int argc;
- char *argv[];
+int
+main (int argc, char **argv)
{
time_t LogTime;
unsigned int LogType;
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;
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;
}
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. */
/*
exit (0);
*/
}
+ return 0;
}