-.TH FMTTEST %manext1% "February 19, 2013" "%nmhversion%"
+.TH FMTTEST %manext1% "December 4, 2013" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
.RB [ \-format
.IR formatstring ]
.RB [ \-address " | " \-raw " | " \-date " | " \-message ]
+.RB [ \-file " | " \-nofile ]
.RB [ \-\|\-component
.IR component-text ]
.RB [ \-dupaddrs " | " \-nodupaddrs ]
.RB [ \-ccme " | " \-noccme ]
-.RB [ \-normalize " | " \-nonormalize ]
.RB [ \-outsize
.IR size-in-characters ]
.RB [ \-bufsize
.PP
In this mode
.B fmttest
-is equivant to
-.BR ap (8).
+is equivalent to
+.IR ap (8).
.PP
In raw mode, no processing of the specified arguments is done. Each argument
is run against the specified format program with the argument text available
.RE
.PP
Date mode is equivalent to
-.BR dp (8).
+.IR dp (8).
.PP
In message mode the arguments to
.B fmttest
.RI %( unseen ),
and
.RI %( size )
-function escapes will be made available for each message.
+function escapes will be made available for each message. If the
+.B \-file
+switch is given, the arguments are interpreted as filenames instead of
+message numbers, but otherwise the behavior is the same (except that the
+.RI %( msg ),
+.RI %( cur ),
+and
+.RI %( unseen )
+function escapes will not provide any useful information).
.PP
The default format used in address mode is the default format used by
.BR scan .
is in effect.
.PP
The
-.B \-normalize
-and
-.B \-nonormalize
-switches control whether or not email addresses are normalized by the
-address parsing routines. This is only functional when in address
-mode and is designed to replicate the switch of the same name to
-.BR ap (8).
-.PP
-The
.B \-outsize
switch controls the maximum number of printable characters that the format
engine will produce. Characters marked as non-printing by the format
characters with zero width, and extra bytes that are
part of a multibyte character are not counted against this total.
Two special values are supported:
-.RB \*(lq max \*(rq,
+.RI \*(lq max \*(rq,
which will set the value
to the size of the output buffer, and
-.RB \*(lq width \*(rq,
+.RI \*(lq width \*(rq,
which will set the
value to the width of the terminal. In message mode it defaults to the
terminal width, otherwise the default is the output buffer size.
.B \-dump
switch outputs the complete set of format instructions for the specified
format program. The
-.B \-trace switch will output each format instruction as it is being
+.B \-trace
+switch will output each format instruction as it is being
executed, and show the values of the
.I num
and
.PP
.nf
.ta \w'LS_DECODECOMP 'u
-.I Instruction Description
+.I "Instruction Description"
COMP Output component
COMPF Formatted output component
LIT Output literal text
LS_COMP Write component to \fIstr\fR register
LS_LIT Write literal to \fIstr\fR register
LS_GETENV Write environment var to \fIstr\fR register
-LS_DECODECOMP Decode RFC-2047 encoded component to \fIstr\fR register
-LS_DECODE Decode RFC-2047 encoded string to \fIstr\fR register
+LS_DECODECOMP Decode RFC 2047 encoded component to \fIstr\fR register
+LS_DECODE Decode RFC 2047 encoded string to \fIstr\fR register
LS_TRIM Trim trailing whitespace from \fIstr\fR register
LV_COMP Convert component to integer, store in \fInum\fR register
LV_COMPFLAG Set \fInum\fR to 1 if \fBTRUE\fR set in component
LS_ZONE Write time zone offset to \fIstr\fR from date component
LS_DAY Write short name of day of week to \fIstr\fR from date component
LS_WEEKDAY Write long name of day of week to \fIstr\fR from date component
-LS_822DATE Write RFC-822 compatible date to \fIstr\fR from date component
+LS_822DATE Write RFC 822 compatible date to \fIstr\fR from date component
LS_PRETTY Write date with \*(lqpretty\*(rq timezone to \fIstr\fR
LV_SEC Write date component seconds to \fInum\fR
LV_MIN Write date component minutes to \fInum\fR
LS_PATH Write host route of addr component to \fIstr\fR
LS_GNAME Write group name of addr component to \fIstr\fR
LS_NOTE Write note portion of addr component to \fIstr\fR
-LS_822ADDR Write \*(lqproper\*(rq RFC-822 version of addr component to \fIstr\fR
+LS_822ADDR Write \*(lqproper\*(rq RFC 822 version of addr component to \fIstr\fR
LS_FRIENDLY Write friendly (name or note) of address component to \fIstr\fR
+LS_UNQUOTE Remove RFC 2822 quotes from string
LV_HOSTTYPE Set \fInum\fR to type of host (0=local, 1=network)
LV_INGRPF Set \fInum\fR to 1 if address was inside of group
LV_NOHOSTF Set \fInum\fR to 1 of no host was present in address component
V_NE Set \fInum\fR to 1 if \fInum\fR does not equal value
V_GT Set \fInum\fR to 1 if \fInum\fR is greater than value
V_MATCH Set \fInum\fR to 1 if \fIstr\fR contains string
-V_AMATCH Set \fInum\fR to 1 if \fIstr\fR starts with string
+V_AMATCH Set \fInum\fR to 1 if \fIstr\fR starts with string
.fi
.PP
The
.SH DEFAULTS
.nf
.RB ` \-message '
+.RB ` \-nofile '
.RB ` \-dupaddrs '
.fi
.SH BUGS