Package: time
Version: 1.9-0.2
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 ' $' <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?
an.tmac:<stdin>:4: style: .TH missing fourth argument; consider package/project
name and version (e.g., "groff 1.23.0")
troff:<stdin>:91: warning: trailing space in the line
troff:<stdin>:103: warning: trailing space in the line
an.tmac:<stdin>:115: style: 10 leading space(s) on input line
an.tmac:<stdin>:116: style: 10 leading space(s) on input line
an.tmac:<stdin>:117: style: 10 leading space(s) on input line
an.tmac:<stdin>:143: style: 2 leading space(s) on input line
an.tmac:<stdin>:144: style: 2 leading space(s) on input line
an.tmac:<stdin>:175: style: use of deprecated macro: .PD
an.tmac:<stdin>:248: style: 5 leading space(s) on input line
an.tmac:<stdin>:252: style: 5 leading space(s) on input line
an.tmac:<stdin>:257: style: 5 leading space(s) on input line
an.tmac:<stdin>:258: style: 5 leading space(s) on input line
an.tmac:<stdin>:259: style: 5 leading space(s) on input line
an.tmac:<stdin>:270: style: 5 leading space(s) on input line
an-end-check:<stdin>: Warning: Different number of .RS and .RE calls,
an-RS-open=2 at end of file
* 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.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 time depends on:
ii libc6 2.40-5
time recommends no packages.
time suggests no packages.
-- no debconf information
Input file is time.1
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 time.1": (shortened list)
-.-.
Output from "test-groff -mandoc -t -ww -z time.1": (shortened list)
2 trailing space in the line
-.-.
Change (or include a "FIXME" paragraph about) misused SI (metric)
numeric prefixes (or names) to the binary ones, like Ki (kibi), Mi
(mebi), Gi (gibi), or Ti (tebi), if indicated.
If the metric prefixes are correct, add the definitions or an
explanation to avoid misunderstanding.
Definition of "Kilobyte" is missing.
1 Kilobyte is either "kibibyte" (1024 bytes, KiB) or "kilobyte (1000 bytes, kB).
185:Average size of the process's unshared data area, in Kilobytes.
196:Kilobytes.
199:Kilobytes.
220:Average amount of shared text in the process, in Kilobytes.
232:Average unshared stack size of the process, in Kilobytes.
238:Average resident set size of the process, in Kilobytes.
-.-.
Use "\e" to print the escape character instead of "\\" (which gets
interpreted in copy mode).
153:A backslash (`\\') introduces a `backslash escape', which is
154:translated into a single printing character upon output. `\\t' outputs
155:a tab character, `\\n' outputs a newline, and `\\\\' outputs a backslash.
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
Not considered in a patch, too many lines.
time.1:164:character (or `\en').
time.1:187:Elapsed real (wall clock) time used by the process, in
[hours:]minutes:seconds.
time.1:208:that are not valid (so they fault) but which have not yet been
time.1:213:process (in kernel mode), in seconds.
time.1:228:Elapsed real (wall clock) time used by the process, in seconds.
-.-.
No space is needed before a quote (") at the end of a line
91:.BI \-o " FILE, " \-\-output= "FILE "
103:.BI \-f " FORMAT, " \-\-format " FORMAT "
-.-.
Use ".na" (no adjustment) instead of "ad l" and then ".ad" to begin the
same adjustment again as before
47:.ad b
49:.if n .ad l
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z
":
an.tmac:<stdin>:4: style: .TH missing fourth argument; consider package/project
name and version (e.g., "groff 1.23.0")
troff:<stdin>:91: warning: trailing space in the line
troff:<stdin>:103: warning: trailing space in the line
an.tmac:<stdin>:115: style: 10 leading space(s) on input line
an.tmac:<stdin>:116: style: 10 leading space(s) on input line
an.tmac:<stdin>:117: style: 10 leading space(s) on input line
an.tmac:<stdin>:143: style: 2 leading space(s) on input line
an.tmac:<stdin>:144: style: 2 leading space(s) on input line
an.tmac:<stdin>:175: style: use of deprecated macro: .PD
an.tmac:<stdin>:248: style: 5 leading space(s) on input line
an.tmac:<stdin>:252: style: 5 leading space(s) on input line
an.tmac:<stdin>:257: style: 5 leading space(s) on input line
an.tmac:<stdin>:258: style: 5 leading space(s) on input line
an.tmac:<stdin>:259: style: 5 leading space(s) on input line
an.tmac:<stdin>:270: style: 5 leading space(s) on input line
an-end-check:<stdin>: Warning: Different number of .RS and .RE calls,
an-RS-open=2 at end of file
-.-
Do not repeat "seconds", use "time", not the units it is measured in.
Total number of CPU\-seconds ... in seconds
--- time.1 2025-01-17 22:39:00.047529206 +0000
+++ time.1.new 2025-01-17 23:09:43.771438408 +0000
@@ -46,7 +46,7 @@ time \- run programs and summarize syste
]
.ad b
.\" For nroff, turn off justification.
-.if n .ad l
+.if n .na
.SH DESCRIPTION
.B time
run the program
@@ -88,7 +88,7 @@ is passed as arguments to
.SH OPTIONS
.TP
-.BI \-o " FILE, " \-\-output= "FILE "
+.BI \-o " FILE, " \-\-output= "FILE"
Write the resource use statistics to
.I FILE
instead of to the standard error stream. By default, this overwrites the
@@ -100,7 +100,7 @@ output on the standard error stream.
Append the resource use information to the output file instead of overwriting
it. This option is only useful with the `\-o' or `\-\-output' option.
.TP
-.BI \-f " FORMAT, " \-\-format " FORMAT "
+.BI \-f " FORMAT, " \-\-format " FORMAT"
Use
.I FORMAT
as the format string that controls the output of
@@ -150,9 +150,9 @@ specifier, which is similar to the forma
.BR printf (3)
function.
-A backslash (`\\') introduces a `backslash escape', which is
-translated into a single printing character upon output. `\\t' outputs
-a tab character, `\\n' outputs a newline, and `\\\\' outputs a backslash.
+A backslash (`\e') introduces a `backslash escape', which is
+translated into a single printing character upon output. `\et' outputs
+a tab character, `\en' outputs a newline, and `\e\e' outputs a backslash.
A backslash followed by any other character outputs a question mark
(`?') followed by a backslash, to indicate that an invalid backslash
escape was given.
@@ -161,7 +161,8 @@ Other text in the format string is copie
.B time
always prints a newline after printing the resource use
information, so normally format strings do not end with a newline
-character (or `\en').
+character
+(or `\en').
There are many resource specifications. Not all resources are
measured by all versions of Unix, so some of the values might be
@@ -209,11 +210,14 @@ that are not valid (so they fault) but w
claimed by other virtual pages. Thus the data in the page is
still valid but the system tables must be updated.
.IP S
-Total number of CPU\-seconds used by the system on behalf of the
-process (in kernel mode), in seconds.
+Total CPU time used by the system on behalf of the process
+(in kernel mode),
+in seconds.
.IP U
-Total number of CPU\-seconds that the process used directly (in user
-mode), in seconds.
+Total CPU time
+that the process used directly
+(in user mode),
+in seconds.
.IP W
Number of times the process was swapped out of main memory.
.IP X
@@ -225,7 +229,9 @@ varies between systems.
Number of times the process was context\-switched involuntarily
(because the time slice expired).
.IP e
-Elapsed real (wall clock) time used by the process, in seconds.
+Elapsed real
+(wall clock)
+time used by the process, in seconds.
.IP k
Number of signals delivered to the process.
.IP p
@@ -241,7 +247,7 @@ Number of times that the program was con
for instance while waiting for an I/O operation to complete.
.IP x
Exit status of the command.
-.RS
+.RE
.SH EXAMPLES
To run the command `wc /etc/hosts' and show the default information: