if (value->m_obj) value->m_obj->dontShowAsAttachment = PR_TRUE;
flush_tag(MimeMultipartRelated* relobj){  int length = relobj->curtag_length;  char* buf;  int status;    if (relobj->curtag == NULL || length == 0) return 0;  status = push_tag(relobj, "", 1); /* Push on a trailing NULL. */  if (status < 0) return status;  buf = relobj->curtag;  PR_ASSERT(*buf == '<' && buf[length - 1] == '>');  while (*buf) {    char c;    char* absolute;    char* part_url;    char* ptr = buf;    char *ptr2;    PRBool isquote = PR_FALSE;    while (*ptr && *ptr != '=') ptr++;    if (*ptr == '=') {      ptr++;      if (*ptr == '"') {        isquote = PR_TRUE;        /* Take up the double quote and leading space here as well. */        /* Safe because there's a '>' at the end */        do {ptr++;} while (nsCRT::IsAsciiSpace(*ptr));      }    }    status = real_write(relobj, buf, ptr - buf);    if (status < 0) return status;    buf = ptr;    if (!*buf) break;    if (isquote)     {      ptr = mime_strnchr(buf, '"', length - (buf - relobj->curtag));    } else {      for (ptr = buf; *ptr ; ptr++) {        if (*ptr == '>' || nsCRT::IsAsciiSpace(*ptr)) break;      }      PR_ASSERT(*ptr);    }    if (!ptr || !*ptr) break;    while(buf < ptr)    {      /* ### mwelch For each word in the value string, see if                      the word is a cid: URL. If so, attempt to              substitute the appropriate mailbox part URL in              its place. */      ptr2=buf; /* walk from the left end rightward */      while((ptr2<ptr) && (!nsCRT::IsAsciiSpace(*ptr2)))        ptr2++;      /* Compare the beginning of the word with "cid:". Yuck. */      if (((ptr2 - buf) > 4) &&         (buf[0]=='c' && buf[1]=='i' && buf[2]=='d' && buf[3]==':'))      {        /* Null terminate the word so we can... */        c = *ptr2;        *ptr2 = '\0';                /* Construct a URL out of the word. */        absolute = MakeAbsoluteURL(relobj->base_url, buf);        /* See if we have a mailbox part URL           corresponding to this cid. */        part_url = NULL;        if (absolute)        {          part_url = (char *)PL_HashTableLookup(relobj->hash, buf);          PR_FREEIF(absolute);        }                /*If we found a mailbox part URL, write that out instead.*/        if (part_url)        {          status = real_write(relobj, part_url, strlen(part_url));          if (status < 0) return status;          buf = ptr2; /* skip over the cid: URL we substituted */        }                /* Restore the character that we nulled. */        *ptr2 = c;      }      /* rhp - if we get here, we should still check against the hash table! */      else       {        char holder = *ptr2;        char *realout;        *ptr2 = '\0';            /* Construct a URL out of the word. */        absolute = MakeAbsoluteURL(relobj->base_url, buf);        /* See if we have a mailbox part URL           corresponding to this cid. */        if (absolute)          realout = (char *)PL_HashTableLookup(relobj->hash, absolute);        else          realout = (char *)PL_HashTableLookup(relobj->hash, buf);        *ptr2 = holder;        PR_FREEIF(absolute);        if (realout)        {          status = real_write(relobj, realout, strlen(realout));          if (status < 0) return status;          buf = ptr2; /* skip over the cid: URL we substituted */        }      }      /* rhp - if we get here, we should still check against the hash table! */      /* Advance to the beginning of the next word, or to         the end of the value string. */      while((ptr2<ptr) && (nsCRT::IsAsciiSpace(*ptr2)))        ptr2++;      /* Write whatever original text remains after         cid: URL substitution. */      status = real_write(relobj, buf, ptr2-buf);      if (status < 0) return status;      buf = ptr2;    }  }  if (buf && *buf) {    status = real_write(relobj, buf, strlen(buf));    if (status < 0) return status;  }  relobj->curtag_length = 0;  return 0;}