Merge pull request #4 from Cuyler36/libc64/aprintf

Add libc64/aprintf.c
This commit is contained in:
Prakxo
2023-02-22 23:29:01 +01:00
committed by GitHub
6 changed files with 50 additions and 1 deletions
+2
View File
@@ -4,6 +4,8 @@
# .text: [0x8005B210, 0x8005B238]
libforest/ReconfigBATs.c:
.text: [0x8005adac, 0x8005aed4]
libc64/aprintf.c:
.text: [0x8005cbdc, 0x8005cc14]
JSystem/JKernel/JKRHeap.cpp:
.text: [0x80063748, 0x80064028]
.data: [0x800ddf20, 0x800ddf98]
+20
View File
@@ -0,0 +1,20 @@
#ifndef APRINTF_H
#define APRINTF_H
#include "types.h"
#include "va_args.h"
#ifdef __cplusplus
extern "C"{
#endif
typedef struct {
void* (*prout_func)(void*, const char*, int);
} aprout_func_t;
extern int vaprintf(aprout_func_t* func, const char* fmt, va_list ap);
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef XRINTF_H
#define XRINTF_H
#include "types.h"
#include "va_args.h"
#ifdef __cplusplus
extern "C"{
#endif
extern int _Printf(void* (*prout_func)(void*, const char*, int), void* arg, const char* fmt, va_list ap);
#ifdef __cplusplus
}
#endif
#endif
+6
View File
@@ -0,0 +1,6 @@
#include "libc64/aprintf.h"
#include "libultra/xprintf.h" /* _Printf */
extern int vaprintf(aprout_func_t* func, const char* fmt, va_list ap) {
return _Printf(func->prout_func, func, fmt, ap);
}
+1 -1
View File
@@ -1,5 +1,5 @@
#include "libultra/gfxprint.h"
#include "libultra/aprintf.h" /* TODO: implement libultra/aprintf.h for vaprintf */
#include "libc64/aprintf.h"
static u8 gfxprint_font[] = {
0x00, 0xdf, 0xfd, 0x00, 0x0a, 0xee, 0xff, 0xa0, 0x0d, 0xf2, 0x2d, 0xd0, 0x06, 0x61, 0x1d, 0xc0,
+5
View File
@@ -0,0 +1,5 @@
#include "libultra/xprintf.h"
extern int _Printf(void* (*prout_func)(void*, const char*, int), void* arg, const char* fmt, va_list ap) {
}