Package: mailcap
Version: 3.74
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use "groff -e ' $' -e '\\~$' <file>" to find obvious trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?


troff:<stdin>:8: warning: trailing space in the line
troff:<stdin>:30: warning: trailing space in the line
troff:<stdin>:64: warning: trailing space in the line
troff:<stdin>:65: warning: trailing space in the line
troff:<stdin>:66: warning: trailing space in the line
troff:<stdin>:67: warning: trailing space in the line
troff:<stdin>:68: warning: trailing space in the line
troff:<stdin>:69: warning: trailing space in the line
troff:<stdin>:70: warning: trailing space in the line
troff:<stdin>:71: warning: trailing space in the line
troff:<stdin>:72: warning: trailing space in the line


   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.12-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages mailcap depends on:
ii  media-types  10.1.0
ii  perl         5.40.0-8

Versions of packages mailcap recommends:
ii  bzip2     1.0.8-6
ii  file      1:5.45-3+b1
ii  xz-utils  5.6.3-1+b1

mailcap suggests no packages.

-- no debconf information
Input file is mailcap.5

Output from "mandoc -T lint  mailcap.5": (shortened list)

      1 input text line longer than 80 bytes: $HOME/.mailcap:/etc/...
      1 input text line longer than 80 bytes: Each individual mail...
      1 input text line longer than 80 bytes: If no "%s" appears i...
      1 input text line longer than 80 bytes: If this flag is give...
      1 input text line longer than 80 bytes: The "command" field ...
      1 input text line longer than 80 bytes: The "compose" field ...
      1 input text line longer than 80 bytes: The "composetyped" f...
      1 input text line longer than 80 bytes: The "notes=xxx" fiel...
      1 input text line longer than 80 bytes: The "print=xxx" fiel...
      1 input text line longer than 80 bytes: The "test=xxx" field...
      1 input text line longer than 80 bytes: The "textualnewlines...
      1 input text line longer than 80 bytes: The "type" field (te...
      1 input text line longer than 80 bytes: The metamail program...
      1 input text line longer than 80 bytes: The optional flags c...
      1 input text line longer than 80 bytes: The syntax of a mail...
      1 input text line longer than 80 bytes: This flag should be ...
      1 input text line longer than 80 bytes: Two special codes ca...
      1 input text line longer than 80 bytes: can be used to indic...
     11 whitespace at end of input line

-.-.

Output from "test-groff -mandoc -t -ww -z mailcap.5": (shortened list)

     11 trailing space in the line

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

11

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
  " \(em " creates a too big gap in the text (in "troff").

An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".

mailcap.5:40:The "compose" field may be used to specify a program that can be 
used to compose a new body or body part in the given format.  Its intended use 
is to support mail composing agents that support the composition of multiple 
types of mail using external composing agents. As with the view-command, the 
compose command will be executed after replacing certain escape sequences 
starting with "%".  In particular, %s should be replaced by the name of a file 
to which the composed data is to be written by the specified composing program, 
thus allowing the calling program (e.g. metamail) to tell the called program 
where to store the composed data.  If %s does not appear, then the composed 
data will be assumed to be written by the composing programs to standard 
output.   The result of the composing program may be data that is NOT yet 
suitable for mail transport -- that is, a Content-Transfer-Encoding may still 
need to be applied to the data.
mailcap.5:51:The metamail program has built-in support for a few key 
content-types.  In particular, it supports the text type, the multipart and 
multipart/alternative type, and the message/rfc822 types.  This support is 
incomplete for many subtypes -- for example, it only supports US-ASCII text in 
general.  This kind of built-in support can be OVERRIDDEN by an entry in any 
mailcap file on the user's search path.  Metamail also has rudimentary built-in 
support for types that are totally unrecognized -- i.e. for which no mailcap 
entry or built-in handler exists.  For such unrecognized types, metamail will 
write a file with a "clean" copy of the data -- i.e. a copy in which all mail 
headers have been removed, and in which any 7-bit transport encoding has been 
decoded.
mailcap.5:53:$HOME/.mailcap:/etc/mailcap:/usr/share/etc/mailcap:/usr/local/etc/mailcap
 -- default path for mailcap files.

-.-.

Use "\e" to print the escape character instead of "\\" (which gets
interpreted in copy mode).

12:The syntax of a mailcap file is quite simple, at least compared to termcap 
files.  Any line that starts with "#" is a comment.  Blank lines are ignored.  
Otherwise, each line defines a single mailcap entry for a single content type.  
Long lines may be continued by ending them with a backslash character, \\.
26:The "command" field is any UNIX command ("cat %s" in the above example), and 
is used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)

-.-.

Use the word (in)valid instead of (il)legal,
if not related to legal matters.

See "www.gnu.org/prep/standards".

Think about translations into other languages!

mailcap.5:24:The "type" field (text/plain, in the above example) is simply any 
legal content type name, as defined by informational RFC 1524.  In practice, 
this is almost any string.  It is the string that will be matched against the 
"Content\-type" header (or the value passed in with \-c) to decide if this is 
the mailcap entry that matches the current message.  Additionally, the type 
field may specify a subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match 
all subtypes (e.g. "image/*").

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

