X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=man%2Fmh-format.man;h=80021df7aa500fa4e4fb8d69fbf0cc830959da31;hp=8925b8cb70df0e4abc9c3e65eda65c7fc555a654;hb=a485ed478abbd599d8c9aab48934e7a26733ecb1;hpb=f480c03187724e54e5391ee61b810827da319a6c diff --git a/man/mh-format.man b/man/mh-format.man index 8925b8c..80021df 100644 --- a/man/mh-format.man +++ b/man/mh-format.man @@ -86,7 +86,7 @@ The argument follows the function escape: separating 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 @@ -97,7 +97,7 @@ a leading `%'; .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 @@ -115,11 +115,11 @@ constructs may be nested without ambiguity. They form a general .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 @@ -127,7 +127,7 @@ 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 @@ -172,7 +172,7 @@ are required. 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. @@ -187,10 +187,10 @@ For example, .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 @@ -267,7 +267,7 @@ num integer Set \fInum\fR to zero. 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 @@ -279,7 +279,7 @@ comp comp string Set \fIstr\fR to component text 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 @@ -331,7 +331,7 @@ pretty date string user-friendly rendering .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 @@ -473,7 +473,7 @@ format file. .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 @@ -482,7 +482,7 @@ if present. If not present, the else-if clause is executed. .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 @@ -595,7 +595,7 @@ Nontheless (as noted above) 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