2017-10-06 14:48:52 +01:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 The Altra64 project contributors
|
|
|
|
// See LICENSE file in the project root for full license information.
|
|
|
|
//
|
2016-09-07 22:11:50 +01:00
|
|
|
|
2017-10-11 16:53:18 +01:00
|
|
|
#ifndef _DEBUG_H
|
|
|
|
#define _DEBUG_H
|
|
|
|
|
2016-09-07 22:11:50 +01:00
|
|
|
#ifdef DEBUG
|
|
|
|
#define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__);
|
2017-10-27 17:08:13 +01:00
|
|
|
#define TRACE(disp, text) dbg_print(disp, text);
|
2016-09-07 22:11:50 +01:00
|
|
|
#else
|
2017-10-27 17:08:13 +01:00
|
|
|
#define TRACEF(disp, text, ...) do { if (0) dbg_printf(disp, text, __VA_ARGS__); } while (0)
|
|
|
|
#define TRACE(disp, text) do { if (0) dbg_print(disp, text); } while (0)
|
2017-10-13 00:23:59 +01:00
|
|
|
#endif
|
2017-10-11 16:53:18 +01:00
|
|
|
|
2017-10-13 00:23:59 +01:00
|
|
|
void dbg_printf(display_context_t disp, const char *fmt, ...);
|
2017-10-27 17:08:13 +01:00
|
|
|
void dbg_print(display_context_t disp, char *fmt);
|
2017-10-11 16:53:18 +01:00
|
|
|
|
|
|
|
#endif
|