.\"
.\" THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
-.\" $Id$
.\"
-.TH MH-FORMAT 5 "%nmhdate%" MH.6.8 [%nmhversion%]
+.TH MH-FORMAT %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
.SH NAME
mh-format \- format file for nmh message system
.SH DESCRIPTION
whitespace is discarded:
.RI `%( function " " argument )'.
.PP
-In addition to literal numbers or strings,
+In addition to literal numbers or strings,
the argument to a function escape can be another function, a component,
or a control escape. When the argument is a function or a
component, they are listed without a leading `%'. When control escapes
.PP
A
.I control
-escape is one of: `%<', `%?', `%|', or `%>'.
+escape is one of: `%<', `%?', `%|', or `%>'.
These are combined into the conditional execution construct:
.PP
.RS 5
.B if\-elseif\-else\-endif
block where only one of the
format-texts
-is interpreted. In other
-words, `%<' is like the "if", `%?' is like the "elseif", `%|' is like
+is interpreted. In other
+words, `%<' is like the "if", `%?' is like the "elseif", `%|' is like
"else", and `%>' is like "endif".
.PP
-A `%<' or `%?' control escape causes its condition to be evaluated.
+A `%<' or `%?' control escape causes its condition to be evaluated.
This condition is a
.I component
or
For integer valued functions or components, the condition is true
if the function return or component value is non-zero, and false if zero.
For string valued functions or components, the condition is true
-if the function return or component value is
+if the function return or component value is
a non-empty string, and false for an empty string.
.PP
When escapes are nested (via expr arguments), evaluation is done from inner-most to outer-most.
As noted above, for the
expr
-argument type,
+argument type,
functions and components are written without a
leading `%'.
Control escape arguments must use a leading `%', preceded by a space.
.PP
writes the value of the header component \*(lqFrom:\*(rq to the
internal register named str; then (\fImymbox\fR\^) reads str and
-writes its result to the internal register named
-.IR num ;
-then the control escape evaluates
-.IR num .
+writes its result to the internal register named
+.IR num ;
+then the control escape evaluates
+.IR num .
If
.IR num
is non-zero, the
lit literal string Set \fIstr\fR to \fIarg\fR.
lit string Clear \fIstr\fR.
getenv literal string Set \fIstr\fR to environment value of \fIarg\fR
-profile literal string Set \fIstr\fR to profile component \fIarg\fR
+profile literal string Set \fIstr\fR to profile component \fIarg\fR
value
.\" dat literal int return value of dat[arg]
nonzero expr boolean \fInum\fR is non-zero
compval comp integer Set \fInum\fR to \*(lq\fBatoi\fR(\fIcomp\fR\^)\*(rq
.\" compflag comp integer Set \fInum\fR to component flags bits (internal)
.\" decodecomp comp string Set \fIstr\fR to RFC-2047 decoded component text
-decode expr string decode \fIstr\fR as RFC-2047 (MIME-encoded)
+decode expr string decode \fIstr\fR as RFC-2047 (MIME-encoded)
component
+unquote expr string remove RFC-2822 quotes from \fIstr\fR
trim expr trim trailing white-space from \fIstr\fR
putstr expr print \fIstr\fR
putstrf expr print \fIstr\fR in a fixed width
.fi
.RE
.PP
-These functions require an address component as an argument.
+These functions require an address component as an argument.
The return value of functions noted with `*' is computed from
the first address present in the header component.
.PP
.PP
.RS 5
.nf
-%<{date} %|*>
+%<{date} %|*%>
.fi
.RE
.PP
.PP
This clears
.I str
-and formats the \*(lqReply-To:\*(rq header
+and formats the \*(lqReply-To:\*(rq header
if present. If not present, the else-if clause is executed.
.PP
.RS 5
.fi
.RE
.PP
-This formats the
+This formats the
\*(lqFrom:\*(rq, \*(lqSender:\*(rq and \*(lqReturn-Path:\*(rq
headers, stopping as soon as one of them is present. Next:
.PP
the various scan format strings are inherited
from older MH versions, and are generally hard-coded to 4
digits of message number before formatting problems
-start to occur.
+start to occur.
The nmh format strings can be modified to behave more sensibly with larger
message numbers:
.PP