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
troff: backtrace: file '<stdin>':113
troff:<stdin>:113: warning: trailing space in the line
troff: backtrace: file '<stdin>':134
troff:<stdin>:134: warning: trailing space in the line
troff: backtrace: file '<stdin>':136
troff:<stdin>:136: warning: trailing space in the line
troff: backtrace: file '<stdin>':177
troff:<stdin>:177: warning: trailing space in the line
troff: backtrace: file '<stdin>':189
troff:<stdin>:189: warning: trailing space in the line
troff: backtrace: file '<stdin>':208
troff:<stdin>:208: warning: trailing space in the line
troff: backtrace: file '<stdin>':227
troff:<stdin>:227: warning: trailing space in the line
troff: backtrace: file '<stdin>':248
troff:<stdin>:248: warning: trailing space in the line
troff: backtrace: file '<stdin>':264
troff:<stdin>:264: 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.8": (possibly shortened list)

mandoc: gpm.8:10:2: WARNING: skipping paragraph macro: br at the end of SH
mandoc: gpm.8:28:19: STYLE: whitespace at end of input line
mandoc: gpm.8:48:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:51:2: WARNING: skipping paragraph macro: PP after SH
mandoc: gpm.8:105:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:108:2: WARNING: skipping paragraph macro: PP after SH
mandoc: gpm.8:113:37: STYLE: whitespace at end of input line
mandoc: gpm.8:134:27: STYLE: whitespace at end of input line
mandoc: gpm.8:136:43: STYLE: whitespace at end of input line
mandoc: gpm.8:177:4: STYLE: whitespace at end of input line
mandoc: gpm.8:189:8: STYLE: whitespace at end of input line
mandoc: gpm.8:208:10: STYLE: whitespace at end of input line
mandoc: gpm.8:227:47: STYLE: whitespace at end of input line
mandoc: gpm.8:248:20: STYLE: whitespace at end of input line
mandoc: gpm.8:264:38: STYLE: whitespace at end of input line
mandoc: gpm.8:266:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:269:2: WARNING: skipping paragraph macro: PP after SH
mandoc: gpm.8:298:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:320:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:331:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:334:2: WARNING: skipping paragraph macro: PP after SH
mandoc: gpm.8:341:2: WARNING: skipping paragraph macro: PP empty
mandoc: gpm.8:349:2: WARNING: skipping paragraph macro: PP empty

-.-.

Remove space characters at the end of lines.

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

28:the next section.  
113:longer than \fIdelta\fP (see `\-d'). 
134:`case $( /usr/bin/tty ) in 
136:/dev/tty[0\-9]*) /usr/bin/disable-paste ;; 
177:\-k 
189:is cut. 
208:an error. 
227:protocols may not be implemented for a while.  
248:of allowable types. 
264:won't be able to paste the selection. 

-.-.

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 "-" (end of options) then use "\-\-".

gpm.8:61:Special commands are toggled by triple-clicking the left and right 
button --

-.-.

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

185:specify a range and `\\ ' is used to escape the next character

-.-.

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.

219:not be used to make a mouse move faster, see `-a'.

-.-.

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.

301:mouse is a single-open device (i.e. a bus mouse), you should kill

-.-.

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.

N.B.

  The number of lines affected can be too large to be in a patch.

