if (i == 0 && head[0] == 'F' && !PL_strncmp(head, "From ", 5))
if (i == 0 && head[0] == 'F' && !nsCRT::strncmp(head, "From ", 5))
mime_insert_all_headers(char            **body,									      MimeHeaders     *headers,									      nsMsgEditorType editorType,									      char            *mailcharset){	PRBool htmlEdit = editorType == nsMsgHTMLEditor;	char *newBody = NULL;	char *html_tag = PL_strcasestr(*body, "<HTML>");	int i;	if (!headers->done_p)	{		MimeHeaders_build_heads_list(headers);		headers->done_p = PR_TRUE;	}	if (htmlEdit)	{		if (html_tag)		{			*html_tag = 0;			mime_SACopy(&(newBody), *body);			*html_tag = '<';			mime_SACat(&newBody, 					 "<HTML> <BR><BR>-------- Original Message --------");		}		else		{			mime_SACopy(&(newBody), 					 "<HTML> <BR><BR>-------- Original Message --------");		}		mime_SACat(&newBody, MIME_HEADER_TABLE);	}	else	{		mime_SACopy(&(newBody), 					 MSG_LINEBREAK MSG_LINEBREAK "-------- Original Message --------");	}	for (i = 0; i < headers->heads_size; i++)	{	  char *head = headers->heads[i];	  char *end = (i == headers->heads_size-1				   ? headers->all_headers + headers->all_headers_fp				   : headers->heads[i+1]);	  char *colon, *ocolon;	  char *contents;	  char *name = 0;	  char *c2 = 0;	  // Hack for BSD Mailbox delimiter. 	  if (i == 0 && head[0] == 'F' && !PL_strncmp(head, "From ", 5))		{		  colon = head + 4;		  contents = colon + 1;		}	  else		{		  /* Find the colon. */		  for (colon = head; colon < end; colon++)			if (*colon == ':') break;		  if (colon >= end) continue;   /* junk */		  /* Back up over whitespace before the colon. */		  ocolon = colon;		  for (; colon > head && IS_SPACE(colon[-1]); colon--)			;		  contents = ocolon + 1;		}	  /* Skip over whitespace after colon. */	  while (contents <= end && IS_SPACE(*contents))		contents++;	  /* Take off trailing whitespace... */	  while (end > contents && IS_SPACE(end[-1]))		end--;	  name = (char *)PR_MALLOC(colon - head + 1);	  if (!name)       return /* MIME_OUT_OF_MEMORY */;	  nsCRT::memcpy(name, head, colon - head);	  name[colon - head] = 0;	  c2 = (char *)PR_MALLOC(end - contents + 1);	  if (!c2)		{		  PR_Free(name);		  return /* MIME_OUT_OF_MEMORY */;		}	  nsCRT::memcpy(c2, contents, end - contents);	  c2[end - contents] = 0;	  	  if (htmlEdit) mime_fix_up_html_address(&c2);		  	  mime_intl_insert_message_header_1(&newBody, &c2, name, name, mailcharset,										htmlEdit); 	  PR_Free(name);	  PR_Free(c2);	}	if (htmlEdit)	{		mime_SACat(&newBody, "</TABLE>");		mime_SACat(&newBody, MSG_LINEBREAK "<BR><BR>");		if (html_tag)			mime_SACat(&newBody, html_tag+6);		else			mime_SACat(&newBody, *body);	}	else	{		mime_SACat(&newBody, MSG_LINEBREAK MSG_LINEBREAK);		mime_SACat(&newBody, *body);	}	if (newBody)	{		PR_FREEIF(*body);		*body = newBody;	}}