if ((nodeLen = nsCRT::strlen(aNode)) > 31)
if ((nodeLen = strlen(aNode)) > 31)
static const char* TruncNodeName(const char *aNode, char *outBuf){    PRUint32 nodeLen;    if ((nodeLen = nsCRT::strlen(aNode)) > 31)    {        static PRBool sInitialized = PR_FALSE;        static CharByteTable sTable;        // Init to "..." in case we fail to get the ellipsis token        static char sEllipsisTokenStr[4] = { '.', '.', '.', 0 };        static PRUint8 sEllipsisTokenLen = 3;                        if (!sInitialized)        {            // Entries in the table are:            // 0 == 1 byte char            // 1 == 2 byte char            FillParseTable(sTable, smSystemScript);                        Handle itl4ResHandle = nsnull;            long offset, len;            ::GetIntlResourceTable(smSystemScript, smUnTokenTable, &itl4ResHandle, &offset, &len);            if (itl4ResHandle)            {                UntokenTable *untokenTableRec = (UntokenTable *)(*itl4ResHandle + offset);                if (untokenTableRec->lastToken >= tokenEllipsis)                {                    offset += untokenTableRec->index[tokenEllipsis];                    char *tokenStr = (*itl4ResHandle + offset);                    sEllipsisTokenLen = tokenStr[0];                    memcpy(sEllipsisTokenStr, &tokenStr[1], sEllipsisTokenLen);                }                ::ReleaseResource(itl4ResHandle);            }            sInitialized = PR_TRUE;        }        PRInt32 halfLen = (31 - sEllipsisTokenLen) / 2;        PRInt32 charSize = 0, srcPos, destPos;        for (srcPos = 0; srcPos + charSize <= halfLen; srcPos += charSize)            charSize = sTable[aNode[srcPos]] ? 2 : 1;                            memcpy(outBuf, aNode, srcPos);        memcpy(outBuf + srcPos, sEllipsisTokenStr, sEllipsisTokenLen);        destPos = srcPos + sEllipsisTokenLen;                for (; srcPos <= nodeLen - halfLen; srcPos += charSize)            charSize = sTable[aNode[srcPos]] ? 2 : 1;                    memcpy(outBuf + destPos, aNode + srcPos, nodeLen - srcPos);        destPos += (nodeLen - srcPos);        outBuf[destPos] = '\0';        return outBuf;    }    return aNode;}