written by Nicolas Rachinsky http://www.rachinsky.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- mutt-1.3.27-ori/buffy.c Sat Feb 23 17:30:51 2002 +++ buffy.c Sat Feb 23 17:36:57 2002 @@ -162,7 +162,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *err) { - BUFFY **tmp; + BUFFY **tmp,*tmp1; char buf[_POSIX_PATH_MAX]; #ifdef BUFFY_SIZE struct stat sb; @@ -172,6 +172,19 @@ { mutt_extract_token (path, s, 0); strfcpy (buf, path->data, sizeof (buf)); + + if(data == M_UNMAILBOXES && mutt_strcmp(buf,"*") == 0) + { + for (tmp = &Incoming; *tmp;) + { + safe_free((void **)&((*tmp)->path)); + tmp1=(*tmp)->next; + safe_free((void **)tmp); + *tmp=tmp1; + } + return 0; + } + mutt_expand_path (buf, sizeof (buf)); /* Skip empty tokens. */ @@ -182,6 +195,18 @@ { if (mutt_strcmp (buf, (*tmp)->path) == 0) break; + } + + if(data == M_UNMAILBOXES) + { + if(*tmp) + { + safe_free((void **)&((*tmp)->path)); + tmp1=(*tmp)->next; + safe_free((void **)tmp); + *tmp=tmp1; + } + continue; } if (!*tmp) --- mutt-1.3.27-ori/buffy.h Sat Feb 23 17:30:53 2002 +++ buffy.h Sat Feb 23 17:31:06 2002 @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +/*parameter to mutt_parse_mailboxes*/ +#define M_MAILBOXES 1 +#define M_UNMAILBOXES 2 + typedef struct buffy_t { char *path; --- mutt-1.3.27-ori/doc/manual.sgml.head Sat Feb 23 17:30:46 2002 +++ doc/manual.sgml.head Sat Feb 23 17:31:06 2002 @@ -1206,7 +1206,7 @@ Defining mailboxes which receive mail