Renamed a variable to fit our guidelines. Removed typedef
from UTF8WidthTbl.c. Use typedef from SupportDefs.h instead git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21632 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2005, Haiku, Inc.
|
* Copyright (c) 2001-2007, Haiku, Inc.
|
||||||
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
||||||
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
@@ -30,7 +30,7 @@ UTF8
|
|||||||
#define BEGINS_CHAR(byte) ((byte & 0xc0) >= 0x80)
|
#define BEGINS_CHAR(byte) ((byte & 0xc0) >= 0x80)
|
||||||
|
|
||||||
|
|
||||||
extern char utf8_width_table[]; /* define UTF8WidthTbl.c */
|
extern char gUTF8WidthTable[]; // defined in UTF8WidthTbl.c
|
||||||
|
|
||||||
|
|
||||||
CodeConv::CodeConv()
|
CodeConv::CodeConv()
|
||||||
@@ -51,7 +51,7 @@ CodeConv::UTF8GetFontWidth(const char *string)
|
|||||||
ushort unicode, offset;
|
ushort unicode, offset;
|
||||||
|
|
||||||
offset = unicode = UTF8toUnicode(string);
|
offset = unicode = UTF8toUnicode(string);
|
||||||
width = utf8_width_table[unicode >> 3];
|
width = gUTF8WidthTable[unicode >> 3];
|
||||||
offset = offset & 0x07;
|
offset = offset & 0x07;
|
||||||
|
|
||||||
point = 0x80 >> offset;
|
point = 0x80 >> offset;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright 2007 Haiku, Inc.
|
||||||
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
||||||
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
||||||
*
|
*
|
||||||
@@ -28,9 +29,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned char uchar;
|
#ifndef __UTF8WIDTHTBL_H
|
||||||
|
#define __UTF8WIDTHTBL_H
|
||||||
|
|
||||||
uchar utf8_width_table[] =
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
uchar gUTF8WidthTable[] =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -8224,5 +8228,7 @@ uchar utf8_width_table[] =
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
}
|
};
|
||||||
;
|
|
||||||
|
#endif // __UTF8WIDTHTBL_H
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user