Package: bin86
Version: 0.16.17-3.10
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?


an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
<stdin>:2: Content of macro 'BY' is Bruce Evans
an.tmac:<stdin>:7: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
troff:<stdin>:132: 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.17-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.41-4

bin86 recommends no packages.

bin86 suggests no packages.

-- no debconf information
Input file is ld86.1

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

      1 skipping unknown macro: .BY Bruce Evans
      1 whitespace at end of input line


Remove trailing space with: sed -e 's/  *$//'

-.-.

Output from "test-nroff -mandoc -t -ww -z ld86.1": (shortened list)

      1         Use macro '.B' for one argument or split argument.
      1 .BR is for at least 2 arguments, got 1
      1 Content of macro 'BY' is Bruce Evans
      1 trailing space in the line


Remove trailing space with: sed -e 's/  *$//'

-.-.

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

1

-.-.

Change (or include a "FIXME" paragraph about) misused SI (metric)
numeric prefixes (or names) to the binary ones, like Ki (kibi), Mi
(mebi), Gi (gibi), or Ti (tebi), if indicated.
If the metric prefixes are correct, add the definitions or an
explanation to avoid misunderstanding.

147:segments of a size >64k, now only i386 executables may have segments

N.B. >64k changed to >\~64\~KiB
-.-.

Add a (no-break, "\ " or "\~") space between a number and a unit,
as these are not one entity.

8:.RB [ -03MNdimrstyz [-]]
147:segments of a size >64k, now only i386 executables may have segments

-.-.

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.

8:.RB [ -03MNdimrstyz [-]]
9:.RB [ -llib_extension ]
10:.RB [ -o\ outfile ]
11:.RB [ -Ccrtfile ]
12:.RB [ -Llibdir ]
13:.RB [ -Olibfile ]
14:.RB [ -Ttextaddr ]
15:.RB [ -Hheapsize ]
16:.RB [ -Ddataaddr ]
24:.B -0
33:.B -0
35:.\"and use library subdir i86 for -lx
37:.B -3
39:.\"and use library subdir i386 for -lx
41:.B -d
43:effect this also includes -s as there's nowhere to put a symbol table.
45:.B -Cx
48:.B -D
51:.B -H
54:.B -Lx
57:.B -M
60:.B -N
63:.B -z
66:.B -Ox
69:.B -T
72:.B -i
75:.B -lx
78:.B -m
81:.B -o
84:.B -s
87:.B -r
89:given the -N option also the output format will be the hosts native format
92:.B -t
95:.B -y
99:.B -z
103:option letter by a '-', as for cc1.
144:The 6809 version does not support -i.
157:.B -r

-.-.

Wrong distance (not two spaces) 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.

Split (sometimes) lines after a punctuation mark; before a conjunction.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

42:delete the header from the output file, used for MSDOS COM files. As a side
61:Create a native Linux OMAGIC output file. If the contents are i386 code the
62:binary can be either linked by GCC or executed by linux. If the
118:and the start of the data segment in 16 byte 'paragraphs'. Note this is
124:The lowest address with data in segment 'X'. (eg __seg0DL is for segment 
zero
132:The bottom of segment 'X's 'common data' or uninitialized data area. Each 
153:instructions in the object file. Unlike previous versions the current one

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

5:ld86 \- Linker for as86(1)

-.-.

Use the name of units in text; use symbols in tables and
calculations.
The rule is to have a (no-break, \~) space between a number and
its units (see "www.bipm.org/en/publications/si-brochure")

125:or the text segment, __seg3DL is for the data segment)
147:segments of a size >64k, now only i386 executables may have segments

-.-.

Split a punctuation from a single argument, if a two-font macro is meant.

17:.B infile...

-.-.

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

ld86.1:49:data base address follows (in format suitable for strtoul)
ld86.1:52:the top of heap (initial stack) address (in format suitable for 
strtoul)
ld86.1:70:text base address follows (in format suitable for strtoul)

-.-.

Only one space character after a possible end of sentence
(after a punctuation, that can end a sentence).

