Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenismblead.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/ismblead.c 00005 * PURPOSE: Checks for a leading byte 00006 * PROGRAMERS: 00007 * Copyright 1999 Ariadne, Taiji Yamada 00008 * Copyright 1999 Alexandre Julliard 00009 * Copyright 2000 Jon Griffths 00010 * Copyright 2008 Samuel Serapion adapted from PROJECT C Library 00011 * 00012 */ 00013 00014 #include <precomp.h> 00015 #include <mbctype.h> 00016 00017 /* 00018 * @implemented 00019 */ 00020 int _ismbblead(unsigned int c) 00021 { 00022 return (_mbctype[(c&0xff) + 1] & _M1) != 0; 00023 } 00024 00025 /* 00026 * @implemented 00027 */ 00028 int _ismbslead( const unsigned char *start, const unsigned char *str) 00029 { 00030 int lead = 0; 00031 00032 /* Lead bytes can also be trail bytes so we need to analyse the string 00033 */ 00034 while (start <= str) 00035 { 00036 if (!*start) 00037 return 0; 00038 lead = !lead && _ismbblead(*start); 00039 start++; 00040 } 00041 00042 return lead ? -1 : 0; 00043 } 00044 00045 /* 00046 * @implemented 00047 */ 00048 unsigned char *__p__mbctype(void) 00049 { 00050 return _mbctype; 00051 } 00052 00053 Generated on Sun May 27 2012 04:36:29 for ReactOS by
1.7.6.1
|