*
* 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;
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (interactive) {
cp = concat ("Remove folder \"", folder, "\"? ", NULL);
if (interactive) {
cp = concat ("Remove folder \"", folder, "\"? ", NULL);
switch (i = chdir (maildir = m_maildir (folder))) {
case OK:
if (access (".", W_OK) != NOTOK && access ("..", W_OK) != NOTOK)
switch (i = chdir (maildir = m_maildir (folder))) {
case OK:
if (access (".", W_OK) != NOTOK && access ("..", W_OK) != NOTOK)
- 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;
}
while ((dp = readdir (dd))) {
switch (dp->d_name[0]) {
case '.':
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
while ((dp = readdir (dd))) {
switch (dp->d_name[0]) {
case '.':
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
&& *(np->n_name + j) == '-'
&& strcmp (cp, np->n_name + j + 1) == 0) {
if (!np->n_context)
&& *(np->n_name + j) == '-'
&& strcmp (cp, np->n_name + j + 1) == 0) {
if (!np->n_context)