Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsUnicodeRange.cpp File Reference
#include "nsUnicodeRange.h"

Go to the source code of this file.


#define NUM_OF_SUBTABLES   9
#define SUBTABLE_SIZE   16
#define TERTIARY_TABLE_SIZE   ((0x1700 - 0x0700) / 0x80)


PRUint32 FindCharUnicodeRange (PRUnichar ch)


const char * gUnicodeRangeToLangGroupTable []
static PRUint8 gUnicodeSubrangeTable [NUM_OF_SUBTABLES][SUBTABLE_SIZE]
static PRUint8 gUnicodeTertiaryRangeTable [TERTIARY_TABLE_SIZE]

Define Documentation

Definition at line 209 of file nsUnicodeRange.cpp.

Definition at line 210 of file nsUnicodeRange.cpp.

#define TERTIARY_TABLE_SIZE   ((0x1700 - 0x0700) / 0x80)

Definition at line 386 of file nsUnicodeRange.cpp.

Function Documentation

Definition at line 432 of file nsUnicodeRange.cpp.

  PRUint32 range;

  //search the first table
  range = gUnicodeSubrangeTable[0][ch >> 12];
  if (range < kRangeTableBase)
    // we try to get a specific range 
    return range;

  // otherwise, we have one more table to look at
  range = gUnicodeSubrangeTable[range - kRangeTableBase][(ch & 0x0f00) >> 8];
  if (range < kRangeTableBase)
    return range;
  if (range < kRangeTertiaryTable)
    return gUnicodeSubrangeTable[range - kRangeTableBase][(ch & 0x00f0) >> 4];

  // Yet another table to look at : U+0700 - U+16FF : 128 code point blocks
  return gUnicodeTertiaryRangeTable[(ch - 0x0700) >> 7];

Here is the caller graph for this function:

Variable Documentation

Initial value:

Definition at line 43 of file nsUnicodeRange.cpp.

Definition at line 212 of file nsUnicodeRange.cpp.

Definition at line 388 of file nsUnicodeRange.cpp.