ld86.1:42:delete the header from the output file, used for MSDOS COM files. As 
a side
ld86.1:61:Create a native Linux OMAGIC output file. If the contents are i386 
code the
ld86.1:62:binary can be either linked by GCC or executed by linux. If the
ld86.1:118:and the start of the data segment in 16 byte 'paragraphs'. Note this 
is
ld86.1:124:The lowest address with data in segment 'X'. (eg __seg0DL is for 
segment zero
ld86.1:132:The bottom of segment 'X's 'common data' or uninitialized data area. 
Each 
ld86.1:153:instructions in the object file. Unlike previous versions the 
current one

-.-.

Put a subordinate sentence (after a comma) on a new line.

ld86.1:42:delete the header from the output file, used for MSDOS COM files. As 
a side
ld86.1:88:Generate a relocatable object from one source object, if the linker is
ld86.1:103:option letter by a '-', as for cc1.
ld86.1:125:or the text segment, __seg3DL is for the data segment)
ld86.1:147:segments of a size >64k, now only i386 executables may have segments

-.-.

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

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
<stdin>:2: Content of macro 'BY' is Bruce Evans
an.tmac:<stdin>:7: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
troff:<stdin>:132: warning: trailing space in the line

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- ld86.1      2025-03-17 13:29:05.343894794 +0000
+++ ld86.1.new  2025-03-17 14:05:53.617052160 +0000
@@ -1,27 +1,30 @@
+.de BY
+Written by \\$*
+..
 .TH ld86 1 "Apr, 1997"
 .BY Bruce Evans
 .nh
 .SH NAME
 ld86 \- Linker for as86(1)
 .SH SYNOPSIS
-.BR ld86
-.RB [ -03MNdimrstyz [-]]
-.RB [ -llib_extension ]
-.RB [ -o\ outfile ]
-.RB [ -Ccrtfile ]
-.RB [ -Llibdir ]
-.RB [ -Olibfile ]
-.RB [ -Ttextaddr ]
-.RB [ -Hheapsize ]
-.RB [ -Ddataaddr ]
-.B infile...
+.B ld86
+.RB [ \-03MNdimrstyz [\-]]
+.RB [ \-l\fIlib_extension\fP ]
+.RB [ \-o\ \fIoutfile\fP ]
+.RB [ \-C\fIcrtfile\fP ]
+.RB [ \-L\fIlibdir\fP ]
+.RB [ \-O\fIlibfile\fP ]
+.RB [ \-T\fItextaddr\fP ]
+.RB [ \-H\fIheapsize\fP ]
+.RB [ \-D\fIdataaddr\fP ]
+.B infile ...
 
 .SH DESCRIPTION
 This linker understands only the object files produced by the as86 assembler,
 it can link them into either an impure or a separate I&D executable.
 
 The linking defaults are everything off or none except for
-.B -0
+.B \-0
 and the output file is
 .BR a.out .
 There is
@@ -30,77 +33,95 @@ a standard library location defined in t
 
 .SH OPTIONS
 .TP
-.B -0
+.B \-0
 produce header with 16-bit magic
-.\"and use library subdir i86 for -lx
+.\"and use library subdir i86 for \-lx
 .TP
-.B -3
+.B \-3
 produce header with 32-bit magic
-.\"and use library subdir i386 for -lx
+.\"and use library subdir i386 for \-lx
 .TP
-.B -d
-delete the header from the output file, used for MSDOS COM files. As a side
-effect this also includes -s as there's nowhere to put a symbol table.
+.B \-d
+delete the header from the output file,
+used for MSDOS COM files.
+As a side effect this also includes \-s
+as there's nowhere to put a symbol table.
+.TP
+.BI \-C x
+add file
+.I libdir-from-search/crtx.o
+to list of files linked
+.TP
+.B \-D
+data base address follows
+(in format suitable for strtoul)
+.TP
+.B \-H
+the top of heap (initial stack) address
+(in format suitable for strtoul)
+.TP
+.BI \-L x
+add dir name
+.I x
+to the head of the list of library dirs searched
 .TP
-.B -Cx
-add file libdir-from-search/crtx.o to list of files linked
-.TP
-.B -D
-data base address follows (in format suitable for strtoul)
-.TP
-.B -H
-the top of heap (initial stack) address (in format suitable for strtoul)
-.TP
-.B -Lx
-add dir name x to the head of the list of library dirs searched
-.TP
-.B -M
+.B \-M
 print symbols linked on stdout
 .TP
