platform/win32.c
changeset 596 381b6ca0dd85
parent 568 58a750d64f91
child 606 70cf47819dd2
equal deleted inserted replaced
595:67aff4091bf1 596:381b6ca0dd85
   360         else if (ux < uy)
   360         else if (ux < uy)
   361             return(-1);
   361             return(-1);
   362         x++;
   362         x++;
   363         y++;
   363         y++;
   364     } while ((ux) && (uy));
   364     } while ((ux) && (uy));
       
   365 
       
   366     return(0);
       
   367 #endif
       
   368 } /* __PHYSFS_platformStricmp */
       
   369 
       
   370 
       
   371 int __PHYSFS_platformStrnicmp(const char *x, const char *y, PHYSFS_uint32 len)
       
   372 {
       
   373 #if (defined _MSC_VER)
       
   374     return(strnicmp(x, y, (int) len));
       
   375 #else
       
   376     int ux, uy;
       
   377 
       
   378     if (!len)
       
   379         return(0);
       
   380 
       
   381     do
       
   382     {
       
   383         ux = toupper((int) *x);
       
   384         uy = toupper((int) *y);
       
   385         if (ux > uy)
       
   386             return(1);
       
   387         else if (ux < uy)
       
   388             return(-1);
       
   389         x++;
       
   390         y++;
       
   391         len--;
       
   392     } while ((ux) && (uy) && (len));
   365 
   393 
   366     return(0);
   394     return(0);
   367 #endif
   395 #endif
   368 } /* __PHYSFS_platformStricmp */
   396 } /* __PHYSFS_platformStricmp */
   369 
   397