Package: bin86
Version: 0.16.17-3.9
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with

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

  ["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?

<stdin>:2: Content of macro 'BY' is Shyamal Prasad <[email protected]>
troff: backtrace: file '<stdin>':19
troff:<stdin>:19: warning: trailing space in the line
troff: backtrace: file '<stdin>':24
troff:<stdin>:24: warning: trailing space in the line
troff: backtrace: file '<stdin>':82
troff:<stdin>:82: warning: trailing space in the line
troff: backtrace: file '<stdin>':108
troff:<stdin>:108: warning: trailing space in the line
troff: backtrace: file '<stdin>':131
troff:<stdin>:131: warning: trailing space in the line
troff: backtrace: file '<stdin>':135
troff:<stdin>:135: warning: trailing space in the line
troff: backtrace: file '<stdin>':146
troff:<stdin>:146: 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.11.2-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 bin86 depends on:
ii  libc6  2.40-3

bin86 recommends no packages.

bin86 suggests no packages.

-- no debconf information
  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

-.-

  So any 'generator' should check its products with the above mentioned
'groff', 'mandoc',  and additionally with 'nroff ...'.

  This is just a simple quality control measure.

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

  Common defects:

  Input text line longer than 80 bytes.

  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.
Lines should thus be shorter.

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

-.-

The difference between the formatted outputs can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -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 of 'diff -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)

-.-.

Output from "mandoc -T lint ar86.1": (possibly shortened list)

mandoc: ar86.1:2:2: ERROR: skipping unknown macro: .BY Shyamal Prasad 
<[email protected]>
mandoc: ar86.1:9:12: STYLE: whitespace at end of input line
mandoc: ar86.1:15:12: STYLE: whitespace at end of input line
mandoc: ar86.1:19:4: STYLE: whitespace at end of input line
mandoc: ar86.1:20:9: STYLE: whitespace at end of input line
mandoc: ar86.1:24:4: STYLE: whitespace at end of input line
mandoc: ar86.1:30:2: WARNING: skipping paragraph macro: PP empty
mandoc: ar86.1:70:2: WARNING: skipping paragraph macro: PP empty
mandoc: ar86.1:82:68: STYLE: whitespace at end of input line
mandoc: ar86.1:88:6: STYLE: whitespace at end of input line
mandoc: ar86.1:108:10: STYLE: whitespace at end of input line
mandoc: ar86.1:131:6: STYLE: whitespace at end of input line
mandoc: ar86.1:135:2: STYLE: whitespace at end of input line
mandoc: ar86.1:142:15: STYLE: whitespace at end of input line
mandoc: ar86.1:146:58: STYLE: whitespace at end of input line
mandoc: ar86.1:147:9: STYLE: whitespace at end of input line

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

9:.B archive 
15:.B archive 
19:The 
20:.B ar86 
24:The 
82:member). If any files are specified they will be replaced as if the 
88:.B u 
108:option to 
131:table 
142:.BR as86 (1), 
146:\(co 1988, 1990 Free Software Foundation Inc. Changes for 
147:.B ar86 

-.-.

Use the correct macro for the font change of a single argument or
split the argument into two.

12:.BR ar86

-.-.

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.

27:specified as the first option. If the operation is positional then the
28:next option is the archive member marking the position. This is
38:\fImove\fR the named files. By default files are moved to the end of
42:\fIprint\fP the contents of archive members to standard out. If a file
43:list is included only those members are printed. If the \fBv\fR
51:to see if they already exist in the archive. This operation will
52:ignore any positional modifiers. Creates the archive file if it does
56:\fIreplace\fR archive members with the files listed. If the file name
58:(or to any explicitly specified position). Creates the archive file if
62:\fItable\fR; list the file names of archive members. If a file list is
68:directory. If no files are specified all the archive members will be
82:member). If any files are specified they will be replaced as if the 
84:operation had been specified. If no symbol definition section exists
85:one is created. This option will also creates the archive file if it
92:operation. The files are added to the archive in exactly the same
97:being added. Note that this modifier acts as if a
107:to or added. If any of these modifiers are specified then the second
146:\(co 1988, 1990 Free Software Foundation Inc. Changes for 
151:Prasad <[email protected]>. It is distributed under the terms of

-.-.

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

<stdin>:2: Content of macro 'BY' is Shyamal Prasad <[email protected]>
troff: backtrace: file '<stdin>':19
troff:<stdin>:19: warning: trailing space in the line
troff: backtrace: file '<stdin>':24
troff:<stdin>:24: warning: trailing space in the line
troff: backtrace: file '<stdin>':82
troff:<stdin>:82: warning: trailing space in the line
troff: backtrace: file '<stdin>':108
troff:<stdin>:108: warning: trailing space in the line
troff: backtrace: file '<stdin>':131
troff:<stdin>:131: warning: trailing space in the line
troff: backtrace: file '<stdin>':135
troff:<stdin>:135: warning: trailing space in the line
troff: backtrace: file '<stdin>':146
troff:<stdin>:146: warning: trailing space in the line

-.-.
--- ar86.1      2024-10-21 02:33:16.865939693 +0000
+++ ar86.1.new  2024-10-21 09:51:46.471520578 +0000
@@ -1,3 +1,6 @@
+.de BY\" Guessed content
+Written by \\$*.
+..
 .TH ar86 1 "May, 2006"
 .BY Shyamal Prasad <[email protected]>
 .nh
@@ -6,28 +9,28 @@ ar86 \- Create, modify, and extract from
 .SH SYNOPSIS
 .B ar86
 .I operation
-.B archive 
+.B archive
 .RI [ file... ]
 .PP
-.BR ar86
+.B ar86
 .I positional\-op
 .B  member
-.B archive 
+.B archive
 .RI [ file ...]
 
 .SH DESCRIPTION
-The 
-.B ar86 
+The
+.B ar86
 program is used to create, examine and modify archive files produced
 by the Dev86/ELKS toolchain.
 .SH OPTIONS
-The 
+The
 .B ar86
 command requires that the operation to be performed on the archive be
-specified as the first option. If the operation is positional then the
-next option is the archive member marking the position. This is
-followed by the archive file name and any list of file names.
-.PP
+specified as the first option.
+If the operation is positional then the
+next option is the archive member marking the position.
+This is followed by the archive file name and any list of file names.
 .SS Operations
 One of the following operations can be specified
 .TP
@@ -35,39 +38,43 @@ One of the following operations can be s
 \fIdelete\fR the listed files from the archive.
 .TP
 .B m
-\fImove\fR the named files. By default files are moved to the end of
-the archive unless a positional modifier is present.
+\fImove\fR the named files.
+By default files are moved to the end of the archive
+unless a positional modifier is present.
 .TP
 .B p
-\fIprint\fP the contents of archive members to standard out. If a file
-list is included only those members are printed. If the \fBv\fR
-modifier is present each file's contents are preceded by a new line,
+\fIprint\fP the contents of archive members to standard out.
+If a file list is included only those members are printed.
+If the \fBv\fR modifier is present
+each file's contents are preceded by a new line,
 a line with the string \fBmember\fR, a space character, the member
 name, and two following newlines.
 .TP
 .B q
 .I quickly
 add the files to the end of the archive without checking
-to see if they already exist in the archive. This operation will
-ignore any positional modifiers. Creates the archive file if it does
-not exist.
+to see if they already exist in the archive.
+This operation will ignore any positional modifiers.
+Creates the archive file if it does not exist.
 .TP
 .B r
-\fIreplace\fR archive members with the files listed. If the file name
-is not present in the archive it is added to the end of the archive
-(or to any explicitly specified position). Creates the archive file if
-it does not exist.
+\fIreplace\fR archive members with the files listed.
+If the file name is not present in the archive
+it is added to the end of the archive
+(or to any explicitly specified position).
+Creates the archive file if it does not exist.
 .TP
 .B t
-\fItable\fR; list the file names of archive members. If a file list is
-present only those files that are present in the archive are listed.
+\fItable\fR;
+list the file names of archive members.
+If a file list is present
+only those files that are present in the archive are listed.
 The \fBv\fR modifier prints member attributes.
 .TP
 .B x
 \fIextract\fR the named files from the archive into the current
-directory. If no files are specified all the archive members will be
-extracted.
-.P
+directory.
+If no files are specified all the archive members will be extracted.
 .SS Modifiers
 The following modifiers may be used with the operations
 .TP
@@ -79,22 +86,24 @@ extracted files when possible.
 \fIsymbol\fR update; this option may be used by itself to force an
 update to the symbol definition section of the archive (the
 .B __.SYMDEF
-member). If any files are specified they will be replaced as if the 
+member).
+If any files are specified they will be replaced as if the
 .B r
