#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
- invo_name = r1bindex(argv[0], '/');
+ invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
if (folder)
adios(NULL, "only one folder at a time!");
else
- folder = pluspath(cp);
+ folder = getcpy(expandfol(cp));
} else
app_msgarg(&msgs, cp);
}
vec[vecp] = NULL;
- if (!context_find("path"))
- free(path("./", TFOLDER));
-
/*
** If we didn't specify which messages to search,
** then search the whole folder.
*/
if (!msgs.size)
- app_msgarg(&msgs, "all");
+ app_msgarg(&msgs, seq_all);
if (!folder)
- folder = getfolder(1);
- maildir = m_maildir(folder);
+ folder = getcurfol();
+ maildir = toabsdir(folder);
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
printf("%d hit%s\n", mp->numsel, mp->numsel == 1 ? "" : "s");
}
- context_replace(pfolder, folder); /* update current folder */
+ context_replace(curfolder, folder); /* update current folder */
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */
folder_free(mp); /* free folder/message structure */