2007-03-14 20:24:57 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS system libraries
|
2008-12-18 18:58:43 +00:00
|
|
|
* FILE: lib/sdk/crt/mbstring/ismbtrl.c
|
2007-03-14 20:24:57 +00:00
|
|
|
* PURPOSE: Checks for a trailing byte
|
2008-12-18 18:58:43 +00:00
|
|
|
* PROGRAMERS:
|
|
|
|
* Copyright 1999 Ariadne
|
|
|
|
* Copyright 1999 Alexandre Julliard
|
|
|
|
* Copyright 2000 Jon Griffths
|
|
|
|
*
|
2007-03-14 20:24:57 +00:00
|
|
|
*/
|
|
|
|
|
2008-06-06 17:49:24 +00:00
|
|
|
#include <precomp.h>
|
2008-12-18 18:58:43 +00:00
|
|
|
#include <mbctype.h>
|
2007-03-14 20:24:57 +00:00
|
|
|
|
|
|
|
size_t _mbclen2(const unsigned int s);
|
|
|
|
|
|
|
|
// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
int _ismbbtrail(unsigned int c)
|
|
|
|
{
|
2012-12-09 11:42:02 +00:00
|
|
|
return (get_mbcinfo()->mbctype[(c&0xff) + 1] & _M2) != 0;
|
2007-03-14 20:24:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2008-12-18 18:58:43 +00:00
|
|
|
int _ismbstrail( const unsigned char *start, const unsigned char *str)
|
2007-03-14 20:24:57 +00:00
|
|
|
{
|
2008-12-18 18:58:43 +00:00
|
|
|
/* Note: this function doesn't check _ismbbtrail */
|
|
|
|
if ((str > start) && _ismbslead(start, str-1))
|
|
|
|
return -1;
|
|
|
|
else
|
|
|
|
return 0;
|
2007-03-14 20:24:57 +00:00
|
|
|
}
|