mirror of
https://github.com/zeldaret/oot
synced 2026-08-21 22:40:55 -04:00
7aa9808b7e
* Update spec for iQue * Use CPP includes for spec overlays, scenes, and libultra * Fix iQue + DEBUG_FEATURES * Define BBPLAYER, merge function definitions * Add Makefile dependency on spec_includes * Fix libc order for iQue * Match src/libultra/bb/sa/common.c to fix linker errors * Use C versions of getcount/setcompare for iQue * Format * Small fixes to line up boot segment * Remove zlib.c
43 lines
692 B
C
43 lines
692 B
C
#include "libc/stddef.h"
|
|
|
|
int strcmp(const char* s, const char* t) {
|
|
while (*s == *t) {
|
|
if (*s == '\0') {
|
|
return 0;
|
|
}
|
|
s++;
|
|
t++;
|
|
}
|
|
|
|
return *s - *t;
|
|
}
|
|
|
|
void* memset(char* s, int c, size_t n) {
|
|
size_t i;
|
|
|
|
for (i = 0; i < n; i++) {
|
|
s[i] = c;
|
|
}
|
|
|
|
return s;
|
|
}
|
|
|
|
int strncmp(const char* s, const char* t, int n) {
|
|
int i;
|
|
|
|
for (i = 0; (*s == *t) && (i < n); i++) {
|
|
if (*s == '\0') {
|
|
if (*t == '\0') {
|
|
return 0;
|
|
}
|
|
break;
|
|
}
|
|
if (*t == '\0') {
|
|
break;
|
|
}
|
|
s++;
|
|
t++;
|
|
}
|
|
return (i != n) ? *s - *t : 0;
|
|
}
|