diff --git a/smmapdfw/libsmmapdfw/stats.c b/smmapdfw/libsmmapdfw/stats.c index 56195b7..08889e2 100644 --- a/smmapdfw/libsmmapdfw/stats.c +++ b/smmapdfw/libsmmapdfw/stats.c @@ -20,6 +20,7 @@ #include +#include #include "config.h" @@ -66,21 +67,39 @@ void decStatCounter(int cnt_idx) { #endif } -void outputStats(int nice) { +void outputStats(int stdout_nice, int syslog_nice) { #if ENABLE_STATS==1 - int i; + char buf[1024]; + char buf2[64]; + int i, v; - if (nice) + *buf = '\0'; + *buf2 = '\0'; + + strcat(buf, "Stats: "); + + if (2 == stdout_nice) printf("---------------------------------------------------------\n"); for (i=1; i