From 6136a2e06d8fbe45acea67301a7b44cf31d4ef3c Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 08:05:03 +0000 Subject: [PATCH 1/4] Link matching iplDate unit --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index a04536e2..8386654e 100644 --- a/configure.py +++ b/configure.py @@ -751,7 +751,7 @@ config.libs = [ ), IPLSection("calendar", [ Object(Equivalent, "scene/calendar/iplCalendar.cpp"), - Object(Equivalent, "scene/calendar/iplDate.cpp"), + Object(Matching, "scene/calendar/iplDate.cpp"), ] ), IPLSection("channelEdit", [ -- 2.49.1 From 43fb4f1bb743a7168273e053c23a15422d057cf6 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 03:06:49 -0500 Subject: [PATCH 2/4] Match MSL extras unit (#165) --- configure.py | 2 +- libs/MSL/src/MSL_Common/extras.c | 73 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 libs/MSL/src/MSL_Common/extras.c diff --git a/configure.py b/configure.py index a04536e2..c4476d4d 100644 --- a/configure.py +++ b/configure.py @@ -1977,7 +1977,7 @@ config.libs = [ Object(Matching, "PPC_EABI/uart_console_io_gcn.c"), Object(Matching, "PPC_EABI/abort_exit_ppc_eabi.c"), Object(Matching, "MSL_Common/math_sun.c", extra_cflags=["-Cpp_exceptions on"]), - Object(NonMatching, "MSL_Common/extras.c"), + Object(Matching, "MSL_Common/extras.c"), Object(Matching, "MSL_Common_Embedded/Math/e_acos.c"), Object(Matching, "MSL_Common_Embedded/Math/e_asin.c"), diff --git a/libs/MSL/src/MSL_Common/extras.c b/libs/MSL/src/MSL_Common/extras.c new file mode 100644 index 00000000..0fbe9fab --- /dev/null +++ b/libs/MSL/src/MSL_Common/extras.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include + +extern int __msl_strnicmp(const char*, const char*, int); +extern char* __msl_itoa(int, char*, int); + +int stricmp(const char* s1, const char* s2) { + char c1, c2; + + while (true) { + c1 = tolower(*s1++); + c2 = tolower(*s2++); + + if (c1 < c2) { + return -1; + } + + if (c1 > c2) { + return 1; + } + + if (c1 == 0) { + return 0; + } + } +} + +int strnicmp(const char* s1, const char* s2, size_t n) { + return __msl_strnicmp(s1, s2, n); +} + +int strcmpi(const char* s1, const char* s2) { + return stricmp(s1, s2); +} + +char* itoa(int value, char* buffer, int radix) { + return __msl_itoa(value, buffer, radix); +} + +int wcsnicmp(const char* s1, const char* s2, size_t n) { + const wchar_t* p1 = (const wchar_t*)s1; + const wchar_t* p2 = (const wchar_t*)s2; + unsigned int c1; + unsigned int c2; + struct _loc_ctype_cmpt* ctype_cmpt = _current_locale.ctype_cmpt_ptr; + size_t i; + + for (i = 0; i < n; i++) { + c1 = *p1++; + c1 = (c1 >= 256) ? c1 : ctype_cmpt->wlower_map_ptr[(unsigned short)c1]; + c1 &= 0xFFFF; + + c2 = *p2++; + c2 = (c2 >= 256) ? c2 : ctype_cmpt->wlower_map_ptr[(unsigned short)c2]; + c2 &= 0xFFFF; + + if (c1 < c2) { + return -1; + } + + if (c1 > c2) { + return 1; + } + + if (c1 == 0) { + return 0; + } + } + + return 0; +} -- 2.49.1 From 6713cca2e3b649f33ca525e99cdbc7f50128cb18 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 03:06:52 -0500 Subject: [PATCH 3/4] Match MSL file position helpers (#167) --- configure.py | 2 +- libs/MSL/src/MSL_Common/FILE_POS.c | 112 +++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 libs/MSL/src/MSL_Common/FILE_POS.c diff --git a/configure.py b/configure.py index c4476d4d..0304e78c 100644 --- a/configure.py +++ b/configure.py @@ -1951,7 +1951,7 @@ config.libs = [ Object(Matching, "MSL_Common/buffer_io.c"), Object(Matching, "MSL_Common/direct_io.c", extra_cflags=["-Cpp_exceptions on"]), Object(NonMatching, "MSL_Common/file_io.c"), - Object(NonMatching, "MSL_Common/FILE_POS.c"), + Object(Matching, "MSL_Common/FILE_POS.c"), Object(Matching, "MSL_Common/mbstring.c"), Object(Matching, "MSL_Common/mem.c"), Object(Matching, "MSL_Common/mem_funcs.c"), diff --git a/libs/MSL/src/MSL_Common/FILE_POS.c b/libs/MSL/src/MSL_Common/FILE_POS.c new file mode 100644 index 00000000..4f791074 --- /dev/null +++ b/libs/MSL/src/MSL_Common/FILE_POS.c @@ -0,0 +1,112 @@ +#include +#include +#include + +enum file_kinds { + file_closed, + file_disk, + file_console, + file_unavailable +}; + +enum io_states { + neutral, + writing, + reading, + rereading +}; + +enum io_modes { + io_read = 1, + io_write = 2, + io_append = 4 +}; + +int __flush_buffer(FILE* file, size_t* pos); + +long _ftell(FILE* file) { + int buf = 0; + int pos; + + unsigned char file_kind = file->mode.file_kind; + if (!(file_kind == file_disk || file_kind == file_console) || file->state.error) { + errno = EFPOS; + return -1; + } + + if (file->state.io_state == neutral) { + return file->pos; + } + + pos = file->buffer_pos + (file->buffer_ptr - file->buffer); + + if (file->state.io_state >= rereading) { + buf = file->state.io_state - reading; + pos -= buf; + } + + if (!file->mode.binary_io) { + int n = file->buffer_ptr - file->buffer - buf; + unsigned char* p = file->buffer; + + while (n-- != 0) { + if (*p++ == '\n') { + pos++; + } + } + } + + return pos; +} + +long ftell(FILE* stream) { + return _ftell(stream); +} + +int _fseek(FILE* file, long offset, int whence) { + if (file->mode.file_kind != file_disk || file->state.error != 0) { + errno = EFPOS; + return -1; + } + + if (file->state.io_state == writing) { + if (__flush_buffer(file, 0) != 0) { + file->state.error = 1; + file->buffer_len = 0; + errno = EFPOS; + return -1; + } + } + + if (whence == 1) { + whence = 0; + offset += _ftell(file); + } + + if ((whence != 2) && file->mode.io_mode != (io_read | io_write) && (file->state.io_state == reading || file->state.io_state == rereading)) { + if ((offset >= file->pos) || offset < file->buffer_pos) { + file->state.io_state = neutral; + } else { + file->buffer_ptr = file->buffer + (offset - file->buffer_pos); + file->buffer_len = file->pos - offset; + file->state.io_state = reading; + } + } else { + file->state.io_state = neutral; + } + + if (file->state.io_state == neutral) { + if (file->pos_proc != 0 && (*file->pos_proc)(file->handle, &offset, whence, file->ref)) { + file->state.error = 1; + file->buffer_len = 0; + errno = EFPOS; + return -1; + } + + file->state.eof = 0; + file->pos = offset; + file->buffer_len = 0; + } + + return 0; +} -- 2.49.1 From 002e2e7e369f9111abddee759b12e6631d1172c3 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 03:07:33 -0500 Subject: [PATCH 4/4] Link matching NWC24 user ID unit (#168) --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 0304e78c..17ba02ed 100644 --- a/configure.py +++ b/configure.py @@ -1085,7 +1085,7 @@ config.libs = [ Object(NonMatching, "nwc24/NWC24DateParser.c"), Object(Matching, "nwc24/NWC24FriendList.c"), Object(Matching, "nwc24/NWC24SecretFList.c"), - Object(NonMatching, "nwc24/NWC24UserId.c"), + Object(Matching, "nwc24/NWC24UserId.c"), Object(Matching, "nwc24/NWC24Time.c"), Object(Matching, "nwc24/NWC24Ipc.c"), Object(NonMatching, "nwc24/NWC24Download.c"), -- 2.49.1