+++ /dev/null
-/* Cross platform case insensitive string compare functions\r
- */\r
-\r
-#include "Python.h"\r
-\r
-int\r
-PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size)\r
-{\r
- if (size == 0)\r
- return 0;\r
- while ((--size > 0) &&\r
- (tolower((unsigned)*s1) == tolower((unsigned)*s2))) {\r
- if (!*s1++ || !*s2++)\r
- break;\r
- }\r
- return tolower((unsigned)*s1) - tolower((unsigned)*s2);\r
-}\r
-\r
-int\r
-PyOS_mystricmp(const char *s1, const char *s2)\r
-{\r
- while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) {\r
- ;\r
- }\r
- return (tolower((unsigned)*s1) - tolower((unsigned)*s2));\r
-}\r