#include <fcntl.h>
#include <h/signals.h>
#include <h/md5.h>
-#include <errno.h>
-#include <signal.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
X("type content", 0, TYPESW) \
X("rcache policy", 0, RCACHESW) \
X("wcache policy", 0, WCACHESW) \
+ X("changecur", 0, CHGSW) \
+ X("nochangecur", 0, NCHGSW) \
X("version", 0, VERSIONSW) \
X("help", 0, HELPSW) \
X("debug", -5, DEBUGSW) \
void list_all_messages (CT *, int, int, int, int);
/* mhfree.c */
-void free_content (CT);
extern CT *cts;
void freects_done (int) NORETURN;
int
main (int argc, char **argv)
{
- int sizesw = 1, headsw = 1;
+ int sizesw = 1, headsw = 1, chgflag = 1;
int msgnum, *icachesw;
char *cp, *file = NULL, *folder = NULL;
char *maildir, buf[100], **argp;
file = *cp == '-' ? cp : path (cp, TFILE);
continue;
+ case CHGSW:
+ chgflag++;
+ continue;
+ case NCHGSW:
+ chgflag = 0;
+ continue;
+
case VERBSW:
verbosw = 1;
continue;
adios (maildir, "unable to change directory to");
/* read folder and create message structure */
- if (!(mp = folder_read (folder)))
+ if (!(mp = folder_read (folder, 0)))
adios (NULL, "unable to read folder %s", folder);
/* check for empty folder */
/* If reading from a folder, do some updating */
if (mp) {
context_replace (pfolder, folder);/* update current folder */
- seq_setcur (mp, mp->hghsel); /* update current message */
+ if (chgflag)
+ seq_setcur (mp, mp->hghsel); /* update current message */
seq_save (mp); /* synchronize sequences */
context_save (); /* save the context file */
}
pipeser (int i)
{
if (i == SIGQUIT) {
- unlink ("core");
fflush (stdout);
fprintf (stderr, "\n");
fflush (stderr);