chiark / gitweb /
Group counters into struct
[innduct.git] / cli.c
diff --git a/cli.c b/cli.c
index abb84a948aa0837d9c46063c377c48ac1d3a0802..be9af383e0745cdbd4448d5be14db86e4e301c75 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -100,6 +100,8 @@ CCMD(stop) {
   abort();
 }
 
+CCMD(logstats) { showstats(); }
+
 CCMD(dump);
 
 /* messing with our head: */
@@ -112,6 +114,7 @@ static const CliCommand cli_commands[]= {
   { "h",             ccmd_help      },
   { "flush",         ccmd_flush     },
   { "stop",          ccmd_stop      },
+  { "logstats",      ccmd_logstats  },
   { "dump q",        ccmd_dump, 0,0 },
   { "dump a",        ccmd_dump, 0,1 },
 
@@ -326,17 +329,17 @@ static void dump_input_file(FILE *f, const CliCommand *c,
   free(dipf);
   
   if (ipf) {
-    DUMPV("%d", ipf->,readcount_ok);
-    DUMPV("%d", ipf->,readcount_blank);
-    DUMPV("%d", ipf->,readcount_err);
-    DUMPV("%d", ipf->,count_nooffer_missing);
+    DUMPV("%d", ipf->counts.,read_ok);
+    DUMPV("%d", ipf->counts.,read_blank);
+    DUMPV("%d", ipf->counts.,read_err);
+    DUMPV("%d", ipf->counts.,nooffer_missing);
   }
   fprintf(f,"\n");
   if (ipf) {
     ArtState state; const char *const *statename; 
     for (state=0, statename=artstate_names; *statename; state++,statename++) {
 #define RC_DUMP_FMT(x) " " #x "=%d"
-#define RC_DUMP_VAL(x) ,ipf->counts[state][RC_##x]
+#define RC_DUMP_VAL(x) ,ipf->counts.counts[state][RC_##x]
       fprintf(f,"input %s counts %-11s"
              RESULT_COUNTS(RC_DUMP_FMT,RC_DUMP_FMT) "\n",
              wh, *statename