Files
bigmak94andClaude Opus 5.5 4b395efe5c Add the Petari decompilation (SMGCommunity/Petari@0a5c660)
The sources of Petari (https://github.com/SMGCommunity/Petari), the
Super Mario Galaxy decompilation by the SMGCommunity, at commit
0a5c6608dc3b4c44a9aa68c2535d1793dc565f02, unchanged but for LF line
endings: LICENSE (as LICENSE-Petari.txt; CC0 1.0), include/, libs/ and
src/.  Left out: the game data Petari keeps from the original
executable, the error message archive (include/Game/System/
ErrorArchive.hpp) and two tables (src/Game/System/GalaxyID.bcsv and
StoryEvent.bcsv); GalaxyQuest's converter takes them from the player's
own disc.  The port's changes follow in the next commit, so
`git diff petari-base -- decomp` shows them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:59:38 +02:00

36 lines
710 B
C

#include "file_io.h"
#include "locale.h"
#include "size_t.h"
inline int tolower_inline(int c) {
return ((c < 0) || (c >= 0x100)) ? c : (int) (_current_locale.ctype_cmpt_ptr->lower_map_ptr[c]);
}
int stricmp(const char *s1, const char *s2) {
char c1, c2;
while (1) {
c1 = tolower_inline(*s1++);
c2 = tolower_inline(*s2++);
if (c1 < c2) {
return -1;
}
if (c1 > c2) {
return 1;
}
if (c1 == 0) {
return 0;
}
}
}
int strncasecmp(const char *s1, const char *s2, size_t n) {
return __msl_strnicmp(s1, s2, n);
}
int strcasecmp(const char *s1, const char *s2) {
return stricmp(s1, s2);
}