ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mbsnicmp.c
Go to the documentation of this file.
00001 #include <mbstring.h>
00002 
00003 
00004 size_t _mbclen2(const unsigned int s);
00005 unsigned int _mbbtoupper(unsigned int c);
00006 
00007 
00008 /*
00009  * @implemented
00010  */
00011 int _mbsnicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
00012 {
00013   if (n == 0)
00014     return 0;
00015   do {
00016     if (_mbbtoupper(*s1) != _mbbtoupper(*s2))
00017       return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2);
00018     s1 += _mbclen2(*s1);
00019     s2 += _mbclen2(*s2);
00020 
00021     if (*s1 == 0)
00022       break;
00023     if (!_ismbblead(*s1))
00024       n--;
00025   } while (n > 0);
00026   return 0;
00027 }
00028 
00029 /*
00030  * @implemented
00031  */
00032 int _mbsnbicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
00033 {
00034   if (n == 0)
00035     return 0;
00036   do {
00037     if (_mbbtoupper(*s1) != _mbbtoupper(*s2))
00038       return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2);
00039     s1 += _mbclen2(*s1);
00040     s2 += _mbclen2(*s2);
00041 
00042     if (*s1 == 0)
00043       break;
00044     n--;
00045   } while (n > 0);
00046   return 0;
00047 }

Generated on Sun May 27 2012 04:36:29 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.