4:mailcap - metamail capabilities file

-.-.

Strings longer than 3/4 of a standard line length (80)
Use "\:" to split the string at the end of an output line, for example a
long URLs (web address)

53 $HOME/.mailcap:/etc/mailcap:/usr/share/etc/mailcap:/usr/local/etc/mailcap -- 
default path for mailcap files.

-.-.

Add a comma (or \&) after "e.g." and "i.e.", or use English words
(man-pages(7)).
Abbreviation points should be protected against being interpreted as
an end of sentence, if they are not, and that independent of the
current place on the line.

24:The "type" field (text/plain, in the above example) is simply any legal 
content type name, as defined by informational RFC 1524.  In practice, this is 
almost any string.  It is the string that will be matched against the 
"Content\-type" header (or the value passed in with \-c) to decide if this is 
the mailcap entry that matches the current message.  Additionally, the type 
field may specify a subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match 
all subtypes (e.g. "image/*").
40:The "compose" field may be used to specify a program that can be used to 
compose a new body or body part in the given format.  Its intended use is to 
support mail composing agents that support the composition of multiple types of 
mail using external composing agents. As with the view-command, the compose 
command will be executed after replacing certain escape sequences starting with 
"%".  In particular, %s should be replaced by the name of a file to which the 
composed data is to be written by the specified composing program, thus 
allowing the calling program (e.g. metamail) to tell the called program where 
to store the composed data.  If %s does not appear, then the composed data will 
be assumed to be written by the composing programs to standard output.   The 
result of the composing program may be data that is NOT yet suitable for mail 
transport -- that is, a Content-Transfer-Encoding may still need to be applied 
to the data.
46:If this flag is given, the named interpreter needs to interact with the user 
on a terminal.  In some environments (e.g. a window-oriented mail reader under 
X11) this will require the creation of a new terminal emulation window, while 
in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.
51:The metamail program has built-in support for a few key content-types.  In 
particular, it supports the text type, the multipart and multipart/alternative 
type, and the message/rfc822 types.  This support is incomplete for many 
subtypes -- for example, it only supports US-ASCII text in general.  This kind 
of built-in support can be OVERRIDDEN by an entry in any mailcap file on the 
user's search path.  Metamail also has rudimentary built-in support for types 
that are totally unrecognized -- i.e. for which no mailcap entry or built-in 
handler exists.  For such unrecognized types, metamail will write a file with a 
"clean" copy of the data -- i.e. a copy in which all mail headers have been 
removed, and in which any 7-bit transport encoding has been decoded.

-.-.

Wrong distance between sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

Mark a final abbreviation point as such by suffixing it with "\&".

Some sentences (etc.) do not begin on a new line.

24:The "type" field (text/plain, in the above example) is simply any legal 
content type name, as defined by informational RFC 1524.  In practice, this is 
almost any string.  It is the string that will be matched against the 
"Content\-type" header (or the value passed in with \-c) to decide if this is 
the mailcap entry that matches the current message.  Additionally, the type 
field may specify a subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match 
all subtypes (e.g. "image/*").
26:The "command" field is any UNIX command ("cat %s" in the above example), and 
is used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)
40:The "compose" field may be used to specify a program that can be used to 
compose a new body or body part in the given format.  Its intended use is to 
support mail composing agents that support the composition of multiple types of 
mail using external composing agents. As with the view-command, the compose 
command will be executed after replacing certain escape sequences starting with 
"%".  In particular, %s should be replaced by the name of a file to which the 
composed data is to be written by the specified composing program, thus 
allowing the calling program (e.g. metamail) to tell the called program where 
to store the composed data.  If %s does not appear, then the composed data will 
be assumed to be written by the composing programs to standard output.   The 
result of the composing program may be data that is NOT yet suitable for mail 
transport -- that is, a Content-Transfer-Encoding may still need to be applied 
to the data.
42:The "composetyped" field is similar to the "compose" field, but is to be 
used when the composing program needs to specify the Content-type header field 
to be applied to the composed data.  The "compose" field is simpler, and is 
preferred for use with existing (non-mail-oriented) programs for composing data 
in a given format.  The "composetyped" field is necessary when the Content-type 
information must include auxiliary parameters, and the composition program must 
then know enough about mail formats to produce output that includes the mail 
type information, and to apply any necessary Content-Transfer-Encoding.   
Conceptually, "compose" specifies a program that simply outputs the specified 
type of data in its raw form, while "composetyped" specifies a program that 
outputs the data as a MIME object, with all necessary Content-* headers already 
in place.
46:If this flag is given, the named interpreter needs to interact with the user 
on a terminal.  In some environments (e.g. a window-oriented mail reader under 
X11) this will require the creation of a new terminal emulation window, while 
in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.
51:The metamail program has built-in support for a few key content-types.  In 
particular, it supports the text type, the multipart and multipart/alternative 
type, and the message/rfc822 types.  This support is incomplete for many 
subtypes -- for example, it only supports US-ASCII text in general.  This kind 
of built-in support can be OVERRIDDEN by an entry in any mailcap file on the 
user's search path.  Metamail also has rudimentary built-in support for types 
that are totally unrecognized -- i.e. for which no mailcap entry or built-in 
handler exists.  For such unrecognized types, metamail will write a file with a 
"clean" copy of the data -- i.e. a copy in which all mail headers have been 
removed, and in which any 7-bit transport encoding has been decoded.
62:Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
75:Nathaniel S. Borenstein

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

