#1040670 xxd.1: some remarks and editorial fixes for the manual

Package:
xxd
Source:
xxd
Description:
tool to make (or reverse) a hex dump
Submitter:
Bjarni Ingi Gislason
Date:
2023-07-08 21:48:04 UTC
Severity:
normal
Tags:
#1040670#5
Date:
2023-07-08 21:44:30 UTC
From:
To:
Dear Maintainer,

here are some notes and editorial fixes for the man page.
The patch is in the attachment.

-.-.

The difference between the formatted outputs can be seen with:

  nroff -man <file1> > <out1>
  nroff -man <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

"groff -man -Z" instead of "nroff -man"

-.-.

Output from "mandoc -T lint xxd.1":

mandoc: xxd.1:57:2: WARNING: skipping paragraph macro: PP empty
mandoc: xxd.1:161:2: WARNING: skipping paragraph macro: PP after SH
mandoc: xxd.1:177:141: STYLE: input text line longer than 80 bytes: hexdump with xxd \-r...
mandoc: xxd.1:211:97: STYLE: input text line longer than 80 bytes: The author prefers t...
mandoc: xxd.1:213:2: WARNING: skipping paragraph macro: PP after SH
mandoc: xxd.1:214:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:220:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:226:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:242:2: WARNING: skipping paragraph macro: br before sp
mandoc: xxd.1:244:2: WARNING: skipping paragraph macro: br after sp
mandoc: xxd.1:251:52: STYLE: whitespace at end of input line
mandoc: xxd.1:259:53: STYLE: whitespace at end of input line
mandoc: xxd.1:263:53: STYLE: whitespace at end of input line
mandoc: xxd.1:265:52: STYLE: whitespace at end of input line
mandoc: xxd.1:269:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:276:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:284:2: WARNING: skipping paragraph macro: br before sp
mandoc: xxd.1:286:2: WARNING: skipping paragraph macro: br after sp
mandoc: xxd.1:295:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:301:2: WARNING: skipping paragraph macro: br after PP
mandoc: xxd.1:343:2: WARNING: skipping paragraph macro: PP empty
mandoc: xxd.1:368:2: WARNING: skipping paragraph macro: br at the end of SH
mandoc: xxd.1:372:2: WARNING: skipping paragraph macro: br at the end of SH
mandoc: xxd.1:376:2: WARNING: skipping paragraph macro: br after SH
mandoc: xxd.1:393:2: WARNING: skipping paragraph macro: PP empty

-.-.

Add a (no-break, "\ " or "\~") space between a number and a unit,
as these are not one entity.'


202:the 1k where dd left off.

-.-.

Mark a full stop (.) and the exclamation mark (!) with "\&",
if it does not mean an end of a sentence.
This is a preventive action,
the paragraph could be reshaped, e.g., after changes.

When typing, one does not always notice when the line wraps after the
period.
There are too many examples of input lines in manual pages,
that end with an abbreviation point.

This marking is robust, and independent of the position on the line.

It corresponds to "\ " in TeX, and to "@:" in Texinfo.


148:bytes abs. (or rel.) infile offset.

-.-.

Use the correct macro for the font change of a single argument or
split the argument into two.

83:.IR \-e

-.-.

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

257:0000030: 220a 2e5c 2220 3231 7374 204d  "..\\" 21st M
259:000003c: 6179 2031 3939 360a 2e5c 2220  ay 1996..\\"
263:0000054: 686f 723a 0a2e 5c22 2020 2020  hor:..\\"

-.-.

Wrong distance between sentences.

  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.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

N.B

  The number of lines affected is too large to be in the patch.

65:hexadecimal dump. Each line is preceded by a line number in hexadecimal and
66:followed by an ascii (or ebcdic) representation. The command line switches
72:octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
73:No maxmimum for \-ps. With \-ps, 0 results in one long line of output.
80:This does not change the hexadecimal representation. The option is
108:Output in C include file style. A complete static array definition is written
117:Override the variable name output when \-i is used. The array is named
126:Output in postscript continuous hexdump style. Also known as plain hexdump
132:it. Use the combination
135:particular column layout. Additional Whitespace and line-breaks are allowed
148:bytes abs. (or rel.) infile offset.
156:Use upper case hex letters. Default is lower case.
165:hexdump line may be out of order, lines may be missing, or overlapping. In
166:these cases xxd will lseek(2) to the next position. If the output file is not
170:never generates parse errors. Garbage is silently skipped.
175:data (see option \-c). This also means, that changes to the printable ascii (or
176:ebcdic) columns are always ignored. Reverting a plain (or postscript) style
177:hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
371:Use entirely at your own risk. Copy files. Trace it. Become a wizard.

-.-.

Split lines longer than 100 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

xxd.1: line 177	length 141
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.


-.-.

The name of a man page is set in bold type and the section in roman (see
man-pages(7)).

166:these cases xxd will lseek(2) to the next position. If the output file is not
190:as lseek(2) is used to "rewind" input.  A '+'
211:The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
367:uuencode(1), uudecode(1), patch(1)

-.-.

Protect a period (.) or a apostrophe (') with '\&' from becoming a
control character, if it could end up at the start of a line (by
splitting the line into more lines).

60:Toggle autoskip: A single '*' replaces nul-lines.  Default off.
190:as lseek(2) is used to "rewind" input.  A '+'
312:Create a 1 byte file containing a single 'A' character.
313:The number after '\-r \-s' adds to the linenumbers found in the file;

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

319:.B vim(1)
325:.B vim(1)
331:.B vim(1)
367:uuencode(1), uudecode(1), patch(1)

-.-.

Output from "test-nroff -man -b -ww -z -rCHECKSTYLE=3":


[ "test-groff" is a developmental version of "groff" ]

Input file is ./xxd.1

Output from "test-groff -b -mandoc -dAD=l -rF0 -rHY=0 -t -w w -z -rSTYLECHECK=3":
an.tmac:<stdin>:83: style: .IR expects at least 2 arguments, got 1
troff: backtrace: file '<stdin>':251
troff:<stdin>:251: warning: trailing space in the line
troff: backtrace: file '<stdin>':259
troff:<stdin>:259: warning: trailing space in the line
troff: backtrace: file '<stdin>':263
troff:<stdin>:263: warning: trailing space in the line
troff: backtrace: file '<stdin>':265
troff:<stdin>:265: warning: trailing space in the line

-.-.