summaryrefslogtreecommitdiff
path: root/stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'stats.c')
-rw-r--r--stats.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/stats.c b/stats.c
index 3eca5b9..48697cb 100644
--- a/stats.c
+++ b/stats.c
@@ -27,6 +27,7 @@
static char verlev;
static char loglev;
static FILE* logfd;
+static signed long compressgained;
char*
datum(void)
@@ -77,3 +78,21 @@ aflog(char type, const char* format, ...)
}
va_end(ap);
}
+
+void
+addtocg(int amount)
+{
+ compressgained += amount;
+}
+
+signed long
+getcg(void)
+{
+ return compressgained;
+}
+
+void
+resetcg(void)
+{
+ compressgained = 0;
+}