strcmp.c 306 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include <PR/os.h> #include "common.h" /* * Extra stdlib function not supplied by libultra */ int strcmp(const u8 *s, const u8 *t) { while (*s && *t && (*s == *t)) { ++s; ++t; } if (*s < *t) return -1; if (*s > *t) return 1; else return 0; }