x_mac_type   = MimeHeaders_get_parameter(ct,PARAM_X_MAC_TYPE, NULL, NULL); x_mac_creator= MimeHeaders_get_parameter(ct,PARAM_X_MAC_CREATOR, NULL, NULL);
x_mac_type   = MimeHeaders_get_parameter(ct, PARAM_X_MAC_TYPE, NULL, NULL); x_mac_creator= MimeHeaders_get_parameter(ct, PARAM_X_MAC_CREATOR, NULL, NULL);  if (!x_mac_type && !x_mac_creator && obj->parent && obj->parent->headers) { char * ctp = MimeHeaders_get(obj->parent->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE); if (ctp) { x_mac_type   = MimeHeaders_get_parameter(ctp, PARAM_X_MAC_TYPE, NULL, NULL); x_mac_creator= MimeHeaders_get_parameter(ctp, PARAM_X_MAC_CREATOR, NULL, NULL); PR_Free(ctp); } }
MimeObject_output_init(MimeObject *obj, const char *content_type){  if (obj &&	  obj->options &&	  obj->options->state &&	  !obj->options->state->first_data_written_p)	{	  int status;	  const char *charset = 0;	  char *name = 0, *x_mac_type = 0, *x_mac_creator = 0;	  if (!obj->options->output_init_fn)		{		  obj->options->state->first_data_written_p = PR_TRUE;		  return 0;		}	  if (obj->headers)		{		  char *ct;		  name = MimeHeaders_get_name(obj->headers);		  ct = MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE,							   PR_FALSE, PR_FALSE);		  if (ct)			{			  x_mac_type   = MimeHeaders_get_parameter(ct,PARAM_X_MAC_TYPE, NULL, NULL);			  x_mac_creator= MimeHeaders_get_parameter(ct,PARAM_X_MAC_CREATOR, NULL, NULL);			  PR_FREEIF(obj->options->default_charset);			  obj->options->default_charset = MimeHeaders_get_parameter(ct, "charset", NULL, NULL);			  PR_Free(ct);			}		}	  if (mime_typep(obj, (MimeObjectClass *) &mimeInlineTextClass))		charset = ((MimeInlineText *)obj)->charset;	  if (!content_type)		content_type = obj->content_type;	  if (!content_type)		content_type = TEXT_PLAIN;    //     // Set the charset on the channel we are dealing with so people know     // what the charset is set to. Do this for quoting/Printing ONLY!     //     extern void   PR_CALLBACK ResetChannelCharset(MimeObject *obj);    if ( (obj->options) &&          ( (obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting) ||            (obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting) ||            (obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs) ||            (obj->options->format_out == nsMimeOutput::nsMimeMessagePrintOutput) ) )       ResetChannelCharset(obj); 	  status = obj->options->output_init_fn (content_type, charset, name,											 x_mac_type, x_mac_creator,											 obj->options->stream_closure);	  PR_FREEIF(name);	  PR_FREEIF(x_mac_type);	  PR_FREEIF(x_mac_creator);	  obj->options->state->first_data_written_p = PR_TRUE;	  return status;	}  return 0;}