Line 12, length 308

The syntax of a mailcap file is quite simple, at least compared to termcap 
files.  Any line that starts with "#" is a comment.  Blank lines are ignored.  
Otherwise, each line defines a single mailcap entry for a single content type.  
Long lines may be continued by ending them with a backslash character, \\.

Line 14, length 266

Each individual mailcap entry consists of a content-type specification, a 
command to execute, and (possibly) a set of optional "flag" values.  For 
example, a very simple mailcap entry (which is actually a built-in default 
behavior for metamail) would look like this:

Line 18, length 111

The optional flags can be used to specify additional information about the 
mail-handling command.  For example:

Line 22, length 169

can be used to indicate that the output of the 'cat' command may be voluminous, 
requiring either a scrolling window, a pager, or some other appropriate coping 
mechanism.

Line 24, length 483

The "type" field (text/plain, in the above example) is simply any legal content 
type name, as defined by informational RFC 1524.  In practice, this is almost 
any string.  It is the string that will be matched against the "Content\-type" 
header (or the value passed in with \-c) to decide if this is the mailcap entry 
that matches the current message.  Additionally, the type field may specify a 
subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match all subtypes (e.g. 
"image/*").

Line 26, length 1112

The "command" field is any UNIX command ("cat %s" in the above example), and is 
used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)

Line 28, length 307

If no "%s" appears in the command field, then instead of placing the message 
body in a temporary file, metamail will pass the body to the command on the 
standard input.  This is helpful in saving /tmp file space, but can be 
problematic for window-oriented applications under some window systems such as 
MGR.

Line 30, length 626

Two special codes can appear in the viewing command for objects of type 
multipart (any subtype).  These are "%n" and "%F".  %n will be replaced by the 
number of parts within the multipart object.  %F will be replaced by a series 
of arguments, two for each part, giving first the content-type and then the 
name of the temporary file where the decoded part has been stored.  In 
addition, for each file created by %F, a second file is created, with the same 
name followed by "H", which contains the header information for that body part. 
 This will not be needed by most multipart handlers, but it is there if you 
ever need it.  

Line 32, length 190

The "notes=xxx" field is an uninterpreted string that is used to specify the 
name of the person who installed this entry in the mailcap file.  (The "xxx" 
may be replaced by any text string.)

Line 34, length 551

The "test=xxx" field is a command that is executed to determine whether or not 
the mailcap line actually applies.  That is, if the content-type field matches 
the content-type on the message, but a "test=" field is present, then the test 
must succeed before the mailcap line is considered to "match" the message being 
viewed.  The command may be any UNIX command, using the same syntax and the 
same %-escapes as for the viewing command, as described above.  A command is 
considered to succeed if it exits with a zero exit status, and to fail 
otherwise.

Line 36, length 190

The "print=xxx" field is a command that is executed to print the data instead 
of display it interactively.  This behavior is usually a consequence of 
invoking metamail with the "\-h" switch.

Line 38, length 562

The "textualnewlines" field can be used in the rather obscure case where 
metamail's default rules for treating newlines in base64-encoded data are 
unsatisfactory.  By default, metamail will translate CRLF to the local newline 
character in decoded base64 output if the content-type is "text" (any subtype), 
but will not do so otherwise.  A mailcap entry with a field of 
"textualnewlines=1" will force such translation for the specified content-type, 
while "textualnewlines=0" will guarantee that the translation does not take 
place even for textual content-types.

Line 40, length 940

The "compose" field may be used to specify a program that can be used to 
compose a new body or body part in the given format.  Its intended use is to 
support mail composing agents that support the composition of multiple types of 
mail using external composing agents. As with the view-command, the compose 
command will be executed after replacing certain escape sequences starting with 
"%".  In particular, %s should be replaced by the name of a file to which the 
composed data is to be written by the specified composing program, thus 
allowing the calling program (e.g. metamail) to tell the called program where 
to store the composed data.  If %s does not appear, then the composed data will 
be assumed to be written by the composing programs to standard output.   The 
result of the composing program may be data that is NOT yet suitable for mail 
transport -- that is, a Content-Transfer-Encoding may still need to be applied 
to the data.

Line 42, length 862

The "composetyped" field is similar to the "compose" field, but is to be used 
when the composing program needs to specify the Content-type header field to be 
applied to the composed data.  The "compose" field is simpler, and is preferred 
for use with existing (non-mail-oriented) programs for composing data in a 
given format.  The "composetyped" field is necessary when the Content-type 
information must include auxiliary parameters, and the composition program must 
then know enough about mail formats to produce output that includes the mail 
type information, and to apply any necessary Content-Transfer-Encoding.   
Conceptually, "compose" specifies a program that simply outputs the specified 
type of data in its raw form, while "composetyped" specifies a program that 
outputs the data as a MIME object, with all necessary Content-* headers already 
in place.

Line 46, length 621

