* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
/* This keeps compiler happy on calls to qsort */
typedef int (*qsort_comp) (const void *, const void *);
/* This keeps compiler happy on calls to qsort */
typedef int (*qsort_comp) (const void *, const void *);
char *folder = NULL, buf[BUFSIZ], **argp;
char **arguments;
struct msgs_array msgs = { 0, 0, NULL };
char *folder = NULL, buf[BUFSIZ], **argp;
char **arguments;
struct msgs_array msgs = { 0, 0, NULL };
snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
}
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
else
}
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
else
} else
app_msgarg(&msgs, cp);
}
if (!context_find ("path"))
free (path ("./", TFOLDER));
} else
app_msgarg(&msgs, cp);
}
if (!context_find ("path"))
free (path ("./", TFOLDER));
- if (!msgs.size)
- app_msgarg(&msgs, "all");
+ if (!msgs.size) {
+ if (allmsgs) {
+ app_msgarg(&msgs, "all");
+ } else {
+ adios (NULL, "must specify messages to sort with -noall");
+ }
+ }
- printf ("sorting by %s-major %s-minor\n",
- submajor ? subjsort : datesw,
- submajor ? datesw : subjsort);
+ if (submajor)
+ printf ("sorting by %s\n", subjsort);
+ else
+ printf ("sorting by %s-major %s-minor\n", subjsort, datesw);
seq_save (mp); /* synchronize message sequences */
context_save (); /* save the context file */
folder_free (mp); /* free folder/message structure */
seq_save (mp); /* synchronize message sequences */
context_save (); /* save the context file */
folder_free (mp); /* free folder/message structure */