rv = conv->ScanTXT(strline.GetUnicode(), obj->options->whattodo, &wresult);
PRBool whattodo = obj->options->whattodo; if ( obj->options && ( obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting || obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting ) ) whattodo = 0;  rv = conv->ScanTXT(strline.GetUnicode(), whattodo, &wresult);
MimeInlineTextPlain_parse_line (char *line, PRInt32 length, MimeObject *obj){  // this routine gets called for every line of data that comes through the mime  // converter. It's important to make sure we are efficient with   // how we allocate memory in this routine. be careful if you go to add  // more to this routine.  int status;  NS_ASSERTION(length > 0, "zero length");  if (length <= 0) return 0;  PRInt32 buffersizeneeded = (length * 2);  // Ok, there is always the issue of guessing how much space we will need for emoticons.  // So what we will do is count the total number of "special" chars and multiply by 82   // (max len for a smiley line) and add one for good measure  PRInt32   specialCharCount = 0;  for (PRInt32 z=0; z<length; z++)  {    if ( (line[z] == ')') || (line[z] == '(') || (line[z] == ':') || (line[z] == ';') )      ++specialCharCount;  }  buffersizeneeded += 82 * (specialCharCount + 1);   status = MimeObject_grow_obuffer (obj, buffersizeneeded);  if (status < 0) return status;  /* Copy `line' to `out', quoting HTML along the way.	 Note: this function does no charset conversion; that has already	 been done.   */  *obj->obuffer = 0;  mozITXTToHTMLConv *conv = GetTextConverter(obj->options);  // If we have been told not to mess with this text, then don't do this search!  PRBool skipScanning = (!conv) ||                        (obj->options && obj->options->force_user_charset) ||                         (obj->options && (obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting)) ||                        (obj->options && (obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting)) ||                        (obj->options && (obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs));      if (!skipScanning)  {    nsString strline(line, length);    nsresult rv = NS_OK;    PRUnichar* wresult = nsnull;        // we should force scanTXT to take a char * instead of a unicode string    // so we don't have to make an extra copy of the line just to convert it to unicode    rv = conv->ScanTXT(strline.GetUnicode(), obj->options->whattodo, &wresult);    if (NS_FAILED(rv))      return -1;    //XXX I18N Converting PRUnichar* to char*    // avoid an extra string copy by using nsSubsumeStr, this transfers ownership of    // wresult to strresult so don't try to free wresult later.    nsString strresult(nsSubsumeStr(wresult, PR_TRUE /* assume ownership */, nsCRT::strlen(wresult)));    PRInt32   copyLen = strresult.Length();    // avoid yet another extra string copy of the line by using .ToCString which will    // convert and copy directly into the buffer we have already allocated.    strresult.ToCString(obj->obuffer, obj->obuffer_size - 10);   }  else  {    nsCRT::memcpy(obj->obuffer, line, length);    obj->obuffer[length] = '\0';    status = NS_OK;  }  if (status != NS_OK)    return status;  NS_ASSERTION(*line == 0 || *obj->obuffer, "have line or buffer");  return MimeObject_write(obj, obj->obuffer, nsCRT::strlen(obj->obuffer), PR_TRUE);}