print: Remove dprint()
dprint() has no users, so it can be removed. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
8128e5b5e1
commit
23cc27c3ef
13
DESIGN
13
DESIGN
|
@ -22,19 +22,6 @@ Install:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Printing:
|
|
||||||
Sometimes text needs to be printed to the screen so users (or debuggers)
|
|
||||||
can trace what is going on.
|
|
||||||
|
|
||||||
API:
|
|
||||||
void print(string fmt, ...);
|
|
||||||
void dprint(string fmt, ...);
|
|
||||||
Print text to the screen. The dprint() option will only only
|
|
||||||
be implemented when when CONFIG_DEBUG or CONFIG_TEST is enabled,
|
|
||||||
and will be an empty function otherwise.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Callbacks:
|
Callbacks:
|
||||||
Callbacks are used to notify a unit test or the gui that something in
|
Callbacks are used to notify a unit test or the gui that something in
|
||||||
the backend has changed. The callbacks structure should be initialized
|
the backend has changed. The callbacks structure should be initialized
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* Print a message to the console
|
* Print a message to the console
|
||||||
*
|
*
|
||||||
* @param fmt Printf-style text format.
|
* @param fmt Printf-style text format.
|
||||||
* @param ... Var-args to be printed.
|
* @param ... Var-args matching the specified format.
|
||||||
*/
|
*/
|
||||||
inline void print(const char *fmt, ...)
|
inline void print(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -23,23 +23,4 @@ inline void print(const char *fmt, ...)
|
||||||
va_end(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) */
|
|
||||||
/**
|
|
||||||
* Print a message to the console (only if debugging is enabled).
|
|
||||||
*
|
|
||||||
* @param fmt Printf-style text format.
|
|
||||||
* @param ... Var-args to be printed.
|
|
||||||
*/
|
|
||||||
inline void dprint(const char *fmt, ...) {}
|
|
||||||
#endif /* CONFIG_DEBUG */
|
|
||||||
|
|
||||||
#endif /* OCARINA_CORE_PRINT_H */
|
#endif /* OCARINA_CORE_PRINT_H */
|
||||||
|
|
Loading…
Reference in New Issue