-.B -N
-Create a native Linux OMAGIC output file. If the contents are i386 code the
-binary can be either linked by GCC or executed by linux. If the
-.B -z
+.B \-N
+Create a native Linux OMAGIC output file.
+If the contents are i386 code the binary can be either linked by GCC
+or executed by linux.
+If the
+.B \-z
 option is also included the linker can generate a QMAGIC executable.
 .TP
-.B -Ox
-add library or object file libdir-from-search/x to list of files linked
-.TP
-.B -T
-text base address follows (in format suitable for strtoul)
+.BI \-O x
+add library or object file
+.I libdir-from-search/x
+to list of files linked
+.TP
+.B \-T
+text base address follows
+(in format suitable for strtoul)
 .TP
-.B -i
+.B \-i
 separate I&D output
 .TP
-.B -lx
-add library libdir-from-search/libx.a to list of files linked
+.BI \-l x
+add library
+.I libdir-from-search/libx.a
+to list of files linked
 .TP
-.B -m
+.B \-m
 print modules linked on stdout
 .TP
-.B -o
+.B \-o
 output file name follows
 .TP
-.B -s
+.B \-s
 strip symbols
 .TP
-.B -r
-Generate a relocatable object from one source object, if the linker is
-given the -N option also the output format will be the hosts native format
+.B \-r
+Generate a relocatable object from one source object,
+if the linker is given the \-N option also
+the output format will be the hosts native format
 if possible.
 .TP
-.B -t
+.B \-t
 trace modules being looked at on stdout
 .TP
-.B -y
-Alter the symbol tables to add label 'extensions' so that labels with
+.B \-y
+Alter the symbol tables to add label 'extensions'
+so that labels with
 more than 8 characters can be stored in elks executables.
 .TP
-.B -z
+.B \-z
 produce "unmapped zero page" or "QMAGIC" executables
 .P
 All the options not taking an argument may be turned off by following the
-option letter by a '-', as for cc1.
+option letter by a '\-',
+as for cc1.
 .SH PREDEFINED LABELS
 The linker predefines several labels that can be imported into user programs.
 .TP
@@ -115,22 +136,28 @@ Standard C variable for the end of the b
 .TP
 .B __segoff
 The offset within the executable file between the start of the text segment
-and the start of the data segment in 16 byte 'paragraphs'. Note this is
+and the start of the data segment in 16 byte 'paragraphs'.
+Note this is
 .B zero
-for impure (tiny model) executables and is adjusted for executables that
-don't start at offset 0 within the segment.
+for impure (tiny model) executables
+and is adjusted for executables
+that don't start at offset 0 within the segment.
 .TP
 .B __segXDL
-The lowest address with data in segment 'X'. (eg __seg0DL is for segment zero
-or the text segment, __seg3DL is for the data segment)
+The lowest address with data in segment 'X'.
+(e.g.\& __seg0DL is for segment zero
+or the text segment,
+__seg3DL is for the data segment)
 The value 'X' is a hex digit.
 .TP
 .B __segXDH
 The top of segment 'X's data area.
 .TP
 .B __segXCL
-The bottom of segment 'X's 'common data' or uninitialized data area. Each 
-segment has both an initialized and uninitialized data area.
+The bottom of segment 'X's 'common data'
+or uninitialized data area.
+Each segment has both an initialized
+and uninitialized data area.
 .TP
 .B __segXCH
 The top of segment 'X's common area.
@@ -141,18 +168,21 @@ in 'paragraphs'.
 
 .SH HISTORY
 
-The 6809 version does not support -i.
+The 6809 version does not support \-i.
 
 The previous versions of the linker could produce an 8086 executable with
-segments of a size >64k, now only i386 executables may have segments
-this large.
+segments of a size >\~64\~KiB,
+now only i386 executables may have segments this large.
 
 .SH BUGS
 The linker cannot deal with reverse seeks caused by
 .B org
-instructions in the object file. Unlike previous versions the current one
-traps the error rather than trying to fill up the hard disk.
-
-The linker produces a broken a.out object file if given one input and the
-.B -r
+instructions in the object file.
+Unlike previous versions
+the current one traps the error
+rather than trying to fill up the hard disk.
+
+The linker produces a broken a.out object file
+if given one input and the
+.B \-r
 option this is so it is compatible with pre-dev86 versions.
  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.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

  Not beginning each input sentence on a new line.
Line length and patch size 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