Removed BGA's uint32 utf8_char_len(uchar c)
function from this public header, since it's not safe, and it's slower than parsing bytes one by one. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -64,15 +64,6 @@ _IMPEXP_TEXTENCODING status_t convert_from_utf8(uint32 dstEncoding,
|
||||
int32 *state,
|
||||
char substitute = B_SUBSTITUTE);
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*------- Utility Functions -----------------------------------*/
|
||||
|
||||
// Suggested by BGA
|
||||
inline uint32 utf8_char_len(uchar c)
|
||||
{
|
||||
return (((0xE5000000 >> (((c) >> 3) & 0x1E)) & 3) + 1);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user