summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-27 23:01:11 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-27 23:01:11 +0100
commit31ce10b31198128de4983667820319a193adb976 (patch)
tree99ff7bc13815f25c13a8d994b7dc28d302e72225 /functions.h
parent4b2cd5c4c349ea3e5683a6b2beb42c518d3ccef3 (diff)
Make debug output optional and disabled by default.
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.h b/functions.h
index 8fb5145..29518aa 100644
--- a/functions.h
+++ b/functions.h
@@ -12,6 +12,7 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/select.h>
+#include <stdarg.h>
#define MAXDATASIZE 513 // max number of bytes we can get at once (RFC2812 says 512, plus one for null terminator)
@@ -20,6 +21,9 @@
#define NO_INPUT 1
#define TOO_LONG 2
+// Print debugging output if enabled
+void debugprint(char *format, ...);
+
// Get stdin line with buffer overrun protection
int getstdin(char *prompt, char *buff, size_t sz);