Package: gpm
Version: 1.20.7-11+b1
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"

  [Use "groff -e ' $' <file>" to find 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: backtrace: file '<stdin>':28
troff:<stdin>:28: 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.5-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 gpm depends on:
ii  debconf [debconf-2.0]  1.5.87
ii  init-system-helpers    1.67
ii  libc6                  2.40-3
ii  libgpm2                1.20.7-11+b1
ii  ucf                    3.0043+nmu1

gpm recommends no packages.

gpm suggests no packages.

-- debconf information excluded
  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 output of the original and patched file
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 gpm-microtouch-setup.8": (possibly shortened list)

mandoc: gpm-microtouch-setup.8:3:12: STYLE: whitespace at end of input line
mandoc: gpm-microtouch-setup.8:7:2: WARNING: skipping paragraph macro: PP after 
SH
mandoc: gpm-microtouch-setup.8:10:19: STYLE: whitespace at end of input line
mandoc: gpm-microtouch-setup.8:11:2: WARNING: skipping paragraph macro: PP 
after SH
mandoc: gpm-microtouch-setup.8:24:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm-microtouch-setup.8:25:1: WARNING: skipping paragraph macro: sp 
after PP
mandoc: gpm-microtouch-setup.8:26:4: STYLE: whitespace at end of input line
mandoc: gpm-microtouch-setup.8:28:70: STYLE: whitespace at end of input line
mandoc: gpm-microtouch-setup.8:32:2: WARNING: skipping paragraph macro: PP 
after SH

-.-.

Remove space characters at the end of lines.

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

26:.TP 
28:includes some information about the setup of a Microtouch screen with 

-.-.

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.


19:initialization). \fBmicrotouch-setup\fR uses \fI/dev/mouse\fR to access the

-.-.

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

gpm-microtouch-setup.8:18:internally (it depends on \fBgpm\fR(8) for correct 
serial port
gpm-microtouch-setup.8:37:Debian GNU/Linux system (but may be used by others).

-.-.

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

troff: backtrace: file '<stdin>':28
troff:<stdin>:28: warning: trailing space in the line

--- gpm-microtouch-setup.8      2024-11-10 19:45:49.365051653 +0000
+++ gpm-microtouch-setup.8.new  2024-11-10 19:47:11.687477863 +0000
@@ -1,37 +1,35 @@
-.TH "gpm-microtouch-setup" "8" "8-28-2008"
-
-.SH "NAME" 
+.TH gpm-microtouch-setup 8 8-28-2008
+.
+.SH NAME
 gpm-microtouch-setup \- Calibration program for Microtouch screens
-
-.SH "SYNOPSIS"
-.PP
+.
+.SH SYNOPSIS
 .B gpm-microtouch-setup
-
-.SH "DESCRIPTION" 
-.PP
+.
+.SH DESCRIPTION
 This manual page documents briefly the \fBgpm-microtouch-setup\fR command.
 .PP
 This program calibrates Microtouch screens for use with \fBgpm\fR(8).
 .PP
 The \fBgpm\fR(8) daemon must already be running in order to run the
-program to work flawlessly, as the program stops and restarts \fBgpm\fR(8)
-internally (it depends on \fBgpm\fR(8) for correct serial port
-initialization). \fBmicrotouch-setup\fR uses \fI/dev/mouse\fR to access the
-serial port, so \fI/dev/mouse\fR should point to a "ttyS" device.
-
+program to work flawlessly,
+as the program stops and restarts \fBgpm\fR(8) internally
+(it depends on \fBgpm\fR(8) for correct serial port initialization).
+\fBmicrotouch-setup\fR uses \fI/dev/mouse\fR to access the serial port,
+so \fI/dev/mouse\fR should point to a "ttyS" device.
+.
 .SH "SEE ALSO"
 .BR gpm (8)
-.PP
-
-.TP 
+.
+.TP
 .B /usr/share/doc/gpm/README.microtouch
-includes some information about the setup of a Microtouch screen with 
+includes some information about the setup of a Microtouch screen with
 .BR gpm (8).
-
-.SH "AUTHOR"
-.PP
+.
+.SH AUTHOR
 .\" nothing from source.
 Unknown.
 
 This manual page was written by Francois Wendling <frwendl...@free.fr> for the
-Debian GNU/Linux system (but may be used by others).
+Debian GNU/Linux system
+(but may be used by others).

Reply via email to