Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmbsicoll.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS system libraries 00004 * FILE: lib/msvcrt/mbstring/mbsicoll.c 00005 * PURPOSE: 00006 * PROGRAMER: Ariadne 00007 * UPDATE HISTORY: 00008 * 12/04/99: Created 00009 */ 00010 #include <mbstring.h> 00011 #include <mbctype.h> 00012 #include <ctype.h> 00013 00014 int colldif(unsigned short c1, unsigned short c2); 00015 /* 00016 * @implemented 00017 */ 00018 int _mbsicoll(const unsigned char *str1, const unsigned char *str2) 00019 { 00020 unsigned char *s1 = (unsigned char *)str1; 00021 unsigned char *s2 = (unsigned char *)str2; 00022 00023 unsigned short *short_s1, *short_s2; 00024 00025 int l1, l2; 00026 00027 while ( *s1 != 0 ) { 00028 00029 if (*s1 == 0) 00030 break; 00031 00032 l1 = _ismbblead(*s1); 00033 l2 = _ismbblead(*s2); 00034 if ( !l1 && !l2 ) { 00035 00036 if (toupper(*s1) != toupper(*s2)) 00037 return colldif(*s1, *s2); 00038 else { 00039 s1 += 1; 00040 s2 += 1; 00041 } 00042 } 00043 else if ( l1 && l2 ){ 00044 short_s1 = (unsigned short *)s1; 00045 short_s2 = (unsigned short *)s2; 00046 if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) 00047 return colldif(*short_s1, *short_s2); 00048 else { 00049 s1 += 2; 00050 s2 += 2; 00051 00052 } 00053 } 00054 else 00055 return colldif(*s1, *s2); 00056 } ; 00057 return 0; 00058 } Generated on Sat May 26 2012 04:35:27 for ReactOS by
1.7.6.1
|