15:comes from selection itself. This package is intended as a replacement
17:additional facilities. The "selection"
26:would be a better name for it). This section is meant to describe the
32:be run by the superuser. The restrictions have been added in the last 1.1
38:attitude. From release 1.02 up to 1.19.2 is was possible
40:using the \-q option. This is no longer possible for security
44:As of 0.97 the server program puts itself in the background. To kill
53:certain circumstances. Special commands default to rebooting and halting
54:the system, but the user can specify his/her personal choice. The
62:an unlikely event during normal mouse usage. The easiest way to triple-click
63:is pressing one of the buttons and triple-click the other one. When special
83:allows to change the three special commands. To accept the default
86:associated to the left, middle and right button. If any of the commands
87:is empty, it is interpreted as `send a signal to the init process'. This
101:commands, as gpm runs with superuser permissions. Special commands are
129:`disable-paste' is provided. The following makes a good
144:Set the button sequence. `123' is the
147:Emacs). All the button permutations are allowable.
150:Set the delta value. When a single motion event
152:factor. (Must be 2 or above)
164:This option applies to the mman and ps2 decoding. No button is
173:for multiple clicks. If the interval between button-up and
175:a double or triple click. Time is in milliseconds.
178:Kill a running gpm. This can be used by busmouse users to kill gpm
183:Choose the `inword()' look up table. The
184:\fIcharset\fP argument is a list of characters. `\-' is used to
192:Choose the mouse file to open. Must be before \-t and \-o.
195:Enable multiple mode. The daemon will read two different mouse devices.
197:preceding option will be used for the first device. This option
203:to each mouse type. The list is comma-separated. The options
212:Forces the pointer to be visible while selecting. This is the
218:10). A lower number can be used to slow down cursor motion, this can
232:server to use its fifo as a mouse device. This option is useful for
233:bus-mouse owners to override the single-open limitation. It is also
235:to keep the middle button down while changing video mode. The option
243:commands as a colon-separated list. See above for a detailed
247:Set the mouse type. Use `\-t help' to get a list
255:Force two buttons. This means that the middle button, if any,
259:Force three buttons. By default the
261:is pressed. If three buttons are there, the right one is used
278:Double and triple clicks select whole word and whole lines. Use of
284:line will be selected automatically. If a number of lines are selected,
296:re-enabled when text mode is resumed. (But see BUGS section below.)
301:mouse is a single-open device (i.e. a bus mouse), you should kill
303:above).  To kill `gpm' just invoke `gpm \-k'. This problem doesn't
307:Two instances of gpm can't run on the same system. If you have two mice use
312:text mode is back (unless `\-R' is used). Thus, it won't reply to
313:clients. Anyways, it is unlikely that mouse-eager clients will spur
335:The current maintainer is Nico Schottelius. But without the help of
337:maintain gpm. The development mailing list can be reached under
338:g...@lists.linux.it. More information on the list is in the README file 
part of

-.-.

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
troff: backtrace: file '<stdin>':113
troff:<stdin>:113: warning: trailing space in the line
troff: backtrace: file '<stdin>':134
troff:<stdin>:134: warning: trailing space in the line
troff: backtrace: file '<stdin>':136
troff:<stdin>:136: warning: trailing space in the line
troff: backtrace: file '<stdin>':177
troff:<stdin>:177: warning: trailing space in the line
troff: backtrace: file '<stdin>':189
troff:<stdin>:189: warning: trailing space in the line
troff: backtrace: file '<stdin>':208
troff:<stdin>:208: warning: trailing space in the line
troff: backtrace: file '<stdin>':227
troff:<stdin>:227: warning: trailing space in the line
troff: backtrace: file '<stdin>':248
troff:<stdin>:248: warning: trailing space in the line
troff: backtrace: file '<stdin>':264
troff:<stdin>:264: warning: trailing space in the line

--- gpm.8       2024-11-10 15:08:15.454313768 +0000
+++ gpm.8.new   2024-11-10 15:26:31.833881065 +0000
@@ -7,7 +7,6 @@ gpm \- a cut and paste utility and mouse
 [
 .I options
 ]
-.br
 .SH DESCRIPTION
 This package tries to be a useful
 mouse server for applications running on the Linux console.  It is
@@ -25,7 +24,7 @@ preferred source of information.
 The `gpm' executable is meant to act like a daemon (thus, `gpmd'
 would be a better name for it). This section is meant to describe the
 command-line options for `gpm', while its internals are outlined in
-the next section.  
+the next section.
 
 .LP
 Due to restrictions in the `ioctl(TIOCLINUX)' system call, `gpm' must
@@ -45,10 +44,8 @@ As of 0.97 the server program puts itsel
 `gpm' you can just reinvoke it with the `\-k' cmdline switch,
 although `killall gpm' can be a better choice.
 
-.LP
 .SH SPECIAL COMMANDS
 
-.LP
 Version 1.10 adds the capability to execute special commands on
 certain circumstances. Special commands default to rebooting and halting
 the system, but the user can specify his/her personal choice. The
@@ -58,7 +55,7 @@ keyboard is locked and no network is ava
 a sane state.
 
 .LP
-Special commands are toggled by triple-clicking the left and right button --
+Special commands are toggled by triple-clicking the left and right button \(en
 an unlikely event during normal mouse usage. The easiest way to triple-click
 is pressing one of the buttons and triple-click the other one. When special
 processing is toggled, a message appears on the console (and the speaker
@@ -102,15 +99,13 @@ commands, as gpm runs with superuser per
 best suited for computers whose mouse can be physically accessed only by
 trusted people.
 
-.LP
 .SH COMMAND LINE OPTIONS
 
-.LP
 Available command line options are the following:
 .TP
 \-a \fIaccel\fP
 Set the acceleration value used when a single motion event is
-longer than \fIdelta\fP (see `\-d'). 
+longer than \fIdelta\fP (see `\-d').
 .TP
 \-A[\fIlimit\fP]
 Start up with selection pasting disabled.  This is intended as a
@@ -131,9 +126,9 @@ addition to `/etc/profile' if you allow
 work on your console.
 
 .LP
-`case $( /usr/bin/tty ) in 
+`case $( /usr/bin/tty ) in
 .br
-/dev/tty[0\-9]*) /usr/bin/disable-paste ;; 
+/dev/tty[0\-9]*) /usr/bin/disable-paste ;;
 .br
 esac'
 .TP
