X("nofixcte", 0, NFIXCTESW) \
X("file file", 0, FILESW) \
X("outfile file", 0, OUTFILESW) \
+ X("rmmproc program", 0, RPROCSW) \
+ X("normmproc", 0, NRPRCSW) \
X("verbose", 0, VERBSW) \
X("noverbose", 0, NVERBSW) \
X("version", 0, VERSIONSW) \
outfile = *cp == '-' ? add (cp, NULL) : path (cp, TFILE);
continue;
+ case RPROCSW:
+ if (!(rmmproc = *argp++) || *rmmproc == '-')
+ adios (NULL, "missing argument to %s", argp[-2]);
+ continue;
+ case NRPRCSW:
+ rmmproc = NULL;
+ 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, 1)))
adios (NULL, "unable to read folder %s", folder);
/* check for empty folder */
remove_file (char *file) {
if (rmmproc) {
char *rmm_command = concat (rmmproc, " ", file, NULL);
- int status = WIFEXITED (status = system (rmm_command))
- ? WEXITSTATUS (status)
- : NOTOK;
+ int status = system (rmm_command);
free (rmm_command);
-
- return status;
+ return WIFEXITED (status) ? WEXITSTATUS (status) : NOTOK;
} else {
/* This is OK for a non-message file, it still uses the
BACKUP_PREFIX form. The backup file will be in the same