platform/os2.c
changeset 596 381b6ca0dd85
parent 504 3420d82f9b01
child 599 44af228dd59a
--- a/platform/os2.c	Sat Sep 13 02:30:55 2003 +0000
+++ b/platform/os2.c	Sun Nov 09 20:59:07 2003 +0000
@@ -340,6 +340,30 @@
 } /* __PHYSFS_platformStricmp */
 
 
+int __PHYSFS_platformStrnicmp(const char *x, const char *y, PHYSFS_uint32 len)
+{
+    int ux, uy;
+
+    if (!len)
+        return(0);
+
+    do
+    {
+        ux = toupper((int) *x);
+        uy = toupper((int) *y);
+        if (ux > uy)
+            return(1);
+        else if (ux < uy)
+            return(-1);
+        x++;
+        y++;
+        len--;
+    } while ((ux) && (uy) && (len));
+
+    return(0);
+} /* __PHYSFS_platformStrnicmp */
+
+
 int __PHYSFS_platformExists(const char *fname)
 {
     FILESTATUS3 fs;