There's now a new format file etc/scan.default, which contains
the default scan listing. Previously it was hard-coded as a define
in h/scansbr.h. The default scan listing format can be set in
config/config.h and can be queried with `mhparam scanformat'.
/* standard format (filter) files */
char *mhlformat = "mhl.format"; /* show */
char *mhlreply = "mhl.reply"; /* repl */
/* standard format (filter) files */
char *mhlformat = "mhl.format"; /* show */
char *mhlreply = "mhl.reply"; /* repl */
+char *scanformat = "scan.default"; /* scan/inc */
mhl.reply rcvdistcomps rcvdistcomps.outbox \
replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD \
scan.nmh scan.mailx scan.nomime scan.size scan.time \
mhl.reply rcvdistcomps rcvdistcomps.outbox \
replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD \
scan.nmh scan.mailx scan.nomime scan.size scan.time \
- scan.timely scan.unseen scan.meillo mhn.defaults
+ scan.timely scan.unseen scan.meillo scan.default \
+ mhn.defaults
# ========= DEPENDENCIES FOR BUILDING ==========
# ========= DEPENDENCIES FOR BUILDING ==========
--- /dev/null
+%;
+%; default scan/inc listing format
+%;
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
+%4(year{date})-%02(mon{date})-%02(mday{date}) \
+%02(hour{date}):%02(min{date}) \
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%> %(decode{subject})
extern char *rcvdistcomps;
extern char *replcomps;
extern char *replgroupcomps;
extern char *rcvdistcomps;
extern char *replcomps;
extern char *replgroupcomps;
+extern char *scanformat;
extern char *sendmail;
extern char *seq_all;
extern char *seq_beyond;
extern char *sendmail;
extern char *seq_all;
extern char *seq_beyond;
#define SCNNUM (-2) /* number out of range */
#define SCNFAT (-3) /* fatal error */
#define SCNNUM (-2) /* number out of range */
#define SCNFAT (-3) /* fatal error */
-/*
-** default format for `scan' and `inc'
-*/
-# define FORMAT \
-"=%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
-%4(year{date})-%02(mon{date})-%02(mday{date}) %02(hour{date}):%02(min{date}) \
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> %(decode{subject})\n"
-
#define WIDTH 78
#define SCN_MBOX (-1)
#define WIDTH 78
#define SCN_MBOX (-1)
- /*
- ** Get new format string. Must be before chdir().
- */
- fmtstr = new_fs(form, FORMAT);
+ /* Set format string. Must be before chdir(). */
+ fmtstr = new_fs(form, scanformat);
fmt_compile(fmtstr, &fmt);
fmt_dump(fmt);
fmt_compile(fmtstr, &fmt);
fmt_dump(fmt);
- /* Get new format string */
- fmtstr = new_fs(form, FORMAT);
+ /* Set format string */
+ fmtstr = new_fs(form, scanformat);
if (noisy) {
printf("Incorporating new mail into %s...\n\n", folder);
if (noisy) {
printf("Incorporating new mail into %s...\n\n", folder);
{ "replgroupcomps", &replgroupcomps },
{ "mhlformat", &mhlformat },
{ "mhlreply", &mhlreply },
{ "replgroupcomps", &replgroupcomps },
{ "mhlformat", &mhlformat },
{ "mhlreply", &mhlreply },
+ { "scanformat", &scanformat },
{ "#--Default-Sequence-Names--", &empty },
{ "seq-all", &seq_all },
{ "#--Default-Sequence-Names--", &empty },
{ "seq-all", &seq_all },
- /*
- ** Get new format string. Must be before chdir().
- */
- fmtstr = new_fs(form, FORMAT);
+ /* Set format string. Must be before chdir(). */
+ fmtstr = new_fs(form, scanformat);
/*
** We are scanning a maildrop file
/*
** We are scanning a maildrop file