if (mask == url_XPAlphas)
if (flags == url_XPAlphas)
static char* nsEscapeCount(    const char * str,    PRInt32 len,    nsEscapeMask mask,    PRInt32* out_len)//----------------------------------------------------------------------------------------{	if (!str)		return 0;    int i, extra = 0;    static const char hexChars[] = "0123456789ABCDEF";	register const unsigned char* src = (const unsigned char *) str;    for (i = 0; i < len; i++)	{        if (!IS_OK(*src++))            extra += 2; /* the escape, plus an extra byte for each nibble */	}	char* result = (char *)nsMemory::Alloc(len + extra + 1);    if (!result)        return 0;    register unsigned char* dst = (unsigned char *) result;	src = (const unsigned char *) str;	if (mask == url_XPAlphas)	{	    for (i = 0; i < len; i++)		{			unsigned char c = *src++;			if (IS_OK(c))				*dst++ = c;			else if (c == ' ')				*dst++ = '+'; /* convert spaces to pluses */			else 			{				*dst++ = HEX_ESCAPE;				*dst++ = hexChars[c >> 4];	/* high nibble */				*dst++ = hexChars[c & 0x0f];	/* low nibble */			}		}	}	else	{	    for (i = 0; i < len; i++)		{			unsigned char c = *src++;			if (IS_OK(c))				*dst++ = c;			else 			{				*dst++ = HEX_ESCAPE;				*dst++ = hexChars[c >> 4];	/* high nibble */				*dst++ = hexChars[c & 0x0f];	/* low nibble */			}		}	}    *dst = '\0';     /* tack on eos */	if(out_len)		*out_len = dst - (unsigned char *) result;    return result;}