mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-04 20:15:09 +01:00
Remove debug.h
This commit is contained in:
parent
7a2f7747ee
commit
4947dda9c6
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _3DS
|
||||
#include <3ds.h>
|
||||
#define ESC(x) "\x1b[" #x
|
||||
#define RESET ESC(0m)
|
||||
#define BLACK ESC(30m)
|
||||
|
@ -1,54 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string.h>
|
||||
#ifdef _3DS
|
||||
#include <3ds.h>
|
||||
#endif
|
||||
|
||||
/*! print debug message
|
||||
*
|
||||
* @param[in] fmt format string
|
||||
* @param[in] ap varargs list
|
||||
*
|
||||
* @returns number of characters written
|
||||
*/
|
||||
static inline int
|
||||
vdebug(const char *fmt,
|
||||
va_list ap)
|
||||
{
|
||||
#ifdef _3DS
|
||||
int rc;
|
||||
char buffer[256];
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
|
||||
/* print to buffer */
|
||||
rc = vsnprintf(buffer, sizeof(buffer)-1, fmt, ap);
|
||||
|
||||
/* call debug service with buffer */
|
||||
svcOutputDebugString(buffer, rc < sizeof(buffer) ? rc : sizeof(buffer));
|
||||
return rc;
|
||||
#else
|
||||
/* just print to stdout */
|
||||
return vprintf(fmt, ap);
|
||||
#endif
|
||||
}
|
||||
|
||||
__attribute__((format(printf,1,2)))
|
||||
/*! print debug message
|
||||
*
|
||||
* @param[in] fmt format string
|
||||
* @param[in] ... format arguments
|
||||
*
|
||||
* @returns number of characters written
|
||||
*/
|
||||
static inline int
|
||||
debug(const char *fmt, ...)
|
||||
{
|
||||
int rc;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
rc = vdebug(fmt, ap);
|
||||
va_end(ap);
|
||||
return rc;
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
#include "console.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#ifdef _3DS
|
||||
#include <3ds.h>
|
||||
#endif
|
||||
#include "debug.h"
|
||||
#include "gfx.h"
|
||||
|
||||
#ifdef _3DS
|
||||
|
Loading…
Reference in New Issue
Block a user