MCPcopy Create free account
hub / github.com/NetHack/NetHack / case_insensitive_comp

Function case_insensitive_comp

src/hacklib.c:921–937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921int
922case_insensitive_comp(const char *s1, const char *s2)
923{
924 uchar u1, u2;
925
926 for (;; s1++, s2++) {
927 u1 = (uchar) *s1;
928 if (isupper(u1))
929 u1 = (uchar) tolower(u1);
930 u2 = (uchar) *s2;
931 if (isupper(u2))
932 u2 = (uchar) tolower(u2);
933 if (u1 == '\0' || u1 != u2)
934 break;
935 }
936 return u1 - u2;
937}
938
939#if defined(MACOS)
940#define RETTYPE ssize_t

Callers 3

populate_nomakedefsFunction · 0.85
get_gitinfoFunction · 0.85

Calls 1

isupperFunction · 0.85

Tested by

no test coverage detected