Index: src/examples/tools/asserts.h
===================================================================
--- src/examples/tools/asserts.h	(revision a772d8abfc1b1fd6a2de73fd9a6bc889033a4e62)
+++ src/examples/tools/asserts.h	(revision a772d8abfc1b1fd6a2de73fd9a6bc889033a4e62)
@@ -0,0 +1,42 @@
+#pragma once
+
+#if NDEBUG
+
+#define assert(x)
+#define assertf(x, ...)
+
+#else
+
+#ifdef __cforall
+extern "C" {
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef USE_BSD_LIB
+#include <bsd/stdlib.h>
+#endif
+#ifdef __cforall
+}
+#endif
+
+#ifdef USE_BSD_LIB
+#define OUT_TXT "%s: %s:%i: %s: Assertion \'%s\' failed.\n", getprogname()
+#else
+#define OUT_TXT "%s:%i: %s: Assertion \'%s\' failed.\n"
+#endif
+
+#define assert(x) do {\
+	if(!(x)) {\
+		printf(OUT_TXT, __FILE__, __LINE__, __PRETTY_FUNCTION__, #x);\
+		abort();\
+	}}while(1 == 2)\
+
+
+#define assertf(x, ...) do {\
+	if(!(x)) {\
+		printf(OUT_TXT, __FILE__, __LINE__, __PRETTY_FUNCTION__, #x);\
+		printf(__VA_ARGS__);\
+		abort();\
+	}}while(1 == 2)\
+
+#endif 
Index: src/examples/tools/print.h
===================================================================
--- src/examples/tools/print.h	(revision a772d8abfc1b1fd6a2de73fd9a6bc889033a4e62)
+++ src/examples/tools/print.h	(revision a772d8abfc1b1fd6a2de73fd9a6bc889033a4e62)
@@ -0,0 +1,13 @@
+#pragma once
+
+#if _DEBUG
+
+#include <fstream>
+
+#define DEBUG_OUT(x) sout | x | endl;
+
+#else
+
+#define DEBUG_OUT(x)
+
+#endif //NO_CHECKS
