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

mbstrlen.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/sdk/crt/mbstring/mbstrlen.c
00005  * PURPOSE:      Determines the length of a multi byte string, current locale
00006  * PROGRAMERS:
00007  *              Copyright 1999 Alexandre Julliard
00008  *              Copyright 2000 Jon Griffths
00009  *
00010  */
00011 
00012 #include <mbstring.h>
00013 #include <stdlib.h>
00014 
00015 #ifdef _LIBCNT_
00016 unsigned short *NlsLeadByteInfo;
00017 #define isleadbyte(c) NlsLeadByteInfo[c]
00018 #else
00019 int isleadbyte(int byte);
00020 #endif
00021 
00022 /*
00023  * @implemented
00024  */
00025 size_t _mbstrlen( const char *str )
00026 {
00027   size_t len = 0;
00028   while(*str)
00029   {
00030     /* FIXME: According to the documentation we are supposed to test for
00031      * multi-byte character validity. Whatever that means
00032      */
00033     str += isleadbyte(*str) ? 2 : 1;
00034     len++;
00035   }
00036   return len;
00037 }

Generated on Sat May 26 2012 04:35:28 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.