Make Bidi symmetric swapping handle characters outside BMP. Bug 122800, r=mkaply, sr=darin

git-svn-id: svn://10.0.0.236/trunk@228964 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
smontagu%netscape.com
2007-06-28 20:03:08 +00:00
parent e34ac1d796
commit 90aadc569b
2 changed files with 4 additions and 4 deletions

View File

@@ -100,8 +100,8 @@ foreach $block (0 .. 0xff) {
}
# Generate conversion method
print OUT "\nstatic PRUnichar Mirrored(PRUnichar u)\n{\n";
print OUT " switch (u & 0xFF00) {\n";
print OUT "\nstatic PRUint32 Mirrored(PRUint32 u)\n{\n";
print OUT " switch (u & 0xFFFFFF00) {\n";
print OUT " // XOR the character with the bitmap in the conversion table to give the symmetric equivalent\n";
foreach $block (0 .. 0xff) {
if (1==@isblock[$block]) {

View File

@@ -127,9 +127,9 @@ const static PRUint8 symmtable_30[256] = {
/* F_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static PRUnichar Mirrored(PRUnichar u)
static PRUint32 Mirrored(PRUint32 u)
{
switch (u & 0xFF00) {
switch (u & 0xFFFFFF00) {
// XOR the character with the bitmap in the conversion table to give the symmetric equivalent
case 0:
u ^= symmtable_00[u & 0xff];