mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Convert to unicode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15728 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8d9df8bce5
commit
8b7cc1b498
@ -213,11 +213,19 @@ enum CatCode {
|
||||
catInvalid // 15 <delete>
|
||||
};
|
||||
|
||||
CatCode theCatcode[256];
|
||||
CatCode theCatcode[128];
|
||||
|
||||
|
||||
inline CatCode catcode(unsigned char c)
|
||||
inline CatCode catcode(lyx::char_type c)
|
||||
{
|
||||
/* The fact that we use unicode internally does not change Knuth's TeX
|
||||
engine. It is still 7bit only, not even latin1 or something like that.
|
||||
Therefore, the catcode table needs only to have 128 entries.
|
||||
Everything not in that range is catOther.
|
||||
*/
|
||||
if (c >= 128)
|
||||
return catOther;
|
||||
|
||||
return theCatcode[c];
|
||||
}
|
||||
|
||||
@ -1448,7 +1456,7 @@ void mathed_parse_normal(InsetMathGrid & grid, string const & str)
|
||||
|
||||
void initParser()
|
||||
{
|
||||
fill(theCatcode, theCatcode + 256, catOther);
|
||||
fill(theCatcode, theCatcode + 128, catOther);
|
||||
fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter);
|
||||
fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user