If this flag is given, the named interpreter needs to interact with the user on 
a terminal.  In some environments (e.g. a window-oriented mail reader under 
X11) this will require the creation of a new terminal emulation window, while 
in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.

Line 49, length 443

This flag should be given whenever the interpreter is capable of producing more 
than a few lines of output on stdout, and does no interaction with the user.  
If the mailcap entry specifies copiousoutput, and pagination has been requested 
via the "\-p" command, then the output of the command being executed will be 
piped through a pagination program ("more" by default, but this can be 
overridden with the METAMAIL_PAGER environment variable).

Line 51, length 762

The metamail program has built-in support for a few key content-types.  In 
particular, it supports the text type, the multipart and multipart/alternative 
type, and the message/rfc822 types.  This support is incomplete for many 
subtypes -- for example, it only supports US-ASCII text in general.  This kind 
of built-in support can be OVERRIDDEN by an entry in any mailcap file on the 
user's search path.  Metamail also has rudimentary built-in support for types 
that are totally unrecognized -- i.e. for which no mailcap entry or built-in 
handler exists.  For such unrecognized types, metamail will write a file with a 
"clean" copy of the data -- i.e. a copy in which all mail headers have been 
removed, and in which any 7-bit transport encoding has been decoded.

Line 53, length 108

$HOME/.mailcap:/etc/mailcap:/usr/share/etc/mailcap:/usr/local/etc/mailcap -- 
default path for mailcap files.


-.-.

Do not use more than two space characters between sentences or (better)
only a new line character.

26:The "command" field is any UNIX command ("cat %s" in the above example), and 
is used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)
40:The "compose" field may be used to specify a program that can be used to 
compose a new body or body part in the given format.  Its intended use is to 
support mail composing agents that support the composition of multiple types of 
mail using external composing agents. As with the view-command, the compose 
command will be executed after replacing certain escape sequences starting with 
"%".  In particular, %s should be replaced by the name of a file to which the 
composed data is to be written by the specified composing program, thus 
allowing the calling program (e.g. metamail) to tell the called program where 
to store the composed data.  If %s does not appear, then the composed data will 
be assumed to be written by the composing programs to standard output.   The 
result of the composing program may be data that is NOT yet suitable for mail 
transport -- that is, a Content-Transfer-Encoding may still need to be applied 
to the data.
42:The "composetyped" field is similar to the "compose" field, but is to be 
used when the composing program needs to specify the Content-type header field 
to be applied to the composed data.  The "compose" field is simpler, and is 
preferred for use with existing (non-mail-oriented) programs for composing data 
in a given format.  The "composetyped" field is necessary when the Content-type 
information must include auxiliary parameters, and the composition program must 
then know enough about mail formats to produce output that includes the mail 
type information, and to apply any necessary Content-Transfer-Encoding.   
Conceptually, "compose" specifies a program that simply outputs the specified 
type of data in its raw form, while "composetyped" specifies a program that 
outputs the data as a MIME object, with all necessary Content-* headers already 
in place.

-.-.

Test nr. 45:

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

26:The "command" field is any UNIX command ("cat %s" in the above example), and 
is used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)
46:If this flag is given, the named interpreter needs to interact with the user 
on a terminal.  In some environments (e.g. a window-oriented mail reader under 
X11) this will require the creation of a new terminal emulation window, while 
in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

Not considered in a patch, too many lines.


mailcap.5:14:Each individual mailcap entry consists of a content-type 
specification, a command to execute, and (possibly) a set of optional "flag" 
values.  For example, a very simple mailcap entry (which is actually a built-in 
default behavior for metamail) would look like this:
mailcap.5:24:The "type" field (text/plain, in the above example) is simply any 
legal content type name, as defined by informational RFC 1524.  In practice, 
this is almost any string.  It is the string that will be matched against the 
"Content\-type" header (or the value passed in with \-c) to decide if this is 
the mailcap entry that matches the current message.  Additionally, the type 
field may specify a subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match 
all subtypes (e.g. "image/*").
mailcap.5:26:The "command" field is any UNIX command ("cat %s" in the above 
example), and is used to specify the interpreter for the given type of message. 
 It will be passed to the shell via the system(3) facility.  Semicolons and 
backslashes within the command must be quoted with backslashes.  If the command 
contains "%s", those two characters will be replaced by the name of a file that 
contains the body of the message. If it contains "%t", those two characters 
will be replaced by the content-type field, including the subtype, if any.  
(That is, if the content-type was "image/pbm; opt1=something-else", then "%t" 
would be replaced by "image/pbm".)   If the command field contains  "%{" 
followed by a parameter name and a closing "}", then all those characters will 
be replaced by the value of the named parameter, if any, from the Content-type 
header.   Thus, in the previous example, "%{opt1}" will be replaced by 
"something-else".  Finally, if the command contains "\\%", those two characters 
will be replaced by a single % character.  (In fact, the backslash can be used 
to quote any character, including itself.)
mailcap.5:30:Two special codes can appear in the viewing command for objects of 
type multipart (any subtype).  These are "%n" and "%F".  %n will be replaced by 
the number of parts within the multipart object.  %F will be replaced by a 
series of arguments, two for each part, giving first the content-type and then 
the name of the temporary file where the decoded part has been stored.  In 
addition, for each file created by %F, a second file is created, with the same 
name followed by "H", which contains the header information for that body part. 
 This will not be needed by most multipart handlers, but it is there if you 
