sharutils: uudecode.1: Some remarks and editorial changes for this man page
Bjarni Ingi Gislason <[email protected]> Sat, 21 Sep 2024 19:02:47 +0000
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
--GS6HlR6WneFFW5SS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Package: sharutils
Version: 1:4.15.2-9
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with
[test-]groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"
[test-groff is a script in the repository for "groff"] (local copy and
"troff" slightly changed by me).
* What was the outcome of this action?
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: warning: register 'Pp' not defined
* 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.10.9-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 sharutils depends on:
ii libc6 2.40-2
sharutils recommends no packages.
Versions of packages sharutils suggests:
pn bsd-mailx | mailx <none>
pn sharutils-doc <none>
-- no debconf information
--GS6HlR6WneFFW5SS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chk_man.err.uudecode.1"
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', '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 outputs 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 uudecode.1": (possibly shortened list)
mandoc: uudecode.1:99:2: WARNING: skipping paragraph macro: PP empty
mandoc: uudecode.1:100:2: WARNING: skipping paragraph macro: sp after PP
mandoc: uudecode.1:125:207: STYLE: input text line longer than 80 bytes: The specified output...
mandoc: uudecode.1:145:2: WARNING: skipping paragraph macro: PP empty
mandoc: uudecode.1:152:95: STYLE: input text line longer than 80 bytes: This program is rele...
-.-.
Change '-' (\-) to '\(en' (en-dash) for a numeric range.
GNU gnulib has recently (2023-06-18) updated its
"build_aux/update-copyright" to recognize "\(en" in man pages.
uudecode.1:151:Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.
-.-.
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.
39:the encoded file, but may be overridden with the \fB-o\fP option.
42:be \fI/dev/stdout\fP or \fI-\fP, the result will be written to
169:This manual page was \fIAutoGen\fP-erated from the \fBuudecode\fP
-.-.
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.
43:standard output. If there are multiple input files and the second or
-.-.
Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
N.B.
The number of lines affected can be too large to be in a patch.
Line 55, length 100
.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]file\f[], \f\*[B-Font]\-\-output\-file\f[]=\f\*[I-Font]file\f[]
Line 84, length 109
.NOP \f\*[B-Font]\-R\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save\-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
Line 89, length 140
.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load\-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no\-load\-opts\f[]
Line 95, length 104
.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
Line 125, length 207
The specified output file could not be created (error); or else one of the output files could not be written or its access mode could not be changed (warnings). The accompanying message(s) will distinguish.
Line 152, length 95
This program is released under the terms of the GNU General Public License, version 3 or later.
-.-.
Name of a manual is set in bold, the section in roman.
See man-pages(7).
147:uuencode(1), uuencode(5)
-.-.
Output from "test-groff -b -mandoc -rF0 -rHY=0 -K utf8 -t -ww -z ":
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: warning: register 'Pp' not defined
-.-
Spelling
subsquent -> subsequent
--GS6HlR6WneFFW5SS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="uudecode.1.diff"
--- uudecode.1 2024-09-21 18:25:57.698812981 +0000
+++ uudecode.1.new 2024-09-21 18:51:10.457873977 +0000
@@ -1,3 +1,10 @@
+.\" PARAGRAPH SPACE
+.if t \{\
+. nr Pp .5v
+.\}
+.if n \{\
+. nr Pp 1v
+.\}
.de1 NOP
. it 1 an-trap
. if \\n[.$] \,\\$*\/
@@ -36,13 +43,15 @@ If no \fIfile\fP(s) are provided, then s
.sp
The encoded file(s) may be specified on the command line, or one may
be read from standard input. The output file name is specified in
-the encoded file, but may be overridden with the \fB-o\fP option.
+the encoded file, but may be overridden with the \fB\-o\fP option.
It will have the mode of the original file, except that setuid and
execute bits are not retained. If the output file is specified to
-be \fI/dev/stdout\fP or \fI-\fP, the result will be written to
-standard output. If there are multiple input files and the second or
-subsquent file specifies standard output, the decoded data will be
-written to the same file as the previous output. Don't do that.
+be \fI/dev/stdout\fP or \fI\-\fP, the result will be written to
+standard output.
+If there are multiple input files and
+the second or subsequent file specifies standard output,
+the decoded data will be written to the same file as the previous output.
+Don't do that.
.sp
\fIuudecode\fP ignores any leading and trailing lines. It looks
for a line that starts with "\fBbegin\fP" and proceeds until the
@@ -61,7 +70,9 @@ specified. All decoded data must be wri
encoded in the data.
.TP
.NOP \f\*[B-Font]\-c\f[], \f\*[B-Font]\-\-ignore\-chmod\f[]
-ignore \fBfchmod(3P)\fP errors.
+ignore
+.BR fchmod (3P)
+errors.
.sp
By default, if the output file permissions cannot be changed to
the permissions specified in the encoded data, the file will not
@@ -96,8 +107,6 @@ out of order.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.PP
-.sp
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s).
@@ -122,7 +131,10 @@ The command options were misconfigured.
(warning) The specified input file was not found
.TP
.NOP 8 " (EXIT_NO_OUTPUT)"
-The specified output file could not be created (error); or else one of the output files could not be written or its access mode could not be changed (warnings). The accompanying message(s) will distinguish.
+The specified output file could not be created (error);
+or else one of the output files could not be written or
+its access mode could not be changed (warnings).
+The accompanying message(s) will distinguish.
.TP
.NOP 9 " (EXIT_NO_MEM)"
No process memory available
@@ -142,14 +154,14 @@ files are processed. For example, an ex
above. It is the sum of \fBEXIT_INVALID\fP and \fBEXIT_NO_INPUT\fP.
It would mean that at least one input file contained invalid
data and also at least one input file could not be found at all.
-.PP
.SH "SEE ALSO"
-uuencode(1), uuencode(5)
+.BR uuencode "(1), " uuencode (5)
.SH "AUTHORS"
Free Software Foundation, Inc.
.SH "COPYRIGHT"
-Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.
-This program is released under the terms of the GNU General Public License, version 3 or later.
+Copyright (C) 1994\(en2015 Free Software Foundation, Inc.\& all rights reserved.
+This program is released under the terms of the GNU General Public License,
+version 3 or later.
.SH BUGS
Please put \fBsharutils\fP in the subject line for emailed bug
reports. It helps to spot the message.
--GS6HlR6WneFFW5SS--