@@ -174,7 +169,7 @@ for multiple clicks. If the interval bet
 button-down events is less than \fIlimit\fP, the press is considered
 a double or triple click. Time is in milliseconds.
 .TP
-\-k 
+\-k
 Kill a running gpm. This can be used by busmouse users to kill gpm
 before running X (unless they use `\-R' or the single-open
 limitation is removed from the kernel).
@@ -182,11 +177,11 @@ limitation is removed from the kernel).
 \-l \fIcharset\fP
 Choose the `inword()' look up table. The
 \fIcharset\fP argument is a list of characters. `\-' is used to
-specify a range and `\\ ' is used to escape the next character
+specify a range and `\e ' is used to escape the next character
 or to provide octal codes.
 Only visible character can appear in \fIcharset\fP because control
 characters can't appear in text-mode video memory, whence selection
-is cut. 
+is cut.
 .TP
 \-m \fIfilename\fP
 Choose the mouse file to open. Must be before \-t and \-o.
@@ -205,7 +200,7 @@ to each mouse type. The list is comma-se
 initialization to toggle the modem lines like, compatibly with
 earlier gpm versions; note however that using \-o dtr
 associated with non-plain-serial mouse types may now generate
-an error. 
+an error.
 And by the way, use \-o after \-m and after \-t.
 .TP
 \-p
@@ -216,7 +211,7 @@ The default is not to show the pointer,
 \-r \fInumber\fP
 Set the responsiveness as a percentage of motion (1 to 100, default
 10). A lower number can be used to slow down cursor motion, this can
-not be used to make a mouse move faster, see `-a'.
+not be used to make a mouse move faster, see `\-a'.
 .TP
 \-R[\fIname\fP]
 Causes `gpm' to act as a repeater: any mouse data received while
@@ -224,7 +219,7 @@ in graphic mode will be produced on the
 in protocol \fIname\fP, given as an optional argument (no space in
 between !).  In principle, you can use the same
 names as for the `\-t' option, although repeating into some
-protocols may not be implemented for a while.  
+protocols may not be implemented for a while.
 In addition, you can specify `raw' as the \fIname\fP, to repeat
 the mouse data byte by byte, without any protocol translation.
 If \fIname\fP is omitted, it defaults to `msc'.
@@ -245,7 +240,7 @@ description of special commands.
 .TP
 \-t \fIname\fP
 Set the mouse type. Use `\-t help' to get a list
-of allowable types. 
+of allowable types.
 Use \-t after you selected the mouse device with \-m.
 .TP
 \-v
@@ -261,12 +256,10 @@ mouse is considered to be a 2-buttons on
 is pressed. If three buttons are there, the right one is used
 to extend the selection, and the middle one is used to paste it.
 Beware: if you use the `\-3' option with a 2-buttons mouse, you
-won't be able to paste the selection. 
+won't be able to paste the selection.
 
-.LP
 .SH OPERATION
 
-.LP
 To select text press the left mouse button and drag the mouse.
 To paste text in the same or another console, press the middle button.
 The right button is used to extend the selection, like in `xterm'.
@@ -295,10 +288,9 @@ The selection mechanism is disabled if t
 is placed in graphics mode, for example when running X11, and is
 re-enabled when text mode is resumed. (But see BUGS section below.)
 
-.LP
 .SH BUGS
 The `gpm' server may have problems interacting with X: if your
-mouse is a single-open device (i.e. a bus mouse), you should kill
+mouse is a single-open device (i.e., a bus mouse), you should kill
 `gpm' before starting X, or use the `\-R' option (see
 above).  To kill `gpm' just invoke `gpm \-k'. This problem doesn't
 apply to serial mice.
@@ -317,7 +309,6 @@ out in hidden consoles.
 The clients shipped out with gpm are not updated, thus there are potential
 security risks when using them.
 
-.LP
 .SH AUTHORS
 .nf
 Andrew Haylett <a...@gec-mrc.co.uk> (the original selection code)
@@ -328,17 +319,14 @@ Nico Schottelius <n...@schottelius.org>
 Many many contributors, to both selection and gpm.
 .fi
 
-.LP
 .SH MAINTAINERS
 
-.LP
 The current maintainer is Nico Schottelius. But without the help of
 Alessandro Rubini and the mailing list it would be impossible for me to
 maintain gpm. The development mailing list can be reached under
 g...@lists.linux.it. More information on the list is in the README file part of
 the source distribution of gpm.
 
-.LP
 .SH FILES
 .nf
 /var/run/gpm.pid The PID of the running gpm
@@ -346,7 +334,6 @@ the source distribution of gpm.
 /dev/gpmdata    The fifo written to by a \fBrepeater\fP (`\-R') daemon.
 .fi
 
-.LP
 .SH SEE ALSO
 .nf
 \fB gpm-types(7)\fP  Description of current pointer types supported by gpm

Reply via email to