if (!PL_strcasecmp(obj->encoding, ENCODING_UUENCODE))
if (!nsCRT::strcasecmp(obj->encoding, ENCODING_UUENCODE))
mime_find_suggested_name_of_part(const char *part, MimeObject *obj){  char *result = 0;  obj = mime_address_to_part(part, obj);  if (!obj) return 0;  result = (obj->headers ? MimeHeaders_get_name(obj->headers) : 0);  /* If this part doesn't have a name, but this part is one fork of an	 AppleDouble, and the AppleDouble itself has a name, then use that. */  if (!result &&	  obj->parent &&	  obj->parent->headers &&	  mime_typep(obj->parent,				 (MimeObjectClass *) &mimeMultipartAppleDoubleClass))	result = MimeHeaders_get_name(obj->parent->headers);  /* Else, if this part is itself an AppleDouble, and one of its children	 has a name, then use that (check data fork first, then resource.) */  if (!result &&	  mime_typep(obj, (MimeObjectClass *) &mimeMultipartAppleDoubleClass))	{	  MimeContainer *cont = (MimeContainer *) obj;	  if (cont->nchildren > 1 &&		  cont->children[1] &&		  cont->children[1]->headers)		result = MimeHeaders_get_name(cont->children[1]->headers);	  if (!result &&		  cont->nchildren > 0 &&		  cont->children[0] &&		  cont->children[0]->headers)		result = MimeHeaders_get_name(cont->children[0]->headers);	}  /* Ok, now we have the suggested name, if any.	 Now we remove any extensions that correspond to the	 Content-Transfer-Encoding.  For example, if we see the headers		Content-Type: text/plain		Content-Disposition: inline; filename=foo.text.uue		Content-Transfer-Encoding: x-uuencode	 then we would look up (in mime.types) the file extensions which are	 associated with the x-uuencode encoding, find that "uue" is one of	 them, and remove that from the end of the file name, thus returning	 "foo.text" as the name.  This is because, by the time this file ends	 up on disk, its content-transfer-encoding will have been removed;	 therefore, we should suggest a file name that indicates that.   */  if (result && obj->encoding && *obj->encoding)	{	  PRInt32 L = PL_strlen(result);	  const char **exts = 0;	  /*		 I'd like to ask the mime.types file, "what extensions correspond		 to obj->encoding (which happens to be "x-uuencode") but doing that		 in a non-sphagetti way would require brain surgery.  So, since		 currently uuencode is the only content-transfer-encoding which we		 understand which traditionally has an extension, we just special-		 case it here!  Icepicks in my forehead!		 Note that it's special-cased in a similar way in libmsg/compose.c.	   */	  if (!PL_strcasecmp(obj->encoding, ENCODING_UUENCODE))		{		  static const char *uue_exts[] = { "uu", "uue", 0 };		  exts = uue_exts;		}	  while (exts && *exts)		{		  const char *ext = *exts;		  PRInt32 L2 = PL_strlen(ext);		  if (L > L2 + 1 &&							/* long enough */			  result[L - L2 - 1] == '.' &&			/* '.' in right place*/			  !PL_strcasecmp(ext, result + (L - L2)))	/* ext matches */			{			  result[L - L2 - 1] = 0;		/* truncate at '.' and stop. */			  break;			}		  exts++;		}	}  return result;}