update for HEAD-2003091401
[reactos.git] / lib / string / tcsncmp.h
1 /* $Id$
2  */
3
4 #include <stddef.h>
5 #include <tchar.h>
6
7 int _tcsncmp(const _TCHAR * s1, const _TCHAR * s2, size_t n)
8 {
9  if(n == 0) return 0;
10
11  do
12  {
13   if(*s1 != *s2 ++) return *s1 - *-- s2;
14   if(*s1 ++ == 0) break;
15  }
16  while (-- n != 0);
17
18  return 0;
19 }
20
21 /* EOF */