From f2e83a61ac802770255a0be98cdc63af4625fe84 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 22 Aug 2021 13:19:49 +0200 Subject: [PATCH] added a debugging constant to identify absence of textIO --- kinclude/io.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kinclude/io.h b/kinclude/io.h index 38eb254..35fe968 100644 --- a/kinclude/io.h +++ b/kinclude/io.h @@ -4,6 +4,9 @@ // if we have a textIO module #ifdef TEXT_IO_ADDR +#define DEBUGGING 1 + + #ifndef TEXT_IO_BUFLEN #error "When defining TEXT_IO_ADDR, please also provide TEXT_IO_BUFLEN, otherwise textIO won't work!" #endif @@ -14,13 +17,16 @@ void dbgln(char* text, int len); /* alphabet for itoa */ char* itoa (int value, char* str, int base); +// if we don't have a textIO module for debugging #else +#define DEBUGGING 0 + + // if we don't have textio, dbgln becomes an empty macro to save on cycles #define dbgln(a,b) // itoa just evaluates to the passes pointer #define itoa(a,b,c) b #endif - #endif