update for HEAD-2003091401
[reactos.git] / lib / msvcrt / string / stricmp.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/string.h>
3 #include <msvcrt/ctype.h>
4
5 /*
6  * @implemented
7  */
8 int
9 _stricmp(const char *s1, const char *s2)
10 {
11   while (toupper(*s1) == toupper(*s2))
12   {
13     if (*s1 == 0)
14       return 0;
15     s1++;
16     s2++;
17   }
18   return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2));
19 }
20
21 /*
22  * @implemented
23  */
24 int
25 _strcmpi(const char *s1, const char *s2)
26 {
27         return _stricmp(s1,s2);
28 }