renamed msl_c -> MSL_C

This commit is contained in:
Zen64
2022-03-19 23:44:14 -04:00
parent 6e4adde5d2
commit 1303dd683e
217 changed files with 15997 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_FILE_POS_H
#define MSL_COMMON_SRC_FILE_POS_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_FILE_POS_H */
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_ABORT_EXIT_H
#define MSL_COMMON_SRC_ABORT_EXIT_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_ABORT_EXIT_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_ALLOC_H
#define MSL_COMMON_SRC_ALLOC_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_ALLOC_H */
+40
View File
@@ -0,0 +1,40 @@
#ifndef MSL_COMMON_SRC_ANSI_FILES_H
#define MSL_COMMON_SRC_ANSI_FILES_H
#include "dolphin/types.h"
struct FILE {
/* 0x00 */ u32 handle;
/* 0x04 */ u32 file_mode;
/* 0x08 */ u32 file_state;
/* 0x0C */ u8 flag;
/* 0x0D */ char char_buffer;
/* 0x0E */ char char_buffer_2;
/* 0x0F */ char ungetc_buffer[2];
/* 0x12 */ u16 ungetc_wide_buffer[2];
/* 0x18 */ u32 position;
/* 0x1C */ u8* buffer;
/* 0x20 */ u32 buffer_size;
/* 0x24 */ u8* buffer_ptr;
/* 0x28 */ u32 buffer_length;
/* 0x2C */ u32 buffer_alignment;
/* 0x30 */ u32 buffer_length2;
/* 0x34 */ u32 buffer_position;
/* 0x38 */ void* position_fn;
/* 0x3C */ void* read_fn;
/* 0x40 */ void* write_fn;
/* 0x44 */ void* close_fn;
/* 0x48 */ void* unknown;
/* 0x4C */ struct FILE* next_file;
};
struct files {
FILE stdin;
FILE stdout;
FILE stderr;
FILE empty;
};
extern files __files;
#endif /* MSL_COMMON_SRC_ANSI_FILES_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_ARITH_H
#define MSL_COMMON_SRC_ARITH_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_ARITH_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_BUFFER_IO_H
#define MSL_COMMON_SRC_BUFFER_IO_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_BUFFER_IO_H */
+9
View File
@@ -0,0 +1,9 @@
#ifndef MSL_COMMON_SRC_CHAR_IO_H
#define MSL_COMMON_SRC_CHAR_IO_H
#include "msl_c/MSL_Common/Src/ansi_files.h"
#include "dolphin/types.h"
extern "C" int fputs(const char*, FILE*);
#endif /* MSL_COMMON_SRC_CHAR_IO_H */
+10
View File
@@ -0,0 +1,10 @@
#ifndef MSL_COMMON_SRC_CTYPE_H
#define MSL_COMMON_SRC_CTYPE_H
#include "dolphin/types.h"
extern "C" {
int tolower(int);
};
#endif /* MSL_COMMON_SRC_CTYPE_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_DIRECT_IO_H
#define MSL_COMMON_SRC_DIRECT_IO_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_DIRECT_IO_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_ERRNO_H
#define MSL_COMMON_SRC_ERRNO_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_ERRNO_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_EXTRAS_H
#define MSL_COMMON_SRC_EXTRAS_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_EXTRAS_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_FILE_IO_H
#define MSL_COMMON_SRC_FILE_IO_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_FILE_IO_H */
+48
View File
@@ -0,0 +1,48 @@
#ifndef MSL_COMMON_SRC_FLOAT_H
#define MSL_COMMON_SRC_FLOAT_H
#include "dolphin/types.h"
#define FP_SNAN 0
#define FP_QNAN 1
#define FP_INFINITE 2
#define FP_ZERO 3
#define FP_NORMAL 4
#define FP_SUBNORMAL 5
#define FP_NAN FP_QNAN
#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) : __fpclassifyd(x))
#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) : __signbitd(x))
#define __signbitf(x) ((*(u8*)&(x)) & 0x80)
// TODO: OK?
#define __signbitd(x) ((*(u8*)&(x)) & 0x80)
inline int __fpclassifyf(float __value) {
u32 integer = *(u32*)&__value;
switch (integer & 0x7f800000) {
case 0x7f800000:
if ((integer & 0x7fffff) != 0) {
return FP_QNAN;
}
return FP_INFINITE;
case 0:
if ((integer & 0x7fffff) != 0) {
return FP_SUBNORMAL;
}
return FP_ZERO;
}
return FP_NORMAL;
}
inline int __fpclassifyd(double __value) {
// TODO:
return FP_INFINITE;
}
#endif /* MSL_COMMON_SRC_FLOAT_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_MBSTRING_H
#define MSL_COMMON_SRC_MBSTRING_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_MBSTRING_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef MSL_COMMON_SRC_MEM_H
#define MSL_COMMON_SRC_MEM_H
#include "dolphin/types.h"
extern "C" int memcmp(const void*, const void*, size_t);
#endif /* MSL_COMMON_SRC_MEM_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_MEM_FUNCS_H
#define MSL_COMMON_SRC_MEM_FUNCS_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_MEM_FUNCS_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_MISC_IO_H
#define MSL_COMMON_SRC_MISC_IO_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_MISC_IO_H */
+13
View File
@@ -0,0 +1,13 @@
#ifndef MSL_COMMON_SRC_PRINTF_H
#define MSL_COMMON_SRC_PRINTF_H
#include "Runtime.PPCEABI.H/__va_arg.h"
#include "dolphin/types.h"
extern "C" size_t sprintf(const char*, const char*, ...);
extern "C" size_t snprintf(const char*, size_t, const char*, ...);
extern "C" size_t vsnprintf(char*, size_t, const char*, va_list);
extern "C" size_t vprintf(const char*, va_list);
extern "C" size_t printf(const char*, ...);
#endif /* MSL_COMMON_SRC_PRINTF_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_SCANF_H
#define MSL_COMMON_SRC_SCANF_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_SCANF_H */
+6
View File
@@ -0,0 +1,6 @@
#ifndef MSL_COMMON_SRC_SIGNAL_H
#define MSL_COMMON_SRC_SIGNAL_H
#include "dolphin/types.h"
#endif /* MSL_COMMON_SRC_SIGNAL_H */

Some files were not shown because too many files have changed in this diff Show More