summaryrefslogtreecommitdiff
path: root/stats.c
diff options
context:
space:
mode:
authorJakub Sławiński2004-01-09 18:48:31 +0100
committerJoshua Judson Rosen2014-07-17 21:14:55 +0200
commitc691251feaffa310a51e0c2255eefc6b42f0e728 (patch)
treef7202a10873641aad3c93850948ec3d969c97735 /stats.c
parentv0.5.2 (diff)
downloadapf-c691251feaffa310a51e0c2255eefc6b42f0e728.tar.gz
v0.5.3
- Added: client password identification (weak) - Added: sigint intercepting and server closing - Modified: communication between server and client - Added: 'nossl' and 'nozlib' modes - Added: zlib support - Lightly Modified: verbose mode - Modified/Added: help screen and long options support
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;
+}