add MSL_C/stdio.h (#317)

This commit is contained in:
Jcw87
2023-04-21 02:02:03 -07:00
committed by GitHub
parent 472340e2d6
commit f5fc527d39
34 changed files with 59 additions and 35 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JUtility/TColor.h"
#include "MSL_C/MSL_Common/Src/printf.h"
#include "Runtime.PPCEABI.H/__va_arg.h"
#include "dolphin/types.h"
class J2DPrint {
+3 -3
View File
@@ -104,9 +104,9 @@ typedef struct _FILE {
} FILE;
typedef struct _files {
FILE stdin;
FILE stdout;
FILE stderr;
FILE _stdin;
FILE _stdout;
FILE _stderr;
FILE empty;
} files;
+14
View File
@@ -0,0 +1,14 @@
#ifndef MSL_STDIO_H_
#define MSL_STDIO_H_
#include "MSL_C/MSL_Common/Src/FILE_POS.h"
#include "MSL_C/MSL_Common/Src/char_io.h"
#include "MSL_C/MSL_Common/Src/direct_io.h"
#include "MSL_C/MSL_Common/Src/file_io.h"
#include "MSL_C/MSL_Common/Src/printf.h"
#define stdin (&__files._stdin)
#define stdout (&__files._stdout)
#define stderr (&__files._stderr)
#endif
+6 -10
View File
@@ -1,27 +1,23 @@
#ifndef MSL_STRING_H_
#define MSL_STRING_H_
#include "Runtime.PPCEABI.H/__va_arg.h"
#include "MSL_C/MSL_Common/Src/stddef.h"
// TODO: move to MSL_C/
extern "C" {
void memcpy(void*, const void*, s32);
void* memset(void* dest, int ch, u32 count);
void memcpy(void*, const void*, size_t);
void* memset(void* dest, int ch, size_t count);
char* strrchr(const char* s, int c);
char* strchr(const char* s, int c);
int strncmp(const char* s1, const char* s2, u32 n);
int strncmp(const char* s1, const char* s2, size_t n);
int strcmp(const char* s1, const char* s2);
int stricmp(const char*, const char*);
char* strcat(char* dest, const char* source);
char* strncpy(char* dest, const char* source, u32 n);
char* strncpy(char* dest, const char* source, size_t n);
char* strcpy(char* dest, const char* source);
u32 strlen(const char* s);
size_t strlen(const char* s);
int tolower(int);
int sprintf(char*, const char*, ...);
int printf(const char*, ...);
int snprintf(char*, u32, const char*, ...);
size_t vsnprintf(char* buffer, size_t buffer_size, const char* format, va_list args);
}
#endif
-1
View File
@@ -1,7 +1,6 @@
#ifndef D_SAVE_D_SAVE_H
#define D_SAVE_D_SAVE_H
#include "MSL_C/MSL_Common/Src/printf.h"
#include "MSL_C/MSL_Common/Src/string.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/os/OS.h"
-2
View File
@@ -1,8 +1,6 @@
#ifndef M_DO_M_DO_PRINTF_H
#define M_DO_M_DO_PRINTF_H
#include "MSL_C/MSL_Common/Src/char_io.h"
#include "MSL_C/MSL_Common/Src/printf.h"
#include "Runtime.PPCEABI.H/__va_arg.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_main.h"