length = PL_strlen(tmp2);
length = nsCRT::strlen(tmp2);
MimeMultipartRelated_output_child_p(MimeObject *obj, MimeObject* child){	MimeMultipartRelated *relobj = (MimeMultipartRelated *) obj;  /* rhp - Changed from "if (relobj->head_loaded)" alone to support the            start parameter   */  if (       (relobj->head_loaded) ||        (MimeStartParamExists(obj, child) && !MimeThisIsStartPart(obj, child))      )  {		/* This is a child part.  Just remember the mapping between the URL		   it represents and the part-URL to get it back. */		char* location = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION,										 PR_FALSE, PR_FALSE);    if (!location) {			char* tmp = MimeHeaders_get(child->headers, HEADER_CONTENT_ID,										PR_FALSE, PR_FALSE);			if (tmp) {				char* tmp2 = tmp;				if (*tmp2 == '<') {					int length;					tmp2++;					length = PL_strlen(tmp2);					if (length > 0 && tmp2[length - 1] == '>') {						tmp2[length - 1] = '\0';					}				}				location = PR_smprintf("cid:%s", tmp2);				PR_Free(tmp);			}    } 		if (location) {      char *absolute;			char *base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_BASE,											 PR_FALSE, PR_FALSE);      /* rhp: need this for supporting Content-Location */      if (!base_url)      {        base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION, PR_FALSE, PR_FALSE);      }      /* rhp: need this for supporting Content-Location */      absolute = MakeAbsoluteURL(base_url ? base_url : relobj->base_url, location);			PR_FREEIF(base_url);			PR_Free(location);			if (absolute) {				char* partnum = mime_part_address(child);				if (partnum) {					char* part;					part = mime_set_url_part(obj->options->url, partnum,											 PR_FALSE);					if (part) {					    /* If there's a space in the url, escape the url.						   (This happens primarily on Windows and Unix.) */					    char *temp = part;					    if (PL_strchr(part, ' ') || PL_strchr(part, '>') || PL_strchr(part, '%'))						  temp = escape_for_mrel_subst(part);            PL_HashTableAdd(relobj->hash, absolute, temp);            /* rhp - If this part ALSO has a Content-ID we need to put that into                     the hash table and this is what this code does             */            {              char *tloc;              char *tmp = MimeHeaders_get(child->headers, HEADER_CONTENT_ID, PR_FALSE, PR_FALSE);              if (tmp)               {                char* tmp2 = tmp;                if (*tmp2 == '<')                 {                  int length;                  tmp2++;                  length = PL_strlen(tmp2);                  if (length > 0 && tmp2[length - 1] == '>')                   {                    tmp2[length - 1] = '\0';                  }                }                                tloc = PR_smprintf("cid:%s", tmp2);                PR_Free(tmp);                if (tloc)                {                  PL_HashTableAdd(relobj->hash, tloc, PL_strdup(temp));                }              }            }            /*  rhp - End of putting more stuff into the hash table */						/* The value string that is added to the hashtable will be deleted						   by the hashtable at destruction time. So if we created an						   escaped string for the hashtable, we have to delete the						   part URL that was given to us. */						if (temp != part) PR_Free(part);					}					PR_Free(partnum);				}			}		}	} else {		/* Ah-hah!  We're the head object.  */		char* base_url;		relobj->head_loaded = PR_TRUE;		relobj->headobj = child;		relobj->buffered_hdrs = MimeHeaders_copy(child->headers);		base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_BASE,								   PR_FALSE, PR_FALSE);    /* rhp: need this for supporting Content-Location */    if (!base_url)    {      base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION, PR_FALSE, PR_FALSE);    }    /* rhp: need this for supporting Content-Location */		if (base_url) {			/* If the head object has a base_url associated with it, use			   that instead of any base_url that may have been associated			   with the multipart/related. */			PR_FREEIF(relobj->base_url);			relobj->base_url = base_url;		}	}	if (obj->options && !obj->options->write_html_p#ifdef MIME_DRAFTS		&& !obj->options->decompose_file_p#endif /* MIME_DRAFTS */		)	  {		return PR_TRUE;	  }	return PR_FALSE;			/* Don't actually parse this child; we'll handle							   all that at eof time. */}