Skip to contentSkip to conversation

iecset.1: Some remarks and a patch with editorial changes for this man page

PATCH Bjarni Ingi Gislason 1 participant 1 message Mar 18, 2025

lore
Share & tools
lore
#0 lore raw

Package: alsa-utils
Version: 1.2.13-1
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") an.tmac:<stdin>:24: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:28: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:33: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

* 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 alsa-utils depends on:

ii  kmod              34-3
ii  libasound2t64     1.2.13-1+b1
ii  libatopology2t64  1.2.13-1+b1
ii  libc6             2.41-4
ii  libfftw3-single3  3.3.10-2+b1
ii  libncursesw6      6.5+20250216-2
ii  libsamplerate0    0.2.2-4+b2
ii  libtinfo6         6.5+20250216-2

alsa-utils recommends no packages.

Versions of packages alsa-utils suggests:
pn dialog <none>

-- no debconf information

Input file is iecset.1

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

-.-.

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

3 Use macro '.B' for one argument or split argument.
3 .BI is for at least 2 arguments, got 1

-.-.

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

iecset.1:14:When the commands are given in the arguments, they are parsed iecset.1:19:As the boolean argument, \fIyes\fP, \fIno\fP, \fItrue\fP, \fIfalse\fP, iecset.1:46:Specifies the IEC958 control element index, in case you have multiple

-.-.

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") an.tmac:<stdin>:24: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:28: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:33: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

-.-.

Additionally:

Change "50/15us" to (50/15)\~us (3.3... microseconds)

Generally:

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

iecset.1.new renamed from iecset.1 +15 -10
@@ -11,28 +11,31 @@ iecset \- Set or dump IEC958 status bits
 
 When \fBiecset\fP is started without arguments except for options,
 it will show the current IEC958 status in a human-readable form.
-When the commands are given in the arguments, they are parsed
+When the commands are given in the arguments,
+they are parsed
 and the IEC958 status bits are updated.  The resultant status is
 shown as well.
 
 The commands consist of the command directive and the argument.
-As the boolean argument, \fIyes\fP, \fIno\fP, \fItrue\fP, \fIfalse\fP,
+As the boolean argument,
+\fIyes\fP, \fIno\fP, \fItrue\fP, \fIfalse\fP,
 or a digit number is allowed.
 
 .SH EXAMPLES
 .TP
-.BI iecset\ \-Dhw:1
+.B iecset\ \-Dhw:1
 Displays the current IEC958 status bits on the second card.
 This is equivalent with \fI\-c 1\fP.
 .TP
-.BI iecset\ \-x
+.B iecset\ \-x
 Displays the current IEC958 status bits in a style of the arguments
 for the PCM stream.  The output string can be passed to the \fIiec958\fP
 (or \fIspdif\fP) PCM type as the optional argument.
 .TP
-.BI iecset\ pro\ off\ audio\ off
+.B iecset\ pro\ off\ audio\ off
 Sets the current status to the consumer-mode and turns on the
-non-audio bit.  The modified status will be shown, too.
+non-audio bit.
+The modified status will be shown, too.
 
 .SH OPTIONS
 .TP
@@ -43,8 +46,9 @@ Specifies the device name of the control
 Specifies the card index to open.  Equivalent with \fI\-Dhw:x\fP.
 .TP
 \fI\-n\fP index
-Specifies the IEC958 control element index, in case you have multiple
-IEC958 devices and need to choose one of them.
+Specifies the IEC958 control element index,
+in case you have multiple IEC958 devices
+and need to choose one of them.
 .TP
 \fI\-x\fP
 Dumps the status in the form of AESx bytes.
@@ -68,7 +72,7 @@ The sample rate in Hz.
 
 .TP
 \fIemphasis\fP <int>
-The emphasis: 0 = none, 1 = 50/15us, 2 = CCITT.
+The emphasis: 0 = none, 1 = (50/15)\~us, 2 = CCITT.
 
 .TP
 \fIlock\fP <bool>
@@ -82,7 +86,8 @@ This command is for the professional mod
 
 .TP
 \fIwordlength\fP <int>
-Wordlength: 0 = No, 2 = 22-18 bit, 4 = 23-19 bit, 5 = 24-20 bit, 6 = 20-16 bit.
+Wordlength: 0 = No, 2 = 22\(en18 bit, 4 = 23\(en19 bit, 5 = 24\(en20 bit,
+6 = 20\(en16 bit.
 This command is for the professional mode only.
 
 .TP

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)

-.-