snprintf (dest, destlen, tmp, folder->ff->is_new ? 'N' : ' ');
snprintf (dest, destlen, tmp, folder->ff->new ? 'N' : ' ');
folder_format_str (char *dest, size_t destlen, char op, const char *src,		   const char *fmt, const char *ifstring, const char *elsestring,		   unsigned long data, format_flag flags){  char fn[SHORT_STRING], tmp[SHORT_STRING], permission[11];  char date[16], *t_fmt;  time_t tnow;  FOLDER *folder = (FOLDER *) data;  struct passwd *pw;  struct group *gr;  switch (op)  {    case 'C':      snprintf (tmp, sizeof (tmp), "%%%sd", fmt);      snprintf (dest, destlen, tmp, folder->num + 1);      break;          case 'd':      if (folder->ff->st != NULL)      {	tnow = time (NULL);	t_fmt = tnow - folder->ff->st->st_mtime < 31536000 ? "%b %d %H:%M" : "%b %d  %Y";	strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->st->st_mtime));	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, date);      }      else      {	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, "");      }      break;          case 'f':#ifdef USE_IMAP      if (folder->ff->imap)        strfcpy (fn, NONULL(folder->ff->desc), sizeof (fn));      else#endif      strfcpy (fn, folder->ff->name, sizeof(fn));      if (folder->ff->st != NULL)      {	strcat (fn, S_ISLNK (folder->ff->st->st_mode) ? "@" : 		(S_ISDIR (folder->ff->st->st_mode) ? "/" : 		 ((folder->ff->st->st_mode & S_IXUSR) != 0 ? "*" : "")));      }      snprintf (tmp, sizeof (tmp), "%%%ss", fmt);      snprintf (dest, destlen, tmp, fn);      break;          case 'F':      if (folder->ff->st != NULL)      {	sprintf (permission, "%c%c%c%c%c%c%c%c%c%c",	    S_ISDIR(folder->ff->st->st_mode) ? 'd' : (S_ISLNK(folder->ff->st->st_mode) ? 'l' : '-'),	    (folder->ff->st->st_mode & S_IRUSR) != 0 ? 'r': '-',	    (folder->ff->st->st_mode & S_IWUSR) != 0 ? 'w' : '-',	    (folder->ff->st->st_mode & S_ISUID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXUSR) != 0 ? 'x': '-',	    (folder->ff->st->st_mode & S_IRGRP) != 0 ? 'r' : '-',	    (folder->ff->st->st_mode & S_IWGRP) != 0 ? 'w' : '-',	    (folder->ff->st->st_mode & S_ISGID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXGRP) != 0 ? 'x': '-',	    (folder->ff->st->st_mode & S_IROTH) != 0 ? 'r' : '-',	    (folder->ff->st->st_mode & S_IWOTH) != 0 ? 'w' : '-',	    (folder->ff->st->st_mode & S_ISVTX) != 0 ? 't' : (folder->ff->st->st_mode & S_IXOTH) != 0 ? 'x': '-');	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, permission);      }      else      {#ifdef USE_IMAP	if (folder->ff->imap)	{	  /* mark folders with subfolders AND mail */	  sprintf (permission, "IMAP %c",            (folder->ff->inferiors && folder->ff->selectable) ? '+' : ' ');          snprintf (tmp, sizeof (tmp), "%%%ss", fmt);          snprintf (dest, destlen, tmp, permission);	}                                        #endif      }      break;          case 'g':      if (folder->ff->st != NULL)      {	if ((gr = getgrgid (folder->ff->st->st_gid)))	{	  snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	  snprintf (dest, destlen, tmp, gr->gr_name);	}	else	{	  snprintf (tmp, sizeof (tmp), "%%%sld", fmt);	  snprintf (dest, destlen, tmp, folder->ff->st->st_gid);	}      }      else      {	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, "");      }      break;          case 'l':      if (folder->ff->st != NULL)      {	snprintf (tmp, sizeof (tmp), "%%%sd", fmt);	snprintf (dest, destlen, tmp, folder->ff->st->st_nlink);      }      else      {	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, "");      }      break;          case 'N':      snprintf (tmp, sizeof (tmp), "%%%sc", fmt);      snprintf (dest, destlen, tmp, folder->ff->is_new ? 'N' : ' ');      break;          case 's':      if (folder->ff->st != NULL)      {	snprintf (tmp, sizeof (tmp), "%%%sld", fmt);	snprintf (dest, destlen, tmp, (long) folder->ff->st->st_size);      }      else      {	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, "");      }      break;          case 't':      snprintf (tmp, sizeof (tmp), "%%%sc", fmt);      snprintf (dest, destlen, tmp, folder->ff->tagged ? '*' : ' ');      break;          case 'u':      if (folder->ff->st != NULL)      {	if ((pw = getpwuid (folder->ff->st->st_uid)))	{	  snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	  snprintf (dest, destlen, tmp, pw->pw_name);	}	else	{	  snprintf (tmp, sizeof (tmp), "%%%sld", fmt);	  snprintf (dest, destlen, tmp, folder->ff->st->st_uid);	}      }      else      {	snprintf (tmp, sizeof (tmp), "%%%ss", fmt);	snprintf (dest, destlen, tmp, "");      }      break;          default:      snprintf (tmp, sizeof (tmp), "%%%sc", fmt);      snprintf (dest, destlen, tmp, op);      break;  }  return (src);}