/*
- * scan.c -- display a one-line "scan" listing of folder or messages
- *
- * 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.
- */
+** scan.c -- display a one-line "scan" listing of folder or messages
+**
+** 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.
+*/
#include <h/mh.h>
#include <h/fmt_scan.h>
/*
- * global for sbr/formatsbr.c - yech!
- */
+** global for sbr/formatsbr.c - yech!
+*/
#ifdef LBL
extern struct msgs *fmt_current_folder;
#endif
/*
- * prototypes
- */
+** prototypes
+*/
void clear_screen(void); /* from termsbr.c */
argp = arguments;
/*
- * Parse arguments
- */
+ ** Parse arguments
+ */
while ((cp = *argp++)) {
if (*cp == '-') {
switch (smatch (++cp, switches)) {
adios (NULL, "-%s unknown", cp);
case HELPSW:
- snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
- invo_name);
+ snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name);
print_help (buf, switches, 1);
done (1);
case VERSIONSW:
format = NULL;
continue;
case FMTSW:
- if (!(format = *argp++) || *format == '-')
+ if (!(format = *argp++) ||
+ *format == '-')
adios (NULL, "missing argument to %s", argp[-2]);
form = NULL;
continue;
free (path ("./", TFOLDER));
/*
- * Get new format string. Must be before chdir().
- */
+ ** Get new format string. Must be before chdir().
+ */
nfs = new_fs (form, format, FORMAT);
/*
- * We are scanning a maildrop file
- */
+ ** We are scanning a maildrop file
+ */
if (file) {
if (msgs.size)
adios (NULL, "\"msgs\" not allowed with -file");
}
/*
- * We are scanning a folder
- */
+ ** We are scanning a folder
+ */
if (!msgs.size)
app_msgarg(&msgs, "all");
context_save (); /* save the context file */
/*
- * Get the sequence number for each sequence
- * specified by Unseen-Sequence
- */
+ ** Get the sequence number for each sequence
+ ** specified by Unseen-Sequence
+ */
if ((cp = context_find (usequence)) && *cp) {
char **ap, *dp;
admonish (cp, "unable to open message");
#if 0
else
- printf ("%*d unreadable\n", DMAXFOLDER, msgnum);
+ printf ("%*d unreadable\n",
+ DMAXFOLDER, msgnum);
#endif
continue;
}
#ifndef JLR
if (hdrflag) {
- printf ("FOLDER %s\t%s\n", folder, dtimenow(1));
+ printf ("FOLDER %s\t%s\n", folder,
+ dtimenow(1));
}
#endif /* JLR */
/*
- * Check if message is in any sequence given
- * by Unseen-Sequence profile entry.
- */
+ ** Check if message is in any sequence given
+ ** by Unseen-Sequence profile entry.
+ */
unseen = 0;
for (i = 0; i < num_unseen_seq; i++) {
if (in_sequence(mp, seqnum[i], msgnum)) {
break;
default:
- adios (NULL, "scan() botch (%d)", state);
+ adios (NULL, "scan() botch (%d)",
+ state);
case SCNEOF:
#if 0
- printf ("%*d empty\n", DMAXFOLDER, msgnum);
+ printf ("%*d empty\n", DMAXFOLDER,
+ msgnum);
#else
- advise (NULL, "message %d: empty", msgnum);
+ advise (NULL, "message %d: empty",
+ msgnum);
#endif
break;
}