1
0
forked from aniani/vim

patch 8.0.1658: capitalize argument not available in long form

Problem:    Capitalize argument not available in long form.
Solution:   Recognize -capitalize.  Update man page.
This commit is contained in:
Bram Moolenaar
2018-04-03 14:21:16 +02:00
parent 9af9778209
commit 79cf7c0d45
4 changed files with 62 additions and 51 deletions

View File

@@ -57,7 +57,7 @@ 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 hexdump.
@@ -67,10 +67,13 @@ 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.
.TP .TP
.IR \-C " | " \-capitalize
Capitalize variable names in C include file style, when using \-i.
.TP
.IR \-E " | " \-EBCDIC .IR \-E " | " \-EBCDIC
Change the character encoding in the righthand column from ASCII to EBCDIC. Change the character encoding in the righthand column from ASCII to EBCDIC.
This does not change the hexadecimal representation. The option is This does not change the hexadecimal representation. The option is
@@ -87,7 +90,7 @@ 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 "\-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
@@ -98,28 +101,28 @@ 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.
.TP .TP
.IR \-i " | " \-include .IR \-i " | " \-include
output in C include file style. A complete static array definition is written Output in C include file style. A complete static array definition is written
(named after the input file), unless xxd reads from stdin. (named after the input file), unless xxd reads from stdin.
.TP .TP
.IR "\-l len " | " \-len len" .IR "\-l len " | " \-len len"
stop after writing Stop after writing
.RI < len > .RI < len >
octets. octets.
.TP .TP
.I \-o offset .I \-o offset
add Add
.RI < offset > .RI < offset >
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 hexdump style. Also known as plain hexdump
style. style.
.TP .TP
.IR \-r " | " \-revert .IR \-r " | " \-revert
reverse operation: convert (or patch) hexdump into binary. Reverse operation: convert (or patch) hexdump 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
@@ -135,7 +138,7 @@ revert with
added to file positions found in hexdump. added to file positions found in hexdump.
.TP .TP
.I \-s [+][\-]seek .I \-s [+][\-]seek
start at Start at
.RI < seek > .RI < seek >
bytes abs. (or rel.) infile offset. bytes abs. (or rel.) infile offset.
\fI+ \fRindicates that the seek is relative to the current stdin file position \fI+ \fRindicates that the seek is relative to the current stdin file position
@@ -145,10 +148,10 @@ 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

View File

@@ -30,7 +30,7 @@ OPTIONS
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent. notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
-a | -autoskip -a | -autoskip
toggle autoskip: A single '*' replaces nul-lines. Default off. Toggle autoskip: A single '*' replaces nul-lines. Default off.
-b | -bits -b | -bits
Switch to bits (binary digits) dump, rather than hexdump. This Switch to bits (binary digits) dump, rather than hexdump. This
@@ -41,9 +41,13 @@ OPTIONS
mode. mode.
-c cols | -cols cols -c cols | -cols cols
format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b: Format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
6). Max 256. 6). Max 256.
-C | -capitalize
Capitalize variable names in C include file style, when using
-i.
-E | -EBCDIC -E | -EBCDIC
Change the character encoding in the righthand column from ASCII Change the character encoding in the righthand column from ASCII
to EBCDIC. This does not change the hexadecimal representation. to EBCDIC. This does not change the hexadecimal representation.
@@ -56,33 +60,33 @@ OPTIONS
The command line switches -r, -p, -i do not work with this mode. The command line switches -r, -p, -i do not work with this mode.
-g bytes | -groupsize bytes -g bytes | -groupsize bytes
separate the output of every <bytes> bytes (two hex characters Separate the output of every <bytes> bytes (two hex characters
or eight bit-digits each) by a whitespace. Specify -g 0 to sup or eight bit-digits each) by a whitespace. Specify -g 0 to sup
press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit
tle-endian mode and 1 in bits mode. Grouping does not apply to tle-endian mode and 1 in bits mode. Grouping does not apply to
postscript or include style. postscript or include style.
-h | -help -h | -help
print a summary of available commands and exit. No hex dumping Print a summary of available commands and exit. No hex dumping
is performed. is performed.
-i | -include -i | -include
output in C include file style. A complete static array defini Output in C include file style. A complete static array defini
tion is written (named after the input file), unless xxd reads tion is written (named after the input file), unless xxd reads
from stdin. from stdin.
-l len | -len len -l len | -len len
stop after writing <len> octets. Stop after writing <len> octets.
-o offset -o offset
add <offset> to the displayed file position. Add <offset> to the displayed file position.
-p | -ps | -postscript | -plain -p | -ps | -postscript | -plain
output in postscript continuous hexdump style. Also known as Output in postscript continuous hexdump style. Also known as
plain hexdump style. plain hexdump style.
-r | -revert -r | -revert
reverse operation: convert (or patch) hexdump into binary. If Reverse operation: convert (or patch) hexdump into binary. If
not writing to stdout, xxd writes into its output file without not writing to stdout, xxd writes into its output file without
truncating it. Use the combination -r -p to read plain hexadeci truncating it. Use the combination -r -p to read plain hexadeci
mal dumps without line number information and without a particu mal dumps without line number information and without a particu
@@ -94,17 +98,17 @@ OPTIONS
found in hexdump. found in hexdump.
-s [+][-]seek -s [+][-]seek
start at <seek> bytes abs. (or rel.) infile offset. + indicates Start at <seek> bytes abs. (or rel.) infile offset. + indicates
that the seek is relative to the current stdin file position that the seek is relative to the current stdin file position
(meaningless when not reading from stdin). - indicates that the (meaningless when not reading from stdin). - indicates that the
seek should be that many characters from the end of the input seek should be that many characters from the end of the input
(or if combined with +: before the current stdin file position). (or if combined with +: before the current stdin file position).
Without -s option, xxd starts at the current file position. Without -s option, xxd starts at the current file position.
-u use upper case hex letters. Default is lower case. -u Use upper case hex letters. Default is lower case.
-v | -version -v | -version
show version string. Show version string.
CAVEATS CAVEATS
xxd -r has some builtin magic while evaluating line number information. xxd -r has some builtin magic while evaluating line number information.

View File

@@ -762,6 +762,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 */
/**/
1658,
/**/ /**/
1657, 1657,
/**/ /**/

View File

@@ -510,6 +510,8 @@ main(int argc, char *argv[])
{ {
if (pp[2] && STRNCMP("ols", pp + 2, 3)) if (pp[2] && STRNCMP("ols", pp + 2, 3))
cols = (int)strtol(pp + 2, NULL, 0); cols = (int)strtol(pp + 2, NULL, 0);
else if (pp[2] && STRNCMP("apitalize", pp + 2, 9))
capitalize = 1;
else else
{ {
if (!argv[2]) if (!argv[2])