ever need it.  
mailcap.5:32:The "notes=xxx" field is an uninterpreted string that is used to 
specify the name of the person who installed this entry in the mailcap file.  
(The "xxx" may be replaced by any text string.)
mailcap.5:38:The "textualnewlines" field can be used in the rather obscure case 
where metamail's default rules for treating newlines in base64-encoded data are 
unsatisfactory.  By default, metamail will translate CRLF to the local newline 
character in decoded base64 output if the content-type is "text" (any subtype), 
but will not do so otherwise.  A mailcap entry with a field of 
"textualnewlines=1" will force such translation for the specified content-type, 
while "textualnewlines=0" will guarantee that the translation does not take 
place even for textual content-types.
mailcap.5:40:The "compose" field may be used to specify a program that can be 
used to compose a new body or body part in the given format.  Its intended use 
is to support mail composing agents that support the composition of multiple 
types of mail using external composing agents. As with the view-command, the 
compose command will be executed after replacing certain escape sequences 
starting with "%".  In particular, %s should be replaced by the name of a file 
to which the composed data is to be written by the specified composing program, 
thus allowing the calling program (e.g. metamail) to tell the called program 
where to store the composed data.  If %s does not appear, then the composed 
data will be assumed to be written by the composing programs to standard 
output.   The result of the composing program may be data that is NOT yet 
suitable for mail transport -- that is, a Content-Transfer-Encoding may still 
need to be applied to the data.
mailcap.5:46:If this flag is given, the named interpreter needs to interact 
with the user on a terminal.  In some environments (e.g. a window-oriented mail 
reader under X11) this will require the creation of a new terminal emulation 
window, while in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.
mailcap.5:49:This flag should be given whenever the interpreter is capable of 
producing more than a few lines of output on stdout, and does no interaction 
with the user.  If the mailcap entry specifies copiousoutput, and pagination 
has been requested via the "\-p" command, then the output of the command being 
executed will be piped through a pagination program ("more" by default, but 
this can be overridden with the METAMAIL_PAGER environment variable).

-.-.

Lines longer than about(?) 1023 forces a mail program to use quoted-printable
encoding which is bad.  Translater program is unusable.

Line 26, length 1112

The "command" field is any UNIX command ("cat %s" in the above example), and is 
used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)


-.-.

Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.

55:.BR run-mailcap "(1)",
56:.BR mailcap.order "(5)",
57:.BR update-mime "(8)"

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

troff:<stdin>:8: warning: trailing space in the line
troff:<stdin>:30: warning: trailing space in the line
troff:<stdin>:64: warning: trailing space in the line
troff:<stdin>:65: warning: trailing space in the line
troff:<stdin>:66: warning: trailing space in the line
troff:<stdin>:67: warning: trailing space in the line
troff:<stdin>:68: warning: trailing space in the line
troff:<stdin>:69: warning: trailing space in the line
troff:<stdin>:70: warning: trailing space in the line
troff:<stdin>:71: warning: trailing space in the line
troff:<stdin>:72: warning: trailing space in the line
--- mailcap.5   2025-02-13 08:19:52.181902376 +0000
+++ mailcap.5.new       2025-02-13 09:49:37.794320914 +0000
@@ -1,75 +1,288 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
 .TH MAILCAP 5 "Release 2" "Bellcore Prototype"
 .SH NAME
-mailcap - metamail capabilities file
+mailcap \- metamail capabilities file
 .SH DESCRIPTION
 The
 .I mailcap
-file is read by the 
+file is read by the
 .I metamail
 program to determine how to display non-text at the local site.
 
-The syntax of a mailcap file is quite simple, at least compared to termcap 
files.  Any line that starts with "#" is a comment.  Blank lines are ignored.  
Otherwise, each line defines a single mailcap entry for a single content type.  
Long lines may be continued by ending them with a backslash character, \\.
-
-Each individual mailcap entry consists of a content-type specification, a 
command to execute, and (possibly) a set of optional "flag" values.  For 
example, a very simple mailcap entry (which is actually a built-in default 
behavior for metamail) would look like this:
+The syntax of a mailcap file is quite simple,
+at least compared to termcap files.
+Any line that starts with "#" is a comment.
+Blank lines are ignored.
+Otherwise,
+each line defines a single mailcap entry for a single content type.
+Long lines may be continued by ending them with a backslash character,
+\e.
+
+Each individual mailcap entry consists of a content-type specification,
+a
+command to execute,
+and (possibly) a set of optional "flag" values.
+For example,
+a very simple mailcap entry
+(which is actually a built-in default behavior for metamail)
+would look like this:
 
 text/plain; cat %s
 
-The optional flags can be used to specify additional information about the 
mail-handling command.  For example:
+The optional flags can be used to specify additional information about the
+mail-handling command.
+For example:
 
 text/plain; cat %s; copiousoutput
 
