else if (!strcasecmp (cmd, "set") || !strcasecmp (cmd, "unset") || !strcasecmp (cmd, "reset") || !strcasecmp (cmd, "toggle"))
else if (!strcmp (cmd, "set") || !strcmp (cmd, "unset") || !strcmp (cmd, "reset") || !strcmp (cmd, "toggle"))
int mutt_command_complete (char *buffer, size_t len, int pos){  char cmd[STRING];  char completed[STRING] = { 0 };  char *pt;  int num;    if (buffer[0] == 0)    return 0;  strncpy (cmd, buffer, pos);  pt = cmd;  pt[pos] = 0;  while (!isspace ((unsigned char) *pt))    pt++;  *pt = 0;  pt = buffer + pos;  while ((pt > buffer) && !isspace ((unsigned char) *pt))    pt--;  if (pt == buffer) /* complete cmd */  {    for (num = 0; Commands[num].name; num++)      candidate (completed, cmd, Commands[num].name, sizeof (completed));    if (completed[0] == 0)      return 0;    strncpy (buffer, completed, len);  }  else if (!strcasecmp (cmd, "set")	   || !strcasecmp (cmd, "unset")	   || !strcasecmp (cmd, "reset")	   || !strcasecmp (cmd, "toggle"))  { 		/* complete variables */    char *prefixes[] = { "no", "inv", "?", "&", 0 };    int  prefix_index;    char tmpbuffer[STRING];    int  prefix_len;    /* remember if the command is set to decide whether we want to attempt the     * prefixes */    int  cmd_is_set = !strcasecmp (cmd, "set");         pt++;    if (*pt == 0)      return 0;    strncpy (cmd, pt, sizeof (cmd));    for (num = 0; MuttVars[num].option; num++)      candidate (completed, cmd, MuttVars[num].option, sizeof (completed));      if ( cmd_is_set ) {      /* loop through all the possible prefixes (no, inv, ...) */      for ( prefix_index = 0; prefixes[prefix_index]; prefix_index++ )      {        prefix_len = strlen(prefixes[prefix_index]);        strncpy( tmpbuffer, prefixes[prefix_index], sizeof(tmpbuffer) );          /* if the current option is prepended with the prefix */        if ( !strncasecmp(cmd, tmpbuffer, prefix_len )) {          for (num = 0; MuttVars[num].option; num++) {            strncpy( &tmpbuffer[prefix_len],                      MuttVars[num].option,                      sizeof(tmpbuffer) - prefix_len );            candidate (completed, cmd, tmpbuffer, sizeof (completed));          }        }      }    }    if (completed[0] == 0)      return 0;    strncpy (pt, completed, buffer + len - pt);  }  else    return 0;  return 1;}