-
-
-#define ENTER(...) do{}while(0)
-#define LOG(...) do{}while(0)
-#define LEAVE(...) do{}while(0)
-#define LEAVE_RET(t,v) return v;
+extern int snprintf(char *buf, size_t len, const char *fmt, ...);
+extern int sprintf(char *buf, const char *fmt, ...);
+extern int ReadUTF8(const Uint8 *str, Uint32 *Val);
+extern int WriteUTF8(Uint8 *str, Uint32 Val);
+#define CheckString(str) (1)
+#define CheckMem(mem,sz) (1)
+
+// TODO: Move out?
+extern int DivUp(int value, int divisor);
+extern uint64_t DivMod64U(uint64_t Num, uint64_t Den, uint64_t *Rem);
+
+#if DEBUG
+# define ENTER(str, v...) Log("%s:%i: ENTER "str, __func__, __LINE__)
+# define LOG(fmt, v...) Log("%s:%i: "fmt, __func__, __LINE__, ##v)
+# define LEAVE(...) do{}while(0)
+# define LEAVE_RET(t,v) return v;
+#else
+# define ENTER(...) do{}while(0)
+# define LOG(...) do{}while(0)
+# define LEAVE(...) do{}while(0)
+# define LEAVE_RET(t,v) return v;
+#endif