-can be used to indicate that the output of the 'cat' command may be 
voluminous, requiring either a scrolling window, a pager, or some other 
appropriate coping mechanism.
-
-The "type" field (text/plain, in the above example) is simply any legal 
content type name, as defined by informational RFC 1524.  In practice, this is 
almost any string.  It is the string that will be matched against the 
"Content\-type" header (or the value passed in with \-c) to decide if this is 
the mailcap entry that matches the current message.  Additionally, the type 
field may specify a subtype (e.g. "text/ISO\-8859\-1") or a wildcard to match 
all subtypes (e.g. "image/*").
-
-The "command" field is any UNIX command ("cat %s" in the above example), and 
is used to specify the interpreter for the given type of message.  It will be 
passed to the shell via the system(3) facility.  Semicolons and backslashes 
within the command must be quoted with backslashes.  If the command contains 
"%s", those two characters will be replaced by the name of a file that contains 
the body of the message. If it contains "%t", those two characters will be 
replaced by the content-type field, including the subtype, if any.  (That is, 
if the content-type was "image/pbm; opt1=something-else", then "%t" would be 
replaced by "image/pbm".)   If the command field contains  "%{" followed by a 
parameter name and a closing "}", then all those characters will be replaced by 
the value of the named parameter, if any, from the Content-type header.   Thus, 
in the previous example, "%{opt1}" will be replaced by "something-else".  
Finally, if the command contains "\\%", those two characters will be replaced 
by a single % character.  (In fact, the backslash can be used to quote any 
character, including itself.)
-
-If no "%s" appears in the command field, then instead of placing the message 
body in a temporary file, metamail will pass the body to the command on the 
standard input.  This is helpful in saving /tmp file space, but can be 
problematic for window-oriented applications under some window systems such as 
MGR.
-
-Two special codes can appear in the viewing command for objects of type 
multipart (any subtype).  These are "%n" and "%F".  %n will be replaced by the 
number of parts within the multipart object.  %F will be replaced by a series 
of arguments, two for each part, giving first the content-type and then the 
name of the temporary file where the decoded part has been stored.  In 
addition, for each file created by %F, a second file is created, with the same 
name followed by "H", which contains the header information for that body part. 
 This will not be needed by most multipart handlers, but it is there if you 
