mutt_add_list (flags->server_flags, flag_word);
mutt_add_list (h->data->keywords, flag_word);
static char* msg_parse_flags (IMAP_FLAGS* flags, char* s){  int recent = 0;  /* sanity-check string */  if (mutt_strncasecmp ("FLAGS", s, 5) != 0)  {    dprint (1, (debugfile, "msg_parse_flags: not a FLAGS response: %s\n",      s));    return NULL;  }  s += 5;  SKIPWS(s);  if (*s != '(')  {    dprint (1, (debugfile, "msg_parse_flags: bogus FLAGS response: %s\n",      s));    return NULL;  }  s++;  /* reset the current flags */  flags->deleted = 0;  flags->flagged = 0;  flags->replied = 0;  flags->read = 0;  flags->old = 0;  flags->changed = 0;  /* start parsing */  while (*s && *s != ')')  {    if (mutt_strncasecmp ("\\deleted", s, 8) == 0)    {      s += 8;      flags->deleted = 1;    }    else if (mutt_strncasecmp ("\\flagged", s, 8) == 0)    {      s += 8;      flags->flagged = 1;    }    else if (mutt_strncasecmp ("\\answered", s, 9) == 0)    {      s += 9;      flags->replied = 1;    }    else if (mutt_strncasecmp ("\\seen", s, 5) == 0)    {      s += 5;      flags->read = 1;    }    else if (mutt_strncasecmp ("\\recent", s, 5) == 0)    {      s += 7;      recent = 1;    }    else    {      /* store custom flags as well */      char ctmp;      char* flag_word = s;      if (!flags->server_flags)        flags->server_flags = mutt_new_list ();      while (*s && !ISSPACE (*s) && *s != ')')        s++;      ctmp = *s;      *s = '\0';      mutt_add_list (flags->server_flags, flag_word);      *s = ctmp;    }    SKIPWS(s);  }  /* wrap up, or note bad flags response */  if (*s == ')')  {    /* if a message is neither seen nor recent, it is OLD. */    if (option (OPTMARKOLD) && !recent && !(flags->read))      flags->old = 1;    s++;  }  else  {    dprint (1, (debugfile,      "msg_parse_flags: Unterminated FLAGS response: %s\n", s));    return NULL;  }  return s;}