For all tools that take `-from file' or `-format string' switches, those
were merged: `-format string' went away, but one may supply any such string
to the -form switch by prepending it with an equal sign `='. Thus
scan -format '%(msg) %{from}'
is now written as
scan -form '=%(msg) %{from}'
Note: mhl isn't adjusted this way, yet. It's too complex to be understood
by me, now. Thus, it still remains as it was: Any parameter to -form will be
interepreted as a filter *file*. As show and mhshow use mhl, they are
affected, too.
In the same go: Compactified the new_fs() function: folded the arguments.
24 files changed:
** prototypes
*/
struct format *fmt_scan(struct format *, char *, int, int *);
** prototypes
*/
struct format *fmt_scan(struct format *, char *, int, int *);
-char *new_fs(char *, char *, char *, char *);
int fmt_compile(char *, struct format **);
int fmt_compile(char *, struct format **);
int makedir(char *);
char *nmh_getpass(const char *);
char *norm_charmap(char *);
int makedir(char *);
char *nmh_getpass(const char *);
char *norm_charmap(char *);
-char *new_fs(char *, char *, char *, char *);
+char *new_fs(char *, char *);
int peekc(FILE *ib);
int pidwait(pid_t, int);
int pidstatus(int, FILE *, char *);
int peekc(FILE *ib);
int pidwait(pid_t, int);
int pidstatus(int, FILE *, char *);
** default format for `scan' and `inc'
*/
# define FORMAT \
** default format for `scan' and `inc'
*/
# define FORMAT \
-"%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+"=%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%4(year{date})-%02(mon{date})-%02(mday{date}) \
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> %(decode{subject})\n"
%4(year{date})-%02(mon{date})-%02(mday{date}) \
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> %(decode{subject})\n"
.B %libdir%/ap
.RB [ \-form
.IR formatfile ]
.B %libdir%/ap
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-normalize " | " \-nonormalize ]
.RB [ \-width
.IR columns ]
.RB [ \-normalize " | " \-nonormalize ]
.RB [ \-width
.IR columns ]
To override the output format used by
.BR ap ,
the
To override the output format used by
.BR ap ,
the
-.B \-format
-.I string
-or
-.B \-format
-switches are used. This permits individual fields of
-the address to be extracted with ease. The string is simply a format
-string, and the file is simply a format file. See
+switch is used. This permits individual fields of
+the address to be extracted with ease.
+The
+.I file
+is either the name of a format file or it may be
+a format string directly, if prepended with an equal sign `='.
+See
.BR mh\-format (5)
for the details.
.PP
.BR mh\-format (5)
for the details.
.PP
%<{error}%{error}: %{text}%|%(putstr(proper{text}))%>
%<{error}%{error}: %{text}%|%(putstr(proper{text}))%>
.RE
.PP
which says that if an error was detected, print the error, a `:', and
.RE
.PP
which says that if an error was detected, print the error, a `:', and
-.RB ` \-format "' defaults as described above"
+.RB ` \-form "' defaults as described above"
.RB ` \-normalize '
.RB ` \-width "' defaults to the width of the terminal"
.fi
.RB ` \-normalize '
.RB ` \-width "' defaults to the width of the terminal"
.fi
.SH BUGS
The argument to the
.SH BUGS
The argument to the
switch must be interpreted as a single token
by the shell that invokes
.BR ap .
switch must be interpreted as a single token
by the shell that invokes
.BR ap .
.B %libdir%/dp
.RB [ \-form
.IR formatfile ]
.B %libdir%/dp
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-version ]
.RB [ \-width
.IR columns ]
.RB [ \-version ]
To override the output format used by
.BR dp ,
the
To override the output format used by
.BR dp ,
the
-.B \-format
-.I string
-or
-.B \-format
This permits individual fields of the address to be extracted with ease.
This permits individual fields of the address to be extracted with ease.
-The string is simply a format string and the file is simply a format file.
+The
+.I file
+is either the name of a format file or
+a format string directly, if prepended with an equal sign `='.
See
.BR mh\-format (5)
for the details.
See
.BR mh\-format (5)
for the details.
%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
.RE
.PP
which says that if an error was detected, print the error, a `:',
.RE
.PP
which says that if an error was detected, print the error, a `:',
-.RB ` \-format "' default as described above"
+.RB ` \-form "' default as described above"
.RB ` \-width "' default to the width of the terminal"
.fi
.RB ` \-width "' default to the width of the terminal"
.fi
.SH BUGS
The argument to the
.SH BUGS
The argument to the
switch must be interpreted as a single token by the shell that invokes
.BR dp .
Therefore, one must usually place the argument to this switch inside double\-quotes.
switch must be interpreted as a single token by the shell that invokes
.BR dp .
Therefore, one must usually place the argument to this switch inside double\-quotes.
.B %libdir%/fmtdump
.RB [ \-form
.IR formatfile ]
.B %libdir%/fmtdump
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-version ]
.RB [ \-help ]
.ad
.RB [ \-version ]
.RB [ \-help ]
.ad
interprets the file. This is useful when debugging a complicated format file.
.PP
The
interprets the file. This is useful when debugging a complicated format file.
.PP
The
-.B \-format
-.I string
-and
-switches may be
-used to specify a format string or format file to read. The string
-is simply a format string and the file is simply a format file.
+switch may be used to specify a format file to read.
+It may also be a format string directly, if prepended with an equal sign `='.
See
.BR mh-format (5)
for the details.
See
.BR mh-format (5)
for the details.
.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-form
.IR formfile ]
.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-form
.IR formfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-file
.IR name ]
.RB [ \-silent " | " \-nosilent ]
.RB [ \-file
.IR name ]
.RB [ \-silent " | " \-nosilent ]
The interpretation of the
.B \-form
.IR formatfile ,
The interpretation of the
.B \-form
.IR formatfile ,
-.B \-format
-.IR string ,
and
.B \-width
.I columns
and
.B \-width
.I columns
.RB ` +folder "' defaulted by \*(lqInbox\*(rq above"
.RB ` \-noaudit '
.RB ` \-changecur '
.RB ` +folder "' defaulted by \*(lqInbox\*(rq above"
.RB ` \-noaudit '
.RB ` \-changecur '
-.RB ` \-format "' defaulted as described above"
+.RB ` \-form "' defaulted as described above"
.RB ` \-nosilent '
.RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
.RB ` \-width "' defaulted to the width of the terminal"
.RB ` \-nosilent '
.RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
.RB ` \-width "' defaulted to the width of the terminal"
.SH BUGS
The argument to the
.SH BUGS
The argument to the
switch must be interpreted as a single
token by the shell that invokes
.BR inc .
switch must be interpreted as a single
token by the shell that invokes
.BR inc .
.B %libdir%/ap
.RB [ \-form
.IR formatfile ]
.B %libdir%/ap
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-normalize " | " \-nonormalize ]
.RB [ \-width
.IR columns ]
.RB [ \-normalize " | " \-nonormalize ]
.RB [ \-width
.IR columns ]
.B %libdir%/dp
.RB [ \-form
.IR formatfile ]
.B %libdir%/dp
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-version ]
.RB [ \-width
.IR columns ]
.RB [ \-version ]
.B %libdir%/fmtdump
.RB [ \-form
.IR formatfile ]
.B %libdir%/fmtdump
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-version ]
.RB [ \-help ]
.RB [ \-version ]
.RB [ \-help ]
.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-form
.IR formfile ]
.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-form
.IR formfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-file
.IR name ]
.RB [ \-silent " | " \-nosilent ]
.RB [ \-file
.IR name ]
.RB [ \-silent " | " \-nosilent ]
.RI [ command ]
.RB [ \-form
.IR formatfile ]
.RI [ command ]
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-bell " | " \-nobell ]
.RB [ \-width
.IR columns ]
.RB [ \-bell " | " \-nobell ]
.RB [ \-clear " | " \-noclear ]
.RB [ \-form
.IR formatfile ]
.RB [ \-clear " | " \-noclear ]
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-file
.RB [ \-width
.IR columns ]
.RB [ \-file
.B \-form
.I formatfile
switch.
.B \-form
.I formatfile
switch.
+Note: In contrast to any other
+.B mmh
+tool, the
+.B \-form
+switch does only take file names, but no format strings with a prepended
+equal sign `='.
.PP
Finally, the
.B \-folder
.PP
Finally, the
.B \-folder
+In contrast to any other
+.B mmh
+tool, the
+.B \-form
+switch does only take file names, but no format strings with a prepended
+equal sign `='.
+.PP
There should be some way to pass `bell' and `clear' information to the
front\-end.
.PP
There should be some way to pass `bell' and `clear' information to the
front\-end.
.PP
.RI [ command ]
.RB [ \-form
.IR formatfile ]
.RI [ command ]
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-bell " | " \-nobell ]
.RB [ \-width
.IR columns ]
.RB [ \-bell " | " \-nobell ]
Alternately, if no command is specified (or is bogus), then
.B rcvtty
will instead write a one\-line scan listing. The default output format
Alternately, if no command is specified (or is bogus), then
.B rcvtty
will instead write a one\-line scan listing. The default output format
-of this scan listing may be overridden by using either the
+of this scan listing may be overridden by using the
-or
-.B \-format
-.I string
option, similar to the
equivalent options for
.B scan
option, similar to the
equivalent options for
.B scan
.RB [ \-clear " | " \-noclear ]
.RB [ \-form
.IR formatfile ]
.RB [ \-clear " | " \-noclear ]
.RB [ \-form
.IR formatfile ]
-.RB [ \-format
-.IR string ]
.RB [ \-width
.IR columns ]
.RB [ \-file
.RB [ \-width
.IR columns ]
.RB [ \-file
To override the output format used by
.BR scan ,
the
To override the output format used by
.BR scan ,
the
-.B \-format
-.I string
-or
-switches are used. This permits individual fields of
-the scan listing to be extracted with ease. The string is simply a format
-string and the file is simply a format file. See
+switch is used. This permits individual fields of
+the scan listing to be extracted with ease.
+.I file
+is either the name of a format file or a format string directly,
+if prepended with an equal sign `='.
+See
.BR mh\-format (5)
for the details.
.PP
.BR mh\-format (5)
for the details.
.PP
.nf
.RB ` +folder "' defaults to the current folder"
.RB ` msgs "' defaults to all"
.nf
.RB ` +folder "' defaults to the current folder"
.RB ` msgs "' defaults to all"
-.RB ` \-format "' defaulted as described above"
+.RB ` \-form "' defaulted as described above"
.RB ` \-width "' defaulted to the width of the terminal"
.fi
.RB ` \-width "' defaulted to the width of the terminal"
.fi
.SH BUGS
The argument to the
.SH BUGS
The argument to the
switch must be interpreted as a single
token by the shell that invokes
.BR scan .
switch must be interpreted as a single
token by the shell that invokes
.BR scan .
** Copy first available format string, store in static memory and normalize it.
*/
char *
** Copy first available format string, store in static memory and normalize it.
*/
char *
-new_fs(char *form, char *format, char *def_form, char *default_fs)
+new_fs(char *form, char *def_form)
{
struct stat st;
register FILE *fp;
{
struct stat st;
register FILE *fp;
- if ((fp = fopen(etcpath(form), "r")) == NULL) {
- adios(form, "unable to open format file");
+ if (*form == '=') {
+ formats = getcpy(form+1);
+ } else {
+ if ((fp = fopen(etcpath(form), "r")) == NULL) {
+ adios(form, "unable to open format file");
+ }
+ if (fstat(fileno(fp), &st) == -1) {
+ adios(form, "unable to stat format file");
+ }
+ formats = mh_xmalloc((size_t) st.st_size + 1);
+ if (read(fileno(fp), formats, (int)st.st_size) != st.st_size) {
+ adios(form, "error reading format file");
+ }
+ formats[st.st_size] = '\0';
+ fclose(fp);
- if (fstat(fileno(fp), &st) == -1) {
- adios(form, "unable to stat format file");
- }
- formats = mh_xmalloc((size_t) st.st_size + 1);
- if (read(fileno(fp), formats, (int)st.st_size) != st.st_size) {
- adios(form, "error reading format file");
- }
- formats[st.st_size] = '\0';
- fclose(fp);
-
- } else if (format) {
- formats = getcpy(format);
-
- if ((fp = fopen(etcpath(def_form), "r")) == NULL) {
- adios(def_form, "unable to open format file");
+ if (*def_form == '=') {
+ formats = getcpy(def_form+1);
+ } else {
+ if ((fp = fopen(etcpath(def_form), "r")) == NULL) {
+ adios(def_form, "unable to open format file");
+ }
+ if (fstat(fileno(fp), &st) == -1) {
+ adios(def_form, "unable to stat format file");
+ }
+ formats = mh_xmalloc((size_t) st.st_size + 1);
+ if (read(fileno(fp), formats, (int)st.st_size) != st.st_size) {
+ adios(def_form, "error reading format file");
+ }
+ formats[st.st_size] = '\0';
+ fclose(fp);
- if (fstat(fileno(fp), &st) == -1) {
- adios(def_form, "unable to stat format file");
- }
- formats = mh_xmalloc((size_t) st.st_size + 1);
- if (read(fileno(fp), formats, (int)st.st_size) != st.st_size) {
- adios(def_form, "error reading format file");
- }
- formats[st.st_size] = '\0';
- fclose(fp);
-
- } else {
- formats = getcpy(default_fs);
}
normalize(formats); /* expand escapes */
}
normalize(formats); /* expand escapes */
#define WIDTH 78
#define WBUFSIZ BUFSIZ
#define WIDTH 78
#define WBUFSIZ BUFSIZ
-#define FORMAT "%<{error}%{error}: %{text}%|%(putstr(proper{text}))%>"
+#define FORMAT "=%<{error}%{error}: %{text}%|%(putstr(proper{text}))%>"
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
-#define FMTSW 1
- { "format string", 5 },
-#define NORMSW 2
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
{
int addrp = 0, normalize = AD_HOST;
int width = 0, status = 0;
{
int addrp = 0, normalize = AD_HOST;
int width = 0, status = 0;
- char *cp, *form = NULL, *format = NULL, *nfs;
+ char *cp, *form = NULL, *nfs;
char buf[BUFSIZ], **argp;
char **arguments, *addrs[NADDRS];
char buf[BUFSIZ], **argp;
char **arguments, *addrs[NADDRS];
case FORMSW:
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s", argp[-2]);
case FORMSW:
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s", argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s", argp[-2]);
- form = NULL;
adios(NULL, "usage: %s [switches] addrs ...", invo_name);
/* get new format string */
adios(NULL, "usage: %s [switches] addrs ...", invo_name);
/* get new format string */
- nfs = new_fs(form, format, NULL, FORMAT);
+ nfs = new_fs(form, FORMAT);
if (width == 0) {
if ((width = sc_width()) < WIDTH / 2)
if (width == 0) {
if ((width = sc_width()) < WIDTH / 2)
- nfs = new_fs(form, NULL, components, NULL);
+ nfs = new_fs(form, components);
strncpy(drft, m_draft(seq_beyond), sizeof(drft));
if ((out = creat(drft, m_gmprot())) == NOTOK) {
adios(drft, "unable to create");
strncpy(drft, m_draft(seq_beyond), sizeof(drft));
if ((out = creat(drft, m_gmprot())) == NOTOK) {
adios(drft, "unable to create");
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(drft, "unable to create");
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(drft, "unable to create");
- nfs = new_fs(form, NULL, distcomps, NULL);
+ nfs = new_fs(form, distcomps);
if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
adios(drft, "error writing");
}
if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
adios(drft, "error writing");
}
#define WIDTH 78
#define WBUFSIZ BUFSIZ
#define WIDTH 78
#define WBUFSIZ BUFSIZ
-#define FORMAT "%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>"
+#define FORMAT "=%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>"
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
-#define FMTSW 1
- { "format string", 5 },
-#define WIDTHSW 2
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
main(int argc, char **argv)
{
int datep = 0, width = 0, status = 0;
main(int argc, char **argv)
{
int datep = 0, width = 0, status = 0;
- char *cp, *form = NULL, *format = NULL, *nfs;
+ char *cp, *form = NULL, *nfs;
char buf[BUFSIZ], **argp, **arguments;
char *dates[NDATES];
char buf[BUFSIZ], **argp, **arguments;
char *dates[NDATES];
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- form = NULL;
adios(NULL, "usage: %s [switches] dates ...", invo_name);
/* get new format string */
adios(NULL, "usage: %s [switches] dates ...", invo_name);
/* get new format string */
- nfs = new_fs(form, format, NULL, FORMAT);
+ nfs = new_fs(form, FORMAT);
if (width == 0) {
if ((width = sc_width()) < WIDTH / 2)
if (width == 0) {
if ((width = sc_width()) < WIDTH / 2)
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
static struct swit switches[] = {
#define FORMSW 0
{ "form formatfile", 0 },
-#define FMTSW 1
- { "format string", 5 },
-#define VERSIONSW 2
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
main(int argc, char **argv)
{
int ncomps;
main(int argc, char **argv)
{
int ncomps;
- char *cp, *form = NULL, *format = NULL;
+ char *cp, *form = NULL;
char buf[BUFSIZ], *nfs, **argp, **arguments;
struct format *fmt;
char buf[BUFSIZ], *nfs, **argp, **arguments;
struct format *fmt;
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- form = NULL;
/*
** Get new format string. Must be before chdir().
*/
/*
** Get new format string. Must be before chdir().
*/
- nfs = new_fs(form, format, NULL, FORMAT);
+ nfs = new_fs(form, FORMAT);
ncomps = fmt_compile(nfs, &fmt);
fmt_dump(fmt);
ncomps = fmt_compile(nfs, &fmt);
fmt_dump(fmt);
cpydata(in, out, form, drft);
close(in);
} else {
cpydata(in, out, form, drft);
close(in);
} else {
- nfs = new_fs(form, NULL, forwcomps, NULL);
+ nfs = new_fs(form, forwcomps);
if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
adios(drft, "error writing");
}
if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
adios(drft, "error writing");
}
char *cp = NULL;
/* Get new format string */
char *cp = NULL;
/* Get new format string */
- nfs = new_fs(form, NULL, NULL, NULL);
+ nfs = new_fs(form, NULL);
fmtsize = strlen(nfs) + 256;
/* Compile format string */
fmtsize = strlen(nfs) + 256;
/* Compile format string */
{ "file name", 0 },
#define FORMSW 5
{ "form formatfile", 0 },
{ "file name", 0 },
#define FORMSW 5
{ "form formatfile", 0 },
-#define FMTSW 6
- { "format string", 5 },
-#define SILSW 7
** not truncate mailspool
*/
char *cp, *maildir = NULL, *folder = NULL;
** not truncate mailspool
*/
char *cp, *maildir = NULL, *folder = NULL;
- char *format = NULL, *form = NULL;
char *audfile = NULL, *from = NULL;
char buf[BUFSIZ], **argp, *nfs, **arguments;
struct msgs *mp = NULL;
char *audfile = NULL, *from = NULL;
char buf[BUFSIZ], **argp, *nfs, **arguments;
struct msgs *mp = NULL;
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- form = NULL;
#endif /* MHE */
/* Get new format string */
#endif /* MHE */
/* Get new format string */
- nfs = new_fs(form, format, NULL, FORMAT);
+ nfs = new_fs(form, FORMAT);
if (noisy) {
printf("Incorporating new mail into %s...\n\n", folder);
if (noisy) {
printf("Incorporating new mail into %s...\n\n", folder);
if (ptos(name, &cp))
return 1;
if (ptos(name, &cp))
return 1;
- nfs = new_fs(NULL, NULL, NULL, cp);
+ cp = concat("=", cp, NULL);
+ nfs = new_fs(cp, NULL);
+ free(cp);
c1->c_nfs = getcpy(nfs);
c1->c_flags |= FORMAT;
return 0;
c1->c_nfs = getcpy(nfs);
c1->c_flags |= FORMAT;
return 0;
if (!mh_strcasecmp(name, "decode")) {
char *nfs;
if (!mh_strcasecmp(name, "decode")) {
char *nfs;
- nfs = new_fs(NULL, NULL, NULL, "%(decode{text})");
+ nfs = new_fs("=%(decode{text})", NULL);
c1->c_nfs = getcpy(nfs);
c1->c_flags |= FORMAT;
return 0;
c1->c_nfs = getcpy(nfs);
c1->c_flags |= FORMAT;
return 0;
adios(drft, "unable to create");
/* get new format string */
adios(drft, "unable to create");
/* get new format string */
- cp = new_fs(form ? form : rcvdistcomps, NULL, NULL, NULL);
+ cp = new_fs(form ? form : rcvdistcomps, NULL);
format_len = strlen(cp);
ncomps = fmt_compile(cp, &fmt) + 1;
if (!(nxtbuf = compbuffers =
format_len = strlen(cp);
ncomps = fmt_compile(cp, &fmt) + 1;
if (!(nxtbuf = compbuffers =
-"%2(hour{dtimenow}):%02(min{dtimenow}): %<(size)%5(size) %>%<{encrypted}E%>\
+"=%2(hour{dtimenow}):%02(min{dtimenow}): %<(size)%5(size) %>%<{encrypted}E%>\
%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
%{subject}"
%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
%{subject}"
{ "biff", 0 },
#define FORMSW 1
{ "form formatfile", 0 },
{ "biff", 0 },
#define FORMSW 1
{ "form formatfile", 0 },
-#define FMTSW 2
- { "format string", 5 },
-#define WIDTHSW 3
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
static int biff = 0;
static int width = 0;
static char *form = NULL;
static int biff = 0;
static int width = 0;
static char *form = NULL;
-static char *format = NULL;
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- form = NULL;
rewind(stdin);
/* get new format string */
rewind(stdin);
/* get new format string */
- nfs = new_fs(form, format, NULL, SCANFMT);
+ nfs = new_fs(form, SCANFMT);
scan(stdin, 0, 0, nfs, width, 0, 0, NULL, 0L, 0);
if (newline)
write(fd, "\n\r", 2);
scan(stdin, 0, 0, nfs, width, 0, 0, NULL, 0L, 0);
if (newline)
write(fd, "\n\r", 2);
umask(mask);
/* get new format string */
umask(mask);
/* get new format string */
- cp = new_fs(form, NULL, NULL, NULL);
+ cp = new_fs(form, NULL);
format_len = strlen(cp);
/* compile format string */
format_len = strlen(cp);
/* compile format string */
{ "noclear", 0 },
#define FORMSW 2
{ "form formatfile", 0 },
{ "noclear", 0 },
#define FORMSW 2
{ "form formatfile", 0 },
-#define FMTSW 3
- { "format string", 5 },
-#define WIDTHSW 4
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
int i, state, msgnum;
int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
char *cp, *maildir, *file = NULL, *folder = NULL;
int i, state, msgnum;
int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
char *cp, *maildir, *file = NULL, *folder = NULL;
- char *form = NULL, *format = NULL, buf[BUFSIZ];
+ char *form = NULL, buf[BUFSIZ];
char **argp, *nfs, **arguments;
struct msgs_array msgs = { 0, 0, NULL };
struct msgs *mp;
char **argp, *nfs, **arguments;
struct msgs_array msgs = { 0, 0, NULL };
struct msgs *mp;
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(form = *argp++) || *form == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- format = NULL;
- continue;
- case FMTSW:
- if (!(format = *argp++) || *format == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- form = NULL;
/*
** Get new format string. Must be before chdir().
*/
/*
** Get new format string. Must be before chdir().
*/
- nfs = new_fs(form, format, NULL, FORMAT);
+ nfs = new_fs(form, FORMAT);
/*
** We are scanning a maildrop file
/*
** We are scanning a maildrop file