mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1706: typos in the xxd manpage
Problem: typos in the xxd manpage Solution: Fix typos and formatting closes: #12645 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Matthias Braun <mb720@users.noreply.github.com>
This commit is contained in:
committed by
Christian Brabandt
parent
96d6c4aabe
commit
02551c9de0
@@ -6,7 +6,7 @@
|
|||||||
.\" Changes by Bram Moolenaar <Bram@vim.org>
|
.\" Changes by Bram Moolenaar <Bram@vim.org>
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.I xxd
|
.I xxd
|
||||||
\- make a hexdump or do the reverse.
|
\- make a hex dump or do the reverse.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B xxd
|
.B xxd
|
||||||
\-h[elp]
|
\-h[elp]
|
||||||
@@ -57,20 +57,20 @@ are all equivalent.
|
|||||||
.PP
|
.PP
|
||||||
.TP
|
.TP
|
||||||
.IR \-a " | " \-autoskip
|
.IR \-a " | " \-autoskip
|
||||||
Toggle autoskip: A single '*' replaces nul-lines. Default off.
|
Toggle autoskip: A single '*' replaces NUL-lines. Default off.
|
||||||
.TP
|
.TP
|
||||||
.IR \-b " | " \-bits
|
.IR \-b " | " \-bits
|
||||||
Switch to bits (binary digits) dump, rather than hexdump.
|
Switch to bits (binary digits) dump, rather than hex dump.
|
||||||
This option writes octets as eight digits "1"s and "0"s instead of a normal
|
This option writes octets as eight digits "1"s and "0"s instead of a normal
|
||||||
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
|
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
|
||||||
followed by an ascii (or ebcdic) representation. The command line switches
|
followed by an ASCII (or EBCDIC) representation. The command line switches
|
||||||
\-r, \-p, \-i do not work with this mode.
|
\-r, \-p, \-i do not work with this mode.
|
||||||
.TP
|
.TP
|
||||||
.IR "\-c cols " | " \-cols cols"
|
.IR "\-c cols " | " \-cols cols"
|
||||||
Format
|
Format
|
||||||
.RI < cols >
|
.RI < cols >
|
||||||
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
|
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
|
||||||
No maxmimum for \-ps. With \-ps, 0 results in one long line of output.
|
No maximum for \-ps. With \-ps, 0 results in one long line of output.
|
||||||
.TP
|
.TP
|
||||||
.IR \-C " | " \-capitalize
|
.IR \-C " | " \-capitalize
|
||||||
Capitalize variable names in C include file style, when using \-i.
|
Capitalize variable names in C include file style, when using \-i.
|
||||||
@@ -81,11 +81,11 @@ This does not change the hexadecimal representation. The option is
|
|||||||
meaningless in combinations with \-r, \-p or \-i.
|
meaningless in combinations with \-r, \-p or \-i.
|
||||||
.TP
|
.TP
|
||||||
.IR \-e
|
.IR \-e
|
||||||
Switch to little-endian hexdump.
|
Switch to little-endian hex dump.
|
||||||
This option treats byte groups as words in little-endian byte order.
|
This option treats byte groups as words in little-endian byte order.
|
||||||
The default grouping of 4 bytes may be changed using
|
The default grouping of 4 bytes may be changed using
|
||||||
.RI "" \-g .
|
.RI "" \-g .
|
||||||
This option only applies to hexdump, leaving the ASCII (or EBCDIC)
|
This option only applies to the hex dump, leaving the ASCII (or EBCDIC)
|
||||||
representation unchanged.
|
representation unchanged.
|
||||||
The command line switches
|
The command line switches
|
||||||
\-r, \-p, \-i do not work with this mode.
|
\-r, \-p, \-i do not work with this mode.
|
||||||
@@ -93,13 +93,13 @@ The command line switches
|
|||||||
.IR "\-g bytes " | " \-groupsize bytes"
|
.IR "\-g bytes " | " \-groupsize bytes"
|
||||||
Separate the output of every
|
Separate the output of every
|
||||||
.RI < bytes >
|
.RI < bytes >
|
||||||
bytes (two hex characters or eight bit-digits each) by a whitespace.
|
bytes (two hex characters or eight bit digits each) by a whitespace.
|
||||||
Specify
|
Specify
|
||||||
.I \-g 0
|
.I \-g 0
|
||||||
to suppress grouping.
|
to suppress grouping.
|
||||||
.RI < Bytes "> defaults to " 2
|
.RI < Bytes "> defaults to " 2
|
||||||
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
||||||
Grouping does not apply to postscript or include style.
|
Grouping does not apply to PostScript or include style.
|
||||||
.TP
|
.TP
|
||||||
.IR \-h " | " \-help
|
.IR \-h " | " \-help
|
||||||
Print a summary of available commands and exit. No hex dumping is performed.
|
Print a summary of available commands and exit. No hex dumping is performed.
|
||||||
@@ -123,16 +123,16 @@ Add
|
|||||||
to the displayed file position.
|
to the displayed file position.
|
||||||
.TP
|
.TP
|
||||||
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
||||||
Output in postscript continuous hexdump style. Also known as plain hexdump
|
Output in PostScript continuous hex dump style. Also known as plain hex dump
|
||||||
style.
|
style.
|
||||||
.TP
|
.TP
|
||||||
.IR \-r " | " \-revert
|
.IR \-r " | " \-revert
|
||||||
Reverse operation: convert (or patch) hexdump into binary.
|
Reverse operation: convert (or patch) hex dump into binary.
|
||||||
If not writing to stdout, xxd writes into its output file without truncating
|
If not writing to stdout, xxd writes into its output file without truncating
|
||||||
it. Use the combination
|
it. Use the combination
|
||||||
.I \-r \-p
|
.I \-r \-p
|
||||||
to read plain hexadecimal dumps without line number information and without a
|
to read plain hexadecimal dumps without line number information and without a
|
||||||
particular column layout. Additional Whitespace and line-breaks are allowed
|
particular column layout. Additional whitespace and line breaks are allowed
|
||||||
anywhere.
|
anywhere.
|
||||||
.TP
|
.TP
|
||||||
.I \-seek offset
|
.I \-seek offset
|
||||||
@@ -140,7 +140,7 @@ When used after
|
|||||||
.IR \-r :
|
.IR \-r :
|
||||||
revert with
|
revert with
|
||||||
.RI < offset >
|
.RI < offset >
|
||||||
added to file positions found in hexdump.
|
added to file positions found in hex dump.
|
||||||
.TP
|
.TP
|
||||||
.I \-s [+][\-]seek
|
.I \-s [+][\-]seek
|
||||||
Start at
|
Start at
|
||||||
@@ -153,28 +153,28 @@ should be that many characters from the end of the input (or if combined with
|
|||||||
Without \-s option, xxd starts at the current file position.
|
Without \-s option, xxd starts at the current file position.
|
||||||
.TP
|
.TP
|
||||||
.I \-u
|
.I \-u
|
||||||
Use upper case hex letters. Default is lower case.
|
Use upper-case hex letters. Default is lower-case.
|
||||||
.TP
|
.TP
|
||||||
.IR \-v " | " \-version
|
.IR \-v " | " \-version
|
||||||
Show version string.
|
Show version string.
|
||||||
.SH CAVEATS
|
.SH CAVEATS
|
||||||
.PP
|
.PP
|
||||||
.I xxd \-r
|
.I xxd \-r
|
||||||
has some builtin magic while evaluating line number information.
|
has some built-in magic while evaluating line number information.
|
||||||
If the output file is seekable, then the linenumbers at the start of each
|
If the output file is seekable, then the line numbers at the start of each
|
||||||
hexdump line may be out of order, lines may be missing, or overlapping. In
|
hex dump line may be out of order, lines may be missing, or overlapping. In
|
||||||
these cases xxd will lseek(2) to the next position. If the output file is not
|
these cases xxd will lseek(2) to the next position. If the output file is not
|
||||||
seekable, only gaps are allowed, which will be filled by null-bytes.
|
seekable, only gaps are allowed, which will be filled by null-bytes.
|
||||||
.PP
|
.PP
|
||||||
.I xxd \-r
|
.I xxd \-r
|
||||||
never generates parse errors. Garbage is silently skipped.
|
never generates parse errors. Garbage is silently skipped.
|
||||||
.PP
|
.PP
|
||||||
When editing hexdumps, please note that
|
When editing hex dumps, please note that
|
||||||
.I xxd \-r
|
.I xxd \-r
|
||||||
skips everything on the input line after reading enough columns of hexadecimal
|
skips everything on the input line after reading enough columns of hexadecimal
|
||||||
data (see option \-c). This also means, that changes to the printable ascii (or
|
data (see option \-c). This also means that changes to the printable ASCII (or
|
||||||
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
|
EBCDIC) columns are always ignored. Reverting a plain (or PostScript) style
|
||||||
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.
|
hex dump 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.
|
||||||
.PP
|
.PP
|
||||||
Note the difference between
|
Note the difference between
|
||||||
.br
|
.br
|
||||||
@@ -190,20 +190,20 @@ may be different from
|
|||||||
as lseek(2) is used to "rewind" input. A '+'
|
as lseek(2) is used to "rewind" input. A '+'
|
||||||
makes a difference if the input source is stdin, and if stdin's file position
|
makes a difference if the input source is stdin, and if stdin's file position
|
||||||
is not at the start of the file by the time xxd is started and given its input.
|
is not at the start of the file by the time xxd is started and given its input.
|
||||||
The following examples may help to clarify (or further confuse!)...
|
The following examples may help to clarify (or further confuse!):
|
||||||
.PP
|
.PP
|
||||||
Rewind stdin before reading; needed because the `cat' has already read to the
|
Rewind stdin before reading; needed because the `cat' has already read to the
|
||||||
end of stdin.
|
end of stdin.
|
||||||
.br
|
.br
|
||||||
\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
|
\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
|
||||||
.PP
|
.PP
|
||||||
Hexdump from file position 0x480 (=1024+128) onwards.
|
Hex dump from file position 0x480 (=1024+128) onwards.
|
||||||
The `+' sign means "relative to the current position", thus the `128' adds to
|
The `+' sign means "relative to the current position", thus the `128' adds to
|
||||||
the 1k where dd left off.
|
the 1k where dd left off.
|
||||||
.br
|
.br
|
||||||
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
|
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
|
||||||
.PP
|
.PP
|
||||||
Hexdump from file position 0x100 ( = 1024\-768) on.
|
Hex dump from file position 0x100 (=1024\-768) onwards.
|
||||||
.br
|
.br
|
||||||
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
|
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
|
||||||
.PP
|
.PP
|
||||||
@@ -224,7 +224,7 @@ Print 3 lines (hex 0x30 bytes) from the end of
|
|||||||
\fI% xxd \-s \-0x30 file\fR
|
\fI% xxd \-s \-0x30 file\fR
|
||||||
.PP
|
.PP
|
||||||
.br
|
.br
|
||||||
Print 120 bytes as continuous hexdump with 20 octets per line.
|
Print 120 bytes as a continuous hex dump with 20 octets per line.
|
||||||
.br
|
.br
|
||||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||||
.br
|
.br
|
||||||
@@ -242,7 +242,7 @@ Print 120 bytes as continuous hexdump with 20 octets per line.
|
|||||||
.br
|
.br
|
||||||
|
|
||||||
.br
|
.br
|
||||||
Hexdump the first 120 bytes of this man page with 12 octets per line.
|
Hex dump the first 120 bytes of this man page with 12 octets per line.
|
||||||
.br
|
.br
|
||||||
\fI% xxd \-l 120 \-c 12 xxd.1\fR
|
\fI% xxd \-l 120 \-c 12 xxd.1\fR
|
||||||
.br
|
.br
|
||||||
@@ -299,7 +299,7 @@ except for the last one which is 'A' (hex 0x41).
|
|||||||
\fI% echo "010000: 41" | xxd \-r > file\fR
|
\fI% echo "010000: 41" | xxd \-r > file\fR
|
||||||
.PP
|
.PP
|
||||||
.br
|
.br
|
||||||
Hexdump this file with autoskip.
|
Hex dump this file with autoskip.
|
||||||
.br
|
.br
|
||||||
\fI% xxd \-a \-c 12 file\fR
|
\fI% xxd \-a \-c 12 file\fR
|
||||||
.br
|
.br
|
||||||
@@ -310,26 +310,26 @@ Hexdump this file with autoskip.
|
|||||||
000fffc: 0000 0000 40 ....A
|
000fffc: 0000 0000 40 ....A
|
||||||
.PP
|
.PP
|
||||||
Create a 1 byte file containing a single 'A' character.
|
Create a 1 byte file containing a single 'A' character.
|
||||||
The number after '\-r \-s' adds to the linenumbers found in the file;
|
The number after '\-r \-s' adds to the line numbers found in the file;
|
||||||
in effect, the leading bytes are suppressed.
|
in effect, the leading bytes are suppressed.
|
||||||
.br
|
.br
|
||||||
\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
|
\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
|
||||||
.PP
|
.PP
|
||||||
Use xxd as a filter within an editor such as
|
Use xxd as a filter within an editor such as
|
||||||
.B vim(1)
|
.B vim(1)
|
||||||
to hexdump a region marked between `a' and `z'.
|
to hex dump a region marked between `a' and `z'.
|
||||||
.br
|
.br
|
||||||
\fI:'a,'z!xxd\fR
|
\fI:'a,'z!xxd\fR
|
||||||
.PP
|
.PP
|
||||||
Use xxd as a filter within an editor such as
|
Use xxd as a filter within an editor such as
|
||||||
.B vim(1)
|
.B vim(1)
|
||||||
to recover a binary hexdump marked between `a' and `z'.
|
to recover a binary hex dump marked between `a' and `z'.
|
||||||
.br
|
.br
|
||||||
\fI:'a,'z!xxd \-r\fR
|
\fI:'a,'z!xxd \-r\fR
|
||||||
.PP
|
.PP
|
||||||
Use xxd as a filter within an editor such as
|
Use xxd as a filter within an editor such as
|
||||||
.B vim(1)
|
.B vim(1)
|
||||||
to recover one line of a hexdump. Move the cursor over the line and type:
|
to recover one line of a hex dump. Move the cursor over the line and type:
|
||||||
.br
|
.br
|
||||||
\fI!!xxd \-r\fR
|
\fI!!xxd \-r\fR
|
||||||
.PP
|
.PP
|
||||||
@@ -348,8 +348,9 @@ The following error values are returned:
|
|||||||
no errors encountered.
|
no errors encountered.
|
||||||
.TP
|
.TP
|
||||||
\-1
|
\-1
|
||||||
operation not supported (
|
operation not supported
|
||||||
.I xxd \-r \-i
|
\%(\c
|
||||||
|
.I \%xxd \-r \-i
|
||||||
still impossible).
|
still impossible).
|
||||||
.TP
|
.TP
|
||||||
1
|
1
|
||||||
@@ -367,7 +368,7 @@ desired seek position is unreachable.
|
|||||||
uuencode(1), uudecode(1), patch(1)
|
uuencode(1), uudecode(1), patch(1)
|
||||||
.br
|
.br
|
||||||
.SH WARNINGS
|
.SH WARNINGS
|
||||||
The tools weirdness matches its creators brain.
|
The tool's weirdness matches its creator's brain.
|
||||||
Use entirely at your own risk. Copy files. Trace it. Become a wizard.
|
Use entirely at your own risk. Copy files. Trace it. Become a wizard.
|
||||||
.br
|
.br
|
||||||
.SH VERSION
|
.SH VERSION
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1706,
|
||||||
/**/
|
/**/
|
||||||
1705,
|
1705,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user