*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
int defolder = 0, interactive = -1;
char *cp, *folder = NULL, newfolder[BUFSIZ];
char buf[BUFSIZ], **argp, **arguments;
int defolder = 0, interactive = -1;
char *cp, *folder = NULL, newfolder[BUFSIZ];
char buf[BUFSIZ], **argp, **arguments;
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
case HELPSW:
snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
- adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ die("only one folder at a time!");
+ folder = pluspath (cp);
- if (strcmp (m_mailpath (folder), pwd ()) == 0)
- adios (NULL, "sorry, you can't remove the current working directory");
+ fp = m_mailpath(folder);
+ if (!strcmp(fp, pwd()))
+ die("sorry, you can't remove the current working directory");
+ free(fp);
- snprintf (cur, sizeof(cur), "atr-%s-%s",
- current, m_mailpath (folder));
+ fp = m_mailpath(folder);
+ snprintf (cur, sizeof(cur), "atr-%s-%s", current, fp);
+ free(fp);
if (!context_del (cur)) {
printf ("[+%s de-referenced]\n", folder);
return OK;
if (!context_del (cur)) {
printf ("[+%s de-referenced]\n", folder);
return OK;
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
continue;
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
continue;