ocarina/include/core/print.h

33 lines
548 B
C

/*
* Copyright (c) 2013 Anna Schumaker.
*/
#ifndef OCARINA_PRINT_H
#define OCARINA_PRINT_H
#include <cstdio>
#include <cstdarg>
inline void print(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
}
#if defined(CONFIG_DEBUG) || defined(CONFIG_TEST)
inline void dprint(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
}
#else /* ! (CONFIG_DEBUG || CONFIG_TEST) */
inline void dprint(const char *fmt, ...) {}
#endif /* CONFIG_DEBUG */
#endif /* OCARINA_PRINT_H */