8 date 92.12.04.18.59.22; author jromine; state Exp;
13 date 92.11.18.00.45.57; author jromine; state Exp;
18 date 92.11.18.00.27.02; author jromine; state Exp;
23 date 92.10.26.17.05.53; author jromine; state Exp;
28 date 90.04.05.15.10.28; author sources; state Exp;
33 date 90.03.28.16.07.45; author sources; state Exp;
38 date 90.03.22.11.31.24; author sources; state Exp;
43 date 90.03.20.19.42.03; author sources; state Exp;
48 date 90.03.20.17.36.19; author sources; state Exp;
53 date 90.03.20.10.31.28; author sources; state Exp;
58 date 90.03.20.10.27.56; author sources; state Exp;
73 .\" @@(#)$Id: mhl.rf,v 1.10 1992/11/18 00:45:57 jromine Exp jromine $
76 mhl \- produce formatted listings of MH messages
79 \%[\-bell] \%[\-nobell]
80 \%[\-clear] \%[\-noclear]
83 \%[\-length\ lines] \%[\-width\ columns]
84 \%[\-moreproc\ program] \%[\-nomoreproc]
88 \fIMhl\fR is a formatted message listing program.
89 It can be used as a replacement for \fImore\fR\0(1)
90 (the default \fIshowproc\fR\0).
92 each of the messages specified as arguments (or the standard input) will be
94 If more than one message file is specified,
95 the user will be prompted prior to each one,
96 and a <RETURN> or <EOT> will begin the output,
97 with <RETURN> clearing the screen (if appropriate),
98 and <EOT> (usually CTRL\-D) suppressing the screen clear.
99 An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
100 prompting for the next message (if there is one),
101 and a <QUIT> (usually CTRL-\\) will terminate the program (without core dump).
103 The `\-bell' option tells \fImhl\fR to ring the terminal's bell at the end of each page,
104 while the `\-clear' option tells \fImhl\fR to clear the scree at the end of
105 each page (or output a formfeed after each message).
106 Both of these switches (and their inverse counterparts)
107 take effect only if the profile entry \fImoreproc\fR is defined but empty,
108 and \fImhl\fR is outputting to a terminal.
109 If the \fImoreproc\fR entry is defined and non-empty,
110 and \fImhl\fR is outputting to a terminal,
111 then \fImhl\fR will cause the \fImoreproc\fR to be placed between the
112 terminal and \fImhl\fR and the switches are ignored.
114 if the `\-clear' switch is used and \fImhl's\fR output is directed to a
116 then \fImhl\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fR
117 envariables to determine the user's
118 terminal type in order to find out how to clear the screen.
119 If the `\-clear' switch is used and \fImhl's\fR output is not directed to
120 a terminal (e.g., a pipe or a file),
121 then \fImhl\fR will send a formfeed after each message.
123 To override the default \fImoreproc\fR and the profile entry,
124 use the `\-moreproc\ program' switch.
125 Note that \fImhl\fR will never start a \fImoreproc\fR if invoked on a
128 The `\-length\ length' and `\-width\ width' switches set the screen length and
130 These default to the values indicated by \fB$TERMCAP\fR,
132 otherwise they default to 40 and 80, respectively.
134 The default format file used by \fImhl\fR is called \fImhl.format\fR
135 (which is first searched for in the user's \fIMH\fR directory,
136 and then sought in the \fI@@(MHETCPATH)\fR directory),
137 this can be changed by using the `\-form\ formatfile' switch.
140 the `\-folder\ +folder' switch sets the \fIMH\fR folder name,
141 which is used for the \*(lqmessagename:\*(rq field described below.
142 The envariable \fB$mhfolder\fR is consulted for the default value,
143 which \fIshow\fR, \fInext\fR, and \fIprev\fR initialize appropriately.
145 \fIMhl\fR operates in two phases:
146 1) read and parse the format file,
147 and 2) process each message (file).
149 an internal description of the format is produced as a structured list.
151 this list is walked for each message,
152 outputting message information under the format constraints from the format
155 The \*(lqmhl.format\*(rq form file contains information controlling
156 screen clearing, screen size, wrap\-around control, transparent text,
157 component ordering, and component formatting.
158 Also, a list of components to ignore may be specified,
159 and a couple of \*(lqspecial\*(rq components are defined to provide added
161 Message output will be in the order specified by the order in the format file.
163 Each line of mhl.format has one of the formats:
167 variable[,variable...]
168 component:[variable,...]
170 A line beginning with a `;' is a comment, and is ignored.
171 A line beginning with a `:' is clear text,
172 and is output exactly as is.
173 A line containing only a `:' produces a blank line in the output.
174 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
176 and finally, remaining lines define the global environment.
178 For example, the line:
181 width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
183 defines the screen size to be 80 columns by 40 rows,
184 specifies that the screen should be cleared prior to each page,
185 that the overflow indentation is 5,
186 and that overflow text should be flagged with \*(lq***\*(rq.
188 Following are all of the current variables and their arguments.
189 If they follow a component,
190 they apply only to that component,
191 otherwise, their affect is global.
192 Since the whole format is parsed before any output processing,
193 the last global switch setting for a variable applies to the whole message
194 if that variable is used in a global context
195 (i.e., bell, clearscreen, width, length).
199 .ta \w'noclearscreen 'u +\w'integer/G 'u
200 \fIvariable\fR \fItype\fR \fIsemantics\fR
201 width integer screen width or component width
202 length integer screen length or component length
203 offset integer positions to indent \*(lqcomponent: \*(rq
204 overflowtext string text to use at the beginning of an
206 overflowoffset integer positions to indent overflow lines
207 compwidth integer positions to indent component text
208 after the first line is output
209 uppercase flag output text of this component in all
211 nouppercase flag don't uppercase
212 clearscreen flag/G clear the screen prior to each page
213 noclearscreen flag/G don't clearscreen
214 bell flag/G ring the bell at the end of each page
215 nobell flag/G don't bell
216 component string/L name to use instead of \*(lqcomponent\*(rq for
218 nocomponent flag don't output \*(lqcomponent: \*(rq for this
220 center flag center component on line (works for
221 one\-line components only)
222 nocenter flag don't center
223 leftadjust flag strip off leading whitespace on each
225 noleftadjust flag don't leftadjust
226 compress flag change newlines in text to spaces
227 nocompress flag don't compress
228 split flag don't combine multiple fields into a single field
229 nosplit flag combine multiple fields into a single field
230 newline flag print newline at end of components (default)
231 nonewline flag don't print newline at end of components
232 formatfield string format string for this component (see below)
233 addrfield flag field contains addresses
234 datefield flag field contains dates
239 To specify the value of integer\-valued and string\-valued variables,
240 follow their name with an equals\-sign and the value.
241 Integer\-valued variables are given decimal values,
242 while string\-valued variables are given arbitrary text bracketed by
244 If a value is suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq,
245 then its value is useful in a global\-only or local\-only context
250 ignores=component,...
252 specifies a list of components which are never output.
254 The component \*(lqMessageName\*(rq (case\-insensitive)
255 will output the actual message name (file name) preceded by
256 the folder name if one is specified or found in the environment.
257 The format is identical to that produced by the `\-header' option to
260 The component \*(lqExtras\*(rq will output all of the components of the message
261 which were not matched by explicit components,
262 or included in the ignore list.
263 If this component is not specified,
264 an ignore list is not needed since all non\-specified components will be
267 If \*(lqnocomponent\*(rq is NOT specified, then the component name will be
268 output as it appears in the format file.
270 The default format is:
276 .so @@(MHETCPATH)/mhl.format
281 The variable \*(lqformatfield\*(rq specifies a format string
282 (see \fImh\-format\fR\0(5)).
283 The flag variables \*(lqaddrfield\*(rq and \*(lqdatefield\*(rq
284 (which are mutually exclusive),
285 tell \fImhl\fR to interpret the escapes in the format string
286 as either addresses or dates, respectively.
289 \fImhl\fR does not apply any formatting string to fields containing address or
290 dates (see \fImh\-mail\fR\0(5) for a list of these fields).
291 Note that this results in faster operation
292 since \fImhl\fR must parse both addresses and dates in order to apply a
293 format string to them.
295 \fImhl\fR can be given a default format string for either address or date
296 fields (but not both).
298 on a global line specify: either the flag addrfield or datefield,
299 along with the apropriate formatfield variable string.
301 ^@@(MHETCPATH)/mhl.format~^The message template
302 ^or <mh\-dir>/mhl.format~^Rather than the standard template
303 ^$HOME/\&.mh\(ruprofile~^The user profile
305 ^moreproc:~^Program to use as interactive front\-end
307 show(1), ap(8), dp(8)
319 There should be some way to pass `bell' and `clear' information to the
322 On hosts where \fIMH\fR was configured with the BERK option,
323 address parsing is not enabled.
325 The \*(lqnonewline\*(rq option interacts badly
326 with \*(lqcompress\*(rq and \*(lqsplit\*(rq.
338 .\" @@(#)$Id: mhl.rf,v 1.9 1992/11/18 00:27:02 jromine Exp jromine $
341 The \*(lqnonewline\(*rq option interacts badly
347 @document "newline" and "nonewline"
352 .\" @@(#)$Id: mhl.rf,v 1.8 1992/10/26 17:05:53 jromine Exp jromine $
361 @typo fix from Jerry Peek
366 .\" @@(#)$Id: mhl.rf,v 1.7 1990/04/05 15:10:28 sources Exp jromine $
385 while string\-valued variables are given arbirtray text bracketed by
391 @use formatstrings on any field
400 @put things back, do .NA stuff another way
405 (see \fImh\-format\fR\0(5)), which may be used only on
406 address and date header components.
409 control the interpretation of the escapes.
420 .TH MHL 1 @@(MHCENTERFOOT) @@(MHLEFTFOOT)
430 @fixup for makewhatis
441 @make formatfield interpretation clearer
461 formatfield string format string for this component
464 (see \fImh\-format\fR(5)).
465 The variables \*(lqaddrfield\*(rq and \*(lqdatefield\*(rq
469 specify either the variable addrfield or the variable datefield,
470 along with the variable formatfield.