mutt_add_list (flags, flag_word);
if (*flag_word) mutt_add_list (flags, flag_word);
static char* imap_get_flags (LIST** hflags, char* s){  LIST* flags;  char* flag_word;  char ctmp;  /* sanity-check string */  if (mutt_strncasecmp ("FLAGS", s, 5) != 0)  {    dprint (1, (debugfile, "imap_get_flags: not a FLAGS response: %s\n",      s));    return NULL;  }  s += 5;  SKIPWS(s);  if (*s != '(')  {    dprint (1, (debugfile, "imap_get_flags: bogus FLAGS response: %s\n",      s));    return NULL;  }  /* create list, update caller's flags handle */  flags = mutt_new_list();  *hflags = flags;  while (*s && *s != ')')  {    s++;    SKIPWS(s);    flag_word = s;    while (*s && (*s != ')') && !ISSPACE (*s))      s++;    ctmp = *s;    *s = '\0';    mutt_add_list (flags, flag_word);    *s = ctmp;  }  /* note bad flags response */  if (*s != ')')  {    dprint (1, (debugfile,      "imap_get_flags: Unterminated FLAGS response: %s\n", s));    return NULL;  }  s++;  return s;}