Package: x11-xserver-utils
Version: 7.7+10+b1
Severity: minor
Tags: patch

Dear Maintainer,

   * What led up to the situation?

     Checking for defects with

[test-][g|n]roff -mandoc -t -K utf8 -ww -b -z <man page>

  [test-groff is a script in the repository for "groff"]

   * What was the outcome of this action?

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':562: macro 'B'
troff: backtrace: file '<stdin>':97
troff:<stdin>:97: warning: ignoring escape character before '+'

   * What outcome did you expect instead?

     No output (warnings).

-.-

  Remarks and a patch are in the attachments.

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

Kernel: Linux 6.7.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 x11-xserver-utils depends on:
ii  cpp          4:13.2.0-7
ii  libc6        2.38-11
ii  libice6      2:1.0.10-1+b1
ii  libx11-6     2:1.8.7-1+b1
ii  libxaw7      2:1.0.14-1+b2
ii  libxcursor1  1:1.2.1-1+b1
ii  libxext6     2:1.3.4-1+b1
ii  libxi6       2:1.8.1-1
ii  libxmu6      2:1.1.3-3+b2
ii  libxmuu1     2:1.1.3-3+b2
ii  libxrandr2   2:1.5.4-1
ii  libxt6t64    1:1.2.1-1.2
ii  libxxf86vm1  1:1.1.4-1+b2

x11-xserver-utils recommends no packages.

Versions of packages x11-xserver-utils suggests:
pn  cairo-5c        <none>
pn  nickle          <none>
ii  xorg-docs-core  1:1.7.1-1.2

-- no debconf information
  Any program (person), that produces man pages, should check its content for
defects by using

groff -mandoc -t -ww -b -z [ -K utf8 | k ] <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' 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.

-.-

The difference between the formatted outputs can be seen with:

  nroff -man <file1> > <out1>
  nroff -man <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

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

instead of "nroff -man"

  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 -z"

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

-.-.

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

mandoc: xhost.1:97:4: WARNING: undefined escape, printing literally: \+
mandoc: xhost.1:171:2: WARNING: skipping paragraph macro: PP after SH

-.-.

Input file is xhost.1

Wrong distance between sentences.

  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.

137:Otherwise they are assumed to be Internet addresses. If compiled to support
141:The local family specifies all the local connections at once. However,
143:used to specify a single local user. (See the
149:with a value of \fIalmas\fP.   For more information on the available forms

-.-.

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

149:with a value of \fIalmas\fP.   For more information on the available forms

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).  Here the tradition is to use italic/roman.

150:of server interpreted addresses, see the \fIXsecurity\fP(7)
155:\fBn\fP is the display number of the server.  See \fIXserver\fP(1)
165:X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1), getaddrinfo(3)

-.-.

"[" and "]", showing optional arguments to options, should be typeset in roman.

75:.BI "[+]" "name"

-.-.

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

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':562: macro 'B'
troff: backtrace: file '<stdin>':97
troff:<stdin>:97: warning: ignoring escape character before '+'

--- xhost.1     2024-06-02 02:35:24.612008455 +0000
+++ xhost.1.new 2024-06-02 03:00:03.043160522 +0000
@@ -72,7 +72,7 @@ server.  For X terminals, it is the logi
 .B \-help
 Prints a usage message.
 .TP 8
-.BI "[+]" "name"
+.RB [ + ] \fIname\fP
 The given \fIname\fP (the plus sign is optional)
 is added to the list allowed to connect to the X server.
 The name can be a host name or a complete name (See
@@ -94,7 +94,7 @@ connections (including attempts to add i
 Resetting the server (thereby breaking all connections)
 is the only way to allow local connections again.
 .TP 8
-.B \+
+.B +
 Access is granted to everyone, even if they aren't on the list
 (i.e., access control is turned off).
 .TP 8
@@ -134,26 +134,29 @@ and a trailing at-sign (e.g., "nis:pat@"
 .PP
 For backward compatibility with pre-R6 \fIxhost\fP,
 names that contain an at-sign (@) are assumed to be in the nis family.
-Otherwise they are assumed to be Internet addresses. If compiled to support
-IPv6, then all IPv4 and IPv6 addresses returned by getaddrinfo(3) are added to
-the access list in the appropriate inet or inet6 family.
+Otherwise they are assumed to be Internet addresses.
+If compiled to support IPv6,
+then all IPv4 and IPv6 addresses returned by
+.IR getaddrinfo (3)
+are added to the access list in the appropriate inet or inet6 family.
 .PP
-The local family specifies all the local connections at once. However,
+The local family specifies all the local connections at once.
+However,
 the server interpreted address "si:localuser:\fIusername\fP" can be
-used to specify a single local user. (See the
-\fIXsecurity\fP(7) manual page for more details.)
+used to specify a single local user.
+(See the \fIXsecurity\fP(7) manual page for more details.)
 .PP
 Server interpreted addresses consist of a case-sensitive type tag and a
 string representing a given value, separated by a colon.  For example,
 "si:hostname:almas" is a server interpreted address of type \fIhostname\fP,
-with a value of \fIalmas\fP.   For more information on the available forms
-of server interpreted addresses, see the \fIXsecurity\fP(7)
-manual page.
+with a value of \fIalmas\fP.
+For more information on the available forms of server interpreted addresses,
+see the \fIXsecurity\fP(7) manual page.
 .PP
 The initial access control list for display number \fBn\fP
 may be set by the file \fI/etc/X\fBn\fI.hosts\fR, where
-\fBn\fP is the display number of the server.  See \fIXserver\fP(1)
-for details.
+\fBn\fP is the display number of the server.
+See \fIXserver\fP(1) for details.
 .SH DIAGNOSTICS
 For each name added to the access control list,
 a line of the form "\fIname\fP being added to access control list"
@@ -162,13 +165,13 @@ For each name removed from the access co
 a line of the form "\fIname\fP being removed from access control list"
 is printed.
 .SH "SEE ALSO"
-X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1), getaddrinfo(3)
+.IR X "(7), " Xsecurity "(7), " Xserver "(1), " xdm "(1), " xauth "(1), " \
+getaddrinfo (3)
 .SH ENVIRONMENT
 .TP 8
 .B DISPLAY
 to get the default host and display to use.
 .SH BUGS
-.PP
 You can't specify a display on the command line because
 .B \-display
 is a valid command line argument (indicating that you want

Reply via email to