-operation had been specified. If no symbol definition section exists
-one is created. This option will also creates the archive file if it
-does not exist.
+operation had been specified.
+If no symbol definition section exists one is created.
+This option will also create the archive file if it does not exist.
 .TP
-.B u 
+.B u
 \fIupdate\fR files in the archive during a
 .B r
 .RI ( replace )
-operation. The files are added to the archive in exactly the same
-manner as
+operation.
+The files are added to the archive in exactly the same manner as
 .I replace
 except that an existing archive member will be retained (in its
 original position) if it has a modified more recently than the file
-being added. Note that this modifier acts as if a
+being added.
+Note that this modifier acts as if a
 .B r
 operation has been specified (even it has not), and will actually
 override any other previously specified operation.
@@ -104,8 +113,9 @@ override any other previously specified
 the archive.
 .SS Positional Modifiers
 The following modifiers specify where in the archive files are moved
-to or added. If any of these modifiers are specified then the second
-option to 
+to or added.
+If any of these modifiers are specified then the second
+option to
 .B ar86
 must be the name of an archive member.
 .TP
@@ -128,26 +138,28 @@ To add some files to an archive
 ar86 r libfile.a file1.o file2.o
 .PP
 to add some files after a member named mem.o and to update the symbol
-table 
+table
 .IP
 ar86 rsa mem.o libfile.a file1.o file2.o
 .SH BUGS
-A 
+A
 .B l
 modifier will be accepted but ignored.
 .SH RESTRICTIONS
 This command is intended for use only with object files created using
 the Dev86/ELKS toolchain.
 .SH "SEE ALSO"
-.BR as86 (1), 
+.BR as86 (1),
 .BR bcc (1),
 .BR ld86 (1)
 .SH AUTHORS
-\(co 1988, 1990 Free Software Foundation Inc. Changes for 
-.B ar86 
+\(co 1988, 1990 Free Software Foundation Inc.
+Changes for
+.B ar86
 by Greg Haerr <[email protected]>.
 .SH COPYRIGHT
 The manual page was written for Debian GNU/Linux, \(co 2006 Shyamal
-Prasad <[email protected]>. It is distributed under the terms of
+Prasad <[email protected]>.
+It is distributed under the terms of
 the GNU General Public License version 2 (or any later version
 released by the Free Software Foundation).

Reply via email to