diff --git a/bind/v4k.lua b/bind/v4k.lua index 2a60293..5092c84 100644 --- a/bind/v4k.lua +++ b/bind/v4k.lua @@ -1496,9 +1496,6 @@ ffi.cdef([[ //lcpp INF [0000] vec3: macro name but used as C declaration in: void light_dir(light_t* l, vec3 dir); //lcpp INF [0000] vec2i: macro name but used as C declaration in:vec2i* entries; //lcpp INF [0000] vec3i: macro name but used as C declaration in:typedef vec3i guid; -//lcpp INF [0000] test: macro name but used as C declaration in:API int (test)(const char *file, int line, const char *expr, bool result); -//lcpp INF [0000] test: macro name but used as C declaration in:STATIC int (test)(const char *file, int line, const char *expr, bool result); -//lcpp INF [0000] test: macro name but used as C declaration in: int (test)(const char *file, int line, const char *expr, bool result); //lcpp INF [0000] vec2: macro name but used as C declaration in:API vec2 ui_get_dims(); //lcpp INF [0000] vec2: macro name but used as C declaration in:STATIC vec2 ui_get_dims(); //lcpp INF [0000] vec2: macro name but used as C declaration in: vec2 ui_get_dims(); @@ -3091,8 +3088,6 @@ typedef vec3i guid; void trap_on_abort(int signal); void trap_on_debug(int signal); int (PANIC)(const char *error, const char *file, int line); - int (PRINTF)(const char *text, const char *stack, const char *file, int line, const char *function); - int (test)(const char *file, int line, const char *expr, bool result); enum PANEL_FLAGS { PANEL_OPEN = 1, }; diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index ee48cd3..890f8d2 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -17713,11 +17713,16 @@ API void trap_on_debug(int signal); // helper util #define PANIC(...) PANIC(va(__VA_ARGS__), __FILE__, __LINE__) // die() ? API int (PANIC)(const char *error, const char *file, int line); +#if !ENABLE_RETAIL #define PRINTF(...) PRINTF(va(__VA_ARGS__), 1[#__VA_ARGS__] == '!' ? callstack(+48) : "", __FILE__, __LINE__, __FUNCTION__) API int (PRINTF)(const char *text, const char *stack, const char *file, int line, const char *function); #define test(expr) test(__FILE__,__LINE__,#expr,!!(expr)) API int (test)(const char *file, int line, const char *expr, bool result); +#else +#define PRINTF(...) +#define test(expr) +#endif #if ENABLE_TESTS #define AUTOTEST AUTORUN diff --git a/engine/split/v4k_system.h b/engine/split/v4k_system.h index 5f48191..0cd30ed 100644 --- a/engine/split/v4k_system.h +++ b/engine/split/v4k_system.h @@ -62,11 +62,16 @@ API void trap_on_debug(int signal); // helper util #define PANIC(...) PANIC(va(__VA_ARGS__), __FILE__, __LINE__) // die() ? API int (PANIC)(const char *error, const char *file, int line); +#if !ENABLE_RETAIL #define PRINTF(...) PRINTF(va(__VA_ARGS__), 1[#__VA_ARGS__] == '!' ? callstack(+48) : "", __FILE__, __LINE__, __FUNCTION__) API int (PRINTF)(const char *text, const char *stack, const char *file, int line, const char *function); #define test(expr) test(__FILE__,__LINE__,#expr,!!(expr)) API int (test)(const char *file, int line, const char *expr, bool result); +#else +#define PRINTF(...) +#define test(expr) +#endif #if ENABLE_TESTS #define AUTOTEST AUTORUN diff --git a/engine/v4k.h b/engine/v4k.h index 2f4efb7..9c63653 100644 --- a/engine/v4k.h +++ b/engine/v4k.h @@ -3780,11 +3780,16 @@ API void trap_on_debug(int signal); // helper util #define PANIC(...) PANIC(va(__VA_ARGS__), __FILE__, __LINE__) // die() ? API int (PANIC)(const char *error, const char *file, int line); +#if !ENABLE_RETAIL #define PRINTF(...) PRINTF(va(__VA_ARGS__), 1[#__VA_ARGS__] == '!' ? callstack(+48) : "", __FILE__, __LINE__, __FUNCTION__) API int (PRINTF)(const char *text, const char *stack, const char *file, int line, const char *function); #define test(expr) test(__FILE__,__LINE__,#expr,!!(expr)) API int (test)(const char *file, int line, const char *expr, bool result); +#else +#define PRINTF(...) +#define test(expr) +#endif #if ENABLE_TESTS #define AUTOTEST AUTORUN