env->in_reply_to = mutt_new_list (); env->in_reply_to->data = safe_strdup (curenv->message_id);
if (curenv->message_id) { env->in_reply_to = mutt_new_list (); env->in_reply_to->data = safe_strdup (curenv->message_id); }
mutt_make_reference_headers (ENVELOPE *curenv, ENVELOPE *env, CONTEXT *ctx){  HEADER *h;  LIST **p, **q;  int i;    if (!curenv)  {    env->references = NULL;    env->in_reply_to = NULL;    p = &env->references;    q = &env->in_reply_to;        for(i = 0; i < ctx->vcount; i++)    {      while(*p) p = &(*p)->next;      while (*q) q = &(*q)->next;            h = ctx->hdrs[ctx->v2r[i]];      if(h->tagged)      {	*p = mutt_make_references(h->env);	if (h->env->message_id)	{	  *q = mutt_new_list ();	  (*q)->data = safe_strdup (h->env->message_id);	}      }    }  }  else  {    env->references = mutt_make_references (curenv);    env->in_reply_to = mutt_new_list ();    env->in_reply_to->data = safe_strdup (curenv->message_id);  }}