diff --git a/src/apps/terminal/CodeConv.cpp b/src/apps/terminal/CodeConv.cpp index 619426a28a..27677bfbf4 100644 --- a/src/apps/terminal/CodeConv.cpp +++ b/src/apps/terminal/CodeConv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2005, Haiku, Inc. + * Copyright (c) 2001-2007, Haiku, Inc. * Copyright (c) 2003-4 Kian Duffy * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. * Distributed under the terms of the MIT license. @@ -30,7 +30,7 @@ UTF8 #define BEGINS_CHAR(byte) ((byte & 0xc0) >= 0x80) -extern char utf8_width_table[]; /* define UTF8WidthTbl.c */ +extern char gUTF8WidthTable[]; // defined in UTF8WidthTbl.c CodeConv::CodeConv() @@ -51,7 +51,7 @@ CodeConv::UTF8GetFontWidth(const char *string) ushort unicode, offset; offset = unicode = UTF8toUnicode(string); - width = utf8_width_table[unicode >> 3]; + width = gUTF8WidthTable[unicode >> 3]; offset = offset & 0x07; point = 0x80 >> offset; diff --git a/src/apps/terminal/UTF8WidthTbl.c b/src/apps/terminal/UTF8WidthTbl.c index b1c978645b..a404c68f10 100644 --- a/src/apps/terminal/UTF8WidthTbl.c +++ b/src/apps/terminal/UTF8WidthTbl.c @@ -1,4 +1,5 @@ /* + * Copyright 2007 Haiku, Inc. * Copyright (c) 2003-4 Kian Duffy * 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 + +uchar gUTF8WidthTable[] = { 0, 0, @@ -8224,5 +8228,7 @@ uchar utf8_width_table[] = 0, 0, 0, -} -; +}; + +#endif // __UTF8WIDTHTBL_H +