ever need it.  
-
-The "notes=xxx" field is an uninterpreted string that is used to specify the 
name of the person who installed this entry in the mailcap file.  (The "xxx" 
may be replaced by any text string.)
-
-The "test=xxx" field is a command that is executed to determine whether or not 
the mailcap line actually applies.  That is, if the content-type field matches 
the content-type on the message, but a "test=" field is present, then the test 
must succeed before the mailcap line is considered to "match" the message being 
viewed.  The command may be any UNIX command, using the same syntax and the 
same %-escapes as for the viewing command, as described above.  A command is 
considered to succeed if it exits with a zero exit status, and to fail 
otherwise.
-
-The "print=xxx" field is a command that is executed to print the data instead 
of display it interactively.  This behavior is usually a consequence of 
invoking metamail with the "\-h" switch.
-
-The "textualnewlines" field can be used in the rather obscure case where 
metamail's default rules for treating newlines in base64-encoded data are 
unsatisfactory.  By default, metamail will translate CRLF to the local newline 
character in decoded base64 output if the content-type is "text" (any subtype), 
but will not do so otherwise.  A mailcap entry with a field of 
"textualnewlines=1" will force such translation for the specified content-type, 
while "textualnewlines=0" will guarantee that the translation does not take 
place even for textual content-types.
-
-The "compose" field may be used to specify a program that can be used to 
compose a new body or body part in the given format.  Its intended use is to 
support mail composing agents that support the composition of multiple types of 
mail using external composing agents. As with the view-command, the compose 
command will be executed after replacing certain escape sequences starting with 
"%".  In particular, %s should be replaced by the name of a file to which the 
composed data is to be written by the specified composing program, thus 
allowing the calling program (e.g. metamail) to tell the called program where 
to store the composed data.  If %s does not appear, then the composed data will 
be assumed to be written by the composing programs to standard output.   The 
result of the composing program may be data that is NOT yet suitable for mail 
transport -- that is, a Content-Transfer-Encoding may still need to be applied 
to the data.
-
-The "composetyped" field is similar to the "compose" field, but is to be used 
when the composing program needs to specify the Content-type header field to be 
applied to the composed data.  The "compose" field is simpler, and is preferred 
for use with existing (non-mail-oriented) programs for composing data in a 
given format.  The "composetyped" field is necessary when the Content-type 
information must include auxiliary parameters, and the composition program must 
then know enough about mail formats to produce output that includes the mail 
type information, and to apply any necessary Content-Transfer-Encoding.   
Conceptually, "compose" specifies a program that simply outputs the specified 
type of data in its raw form, while "composetyped" specifies a program that 
outputs the data as a MIME object, with all necessary Content-* headers already 
in place.
+can be used to indicate that the output of the 'cat' command may be
+voluminous,
+requiring either a scrolling window,
+a pager,
+or some other appropriate coping mechanism.
+
+The "type" field
+(text/plain,
+in the above example)
+is simply any valid content type name,
+as defined by informational RFC 1524.
+In practice,
+this is almost any string.
+It is the string
+that will be matched against the "Content\-type" header
+(or the value passed in with \-c)
+to decide
+if this is the mailcap entry
+that matches the current message.
+Additionally,
+the type field may specify a subtype
+(e.g.,
+"text/ISO\-8859\-1")
+or a wildcard to match all subtypes (e.g.,
+"image/*").
+
+The "command" field is any UNIX command
+("cat %s" in the above example),
+and is used to specify the interpreter for the given type of message.
+It will be passed to the shell via the system(3) facility.
+Semicolons
+and backslashes within the command must be quoted with backslashes.
+If the command contains "%s",
+those two characters will be replaced by the name of a file
+that contains the body of the message.
+If it contains "%t",
+those two characters will be replaced by the content-type field,
+including the subtype,
+if any.
+(That is,
+if the content-type was "image/pbm;
+opt1=something-else",
+then "%t" would be replaced by "image/pbm".)
+If the command field contains "%{" followed by a parameter name
+and a closing "}",
+then all those characters will be replaced by the value of the named
+parameter,
+if any,
+from the Content-type header.
+Thus,
+in the previous example,
+"%{opt1}" will be replaced by "something-else".
+Finally,
+if the command contains "\e%",
+those two characters will be replaced by a single % character.
+(In fact,
+the backslash can be used to quote any character,
+including itself.)
+
+If no "%s" appears in the command field,
+then instead of placing the message body in a temporary file,
+metamail will pass the body to the command on the standard input.
+This is helpful in saving /tmp file space,
+but can be problematic for window-oriented applications under some window
+systems such as MGR.
+
+Two special codes can appear in the viewing command for objects of type
+multipart
+(any subtype).
+These are "%n" and "%F".
+%n will be replaced by the number of parts within the multipart object.
+%F will be replaced by a series of arguments,
+two for each part,
+giving first the content-type
+and then the name of the temporary file
+where the decoded part has been stored.
+In addition,
+for each file created by %F,
+a second file is created,
+with the same name followed by "H",
+which contains the header information for that body part.
+This will not be needed by most multipart handlers,
+but it is there if you ever need it.
+
+The "notes=xxx" field is an uninterpreted string
+that is used to specify the name of the person
+who installed this entry in the mailcap file.
+(The "xxx" may be replaced by any text string.)
+
+The "test=xxx" field is a command
+that is executed to determine
+whether or not the mailcap line actually applies.
+That is,
+if the content-type field matches the content-type on the message,
+but a "test=" field is present,
+then the test must succeed
+before the mailcap line is considered to "match" the message being viewed.
+The command may be any UNIX command,
+using the same syntax
+and the same %-escapes as for the viewing command,
+as described above.
+A command is considered to succeed
+if it exits with a zero exit status,
+and to fail otherwise.
+
+The "print=xxx" field is a command
+that is executed to print the data instead of display it interactively.
+This behavior is usually a consequence of invoking metamail with the
+"\-h" switch.
+
+The "textualnewlines" field can be used in the rather obscure case
+where metamail's default rules for treating newlines in base64-encoded
+data are unsatisfactory.
+By default,
+metamail will translate CRLF to the local newline character in decoded
+base64 output
+if the content-type is "text"
+(any subtype),
+but will not do so otherwise.
+A mailcap entry with a field of "textualnewlines=1" will force such
+translation for the specified content-type,
+while "textualnewlines=0" will guarantee
+that the translation does not take place even for textual content-types.
+
+The "compose" field may be used to specify a program
+that can be used to compose a new body
+or body part in the given format.
+Its intended use is to support mail composing agents
+that support the composition of multiple types of mail using external
+composing agents.
+As with the view-command,
+the compose command will be executed after replacing certain escape
+sequences starting with "%".
+In particular,
+%s should be replaced by the name of a file
+to which the composed data is to be written by the specified composing
+program,
+thus allowing the calling program
+(e.g. metamail)
+to tell the called program
+where to store the composed data.
+If %s does not appear,
+then the composed data will be assumed to be written by the composing
+programs to standard output.
+The result of the composing program may be data
+that is NOT yet suitable for mail transport \(en that is,
+a Content-Transfer-Encoding may still need to be applied to the data.
+
+The "composetyped" field is similar to the "compose" field,
+but is to be used
+when the composing program needs to specify the Content-type header field
+to be applied to the composed data.
+The "compose" field is simpler,
+and is preferred for use with existing
+(non-mail-oriented)
+programs for composing data in a given format.
+The "composetyped" field is necessary
+when the Content-type information must include auxiliary parameters,
+and the composition program must then know enough about mail formats to
+produce output
+that includes the mail type information,
+and to apply any necessary Content-Transfer-Encoding.
+Conceptually,
+"compose" specifies a program
+that simply outputs the specified type of data in its raw form,
+while "composetyped" specifies a program
+that outputs the data as a MIME object,
+with all necessary Content-* headers already in place.
 
 .TP 8
 .B needsterminal
-If this flag is given, the named interpreter needs to interact with the user 
on a terminal.  In some environments (e.g. a window-oriented mail reader under 
X11) this will require the creation of a new terminal emulation window, while 
in most environments it will not.  If the mailcap entry specifies 
"needsterminal" and metamail is not running on a terminal (as determined by 
isatty(3), the \-x option, and the MM_NOTTTY environment variable) then 
metamail will try to run the command in a new terminal emulation window.  
Currently, metamail knows how to create new windows under the X11, SunTools, 
and WM window systems.
+If this flag is given,
+the named interpreter needs to interact with the user on a terminal.
+In some environments
+(e.g., a window-oriented mail reader under X11)
+this will require the creation of a new terminal emulation window,
+while in most environments it will not.
+If the mailcap entry specifies "needsterminal"
+and metamail is not running on a terminal
+(as determined by
+.BR isatty (3),
+the \-x option,
+and the MM_NOTTTY environment variable)
+then metamail will try to run the command in a new terminal emulation
+window.
+Currently,
+metamail knows how to create new windows under the X11,
+SunTools,
+and WM window systems.
 .TP 8
 .B copiousoutput
-This flag should be given whenever the interpreter is capable of producing 
more than a few lines of output on stdout, and does no interaction with the 
user.  If the mailcap entry specifies copiousoutput, and pagination has been 
requested via the "\-p" command, then the output of the command being executed 
will be piped through a pagination program ("more" by default, but this can be 
overridden with the METAMAIL_PAGER environment variable).
+This flag should be given
+whenever the interpreter is capable of producing more than a few lines of
+output on stdout,
+and does no interaction with the user.
+If the mailcap entry specifies copiousoutput,
+and pagination has been requested via the "\-p" command,
+then the output of the command being executed will be piped through a
+pagination program
+("more" by default,
+but this can be overridden with the METAMAIL_PAGER environment variable).
 .SH BUILT-IN CONTENT-TYPE SUPPORT
-The metamail program has built-in support for a few key content-types.  In 
particular, it supports the text type, the multipart and multipart/alternative 
type, and the message/rfc822 types.  This support is incomplete for many 
subtypes -- for example, it only supports US-ASCII text in general.  This kind 
of built-in support can be OVERRIDDEN by an entry in any mailcap file on the 
user's search path.  Metamail also has rudimentary built-in support for types 
that are totally unrecognized -- i.e. for which no mailcap entry or built-in 
handler exists.  For such unrecognized types, metamail will write a file with a 
"clean" copy of the data -- i.e. a copy in which all mail headers have been 
removed, and in which any 7-bit transport encoding has been decoded.
+The metamail program has built-in support for a few key content-types.
+In particular,
+it supports the text type,
+the multipart
+and multipart/alternative type,
+and the message/rfc822 types.
+This support is incomplete for many subtypes \(en for example,
+it only supports US-ASCII text in general.
+This kind of built-in support can be OVERRIDDEN by an entry in any
+mailcap file on the user's search path.
+Metamail also has rudimentary built-in support for types
+that are totally unrecognized \(en i.e.,
+for which no mailcap entry
+or built-in handler exists.
+For such unrecognized types,
+metamail will write a file with a "clean" copy of the data \(en i.e.,
+a copy in which all mail headers have been removed,
+and in which any 7-bit transport encoding has been decoded.
 .SH FILES
-$HOME/.mailcap:/etc/mailcap:/usr/share/etc/mailcap:/usr/local/etc/mailcap -- 
default path for mailcap files.
+$HOME/.mailcap:/etc/mailcap:/\:usr/\:share/\:etc/\:mailcap:/\:usr/\:local/\:etc/\:mailcap
+\(en default path for mailcap files.
 .SH SEE ALSO
-.BR run-mailcap "(1)",
-.BR mailcap.order "(5)",
-.BR update-mime "(8)"
+.BR run-mailcap (1),
+.BR mailcap.order (5),
+.BR update-mime (8)
 
 RFC 1524 (<http://tools.ietf.org/html/rfc1524>)
 
 .SH COPYRIGHT
-Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+Copyright (c) 1991 Bell Communications Research,
+Inc.\& (Bellcore)
 
-Permission to use, copy, modify, and distribute this material 
-for any purpose and without fee is hereby granted, provided 
-that the above copyright notice and this permission notice 
-appear in all copies, and that the name of Bellcore not be 
-used in advertising or publicity pertaining to this 
-material without the specific, prior written permission 
-of an authorized representative of Bellcore.  BELLCORE 
-MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
-OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+Permission to use,
+copy,
+modify,
+and distribute this material
+for any purpose and without fee is hereby granted,
+provided
+that the above copyright notice
+and this permission notice appear in all copies,
+and that the name of Bellcore not be used in advertising
+or publicity pertaining to this material without the specific,
+prior written permission of an authorized representative of Bellcore.
+BELLCORE MAKES NO REPRESENTATIONS ABOUT THE ACCURACY
+OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE.
+IT IS PROVIDED "AS IS",
 WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
 .SH AUTHOR
-Nathaniel S. Borenstein
+Nathaniel S.\& Borenstein
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Line length should thus be reduced.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  See man-pages(7), item "semantic newline".

-.-

The difference between the formatted output of the original and patched file
can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -d -u <out1> <out2>

and for groff, using

\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output from 'diff -d -u ...' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option \"-warnings=w\"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT=\"-ww -b -z\"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-

Reply via email to