summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/functions.h b/functions.h
index d56a295..dc3c4c3 100644
--- a/functions.h
+++ b/functions.h
@@ -21,12 +21,15 @@
#define OK 0
#define NO_INPUT 1
#define TOO_LONG 2
-#define DEBUG_NONE 0
-#define DEBUG_FILE 1
-#define DEBUG_SCREEN 2
-// Print debugging output if enabled
-void debugprint(char *format, ...);
+#define DEBUG_CRIT 0
+#define DEBUG_SOME 1
+#define DEBUG_FULL 2
+
+// Write debug string to file.
+// Debug level is provided by level, set to one of DEBUG_CRIT, DEBUG_SOME or DEBUG_FULL.
+// Debug is only written if the global int "debug" is greater than or equal to the level.
+void debugprint(int level, char *format, ...);
// Get stdin line with buffer overrun protection
int getstdin(char *prompt, char *buff, size_t sz);