update for HEAD-2003021201
[reactos.git] / lib / msvcrt / string / strcmp.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/string.h>
3
4 #pragma function(strcmp)
5
6 int strcmp(const char* s1, const char* s2)
7 {
8   while (*s1 == *s2)
9   {
10     if (*s1 == 0)
11       return 0;
12     s1++;
13     s2++;
14   }
15   return *(unsigned const char*)s1 - *(unsigned const char*)(s2);
16 }