X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=cli.c;h=be9af383e0745cdbd4448d5be14db86e4e301c75;hb=f040b1fe921a666514b59f0374817832e11bca2d;hp=abb84a948aa0837d9c46063c377c48ac1d3a0802;hpb=0d0b89542d5657ecb96b02f35b1bfdd53c635cb2;p=innduct.git diff --git a/cli.c b/cli.c index abb84a9..be9af38 100644 --- 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