ocarina/include/print.h
Bryan Schumaker 8c4e515145 Update copyright info
What's the point in continuing to commit as Bryan?  I'd rather commit as
me :)

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:52 -04:00

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 */