PRUint16 endC = endCode[i]; for (PRUint32 c = startCode[i]; c <= endC; c++)
PRUint16 endC = CFSwapInt16BigToHost(endCode[i]); for (PRUint32 c = CFSwapInt16BigToHost(startCode[i]); c <= endC; c++)
static void HandleFormat4(PRUint16* aEntry, PRUint8* aEnd,                             PRUint8* aIsSpace,  PRUint32 aMaxGlyph,                            PRUint32* aFontInfo){  // notice aIsSpace could be nsnull in case of OpenType font  PRUint8* end = aEnd;    PRUint16* s = aEntry;  PRUint16 segCount = s[3] / 2;  PRUint16* endCode = &s[7];  PRUint16* startCode = endCode + segCount + 1;  PRUint16* idDelta = startCode + segCount;  PRUint16* idRangeOffset = idDelta + segCount;  PRUint16* glyphIdArray = idRangeOffset + segCount;  PRUint16 i;  InitSpace();    for (i = 0; i < segCount; i++)   {    if (idRangeOffset[i])     {      PRUint16 startC = startCode[i];      PRUint16 endC = endCode[i];      for (PRUint32 c = startC; c <= endC; c++)       {        PRUint16* g = (idRangeOffset[i]/2 + (c - startC) + &idRangeOffset[i]);        if ((PRUint8*) g < end)         {          if (*g)           {            PRUint16 glyph = idDelta[i] + *g;            if (glyph < aMaxGlyph)             {              if (aIsSpace && aIsSpace[glyph])               {                if (SHOULD_BE_SPACE(c))                   ADD_GLYPH(aFontInfo, c);              }              else               {                ADD_GLYPH(aFontInfo, c);              }            }          }        }        else         {          // XXX should we trust this font at all if it does this?        }      }    }    else     {      PRUint16 endC = endCode[i];      for (PRUint32 c = startCode[i]; c <= endC; c++)       {        PRUint16 glyph = idDelta[i] + c;        if (glyph < aMaxGlyph)         {          if (aIsSpace && aIsSpace[glyph])           {            if (SHOULD_BE_SPACE(c))               ADD_GLYPH(aFontInfo, c);          }          else           {            ADD_GLYPH(aFontInfo, c);          }        }      }    }  }}