1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-29 04:56:43 +01:00
Commit graph

18 commits

Author SHA1 Message Date
Andre Chang
150227258d
patch 9.1.0732: xxd: cannot use -b and -i together
Problem:  xxd: cannot use -b and -i together
          (Irgendwer)
Solution: implement the missing changes
          (Andre Chang)

fixes: 
closes: 

Signed-off-by: Andre Chang <andre@augmentcode.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 20:03:05 +02:00
RestorerZ
8f3f78546f
runtime(doc): Updating the examples in the xxd manpage
closes: 

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:03:58 +02:00
RestorerZ
81b62dd654
patch 9.1.0676: style issues with man pages
Problem:  style issues with man pages
Solution: update man pages and test_xxd.vim, since it uses
          the xxd man page (RestorerZ)

closes: 

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 21:39:33 +02:00
Lennard Hofmann
67797191e0
patch 9.1.0404: [security] xxd: buffer-overflow with specific flags
Problem:  [security] xxd: buffer-overflow with specific flags
Solution: Correctly calculate the required buffer space
          (Lennard Hofmann)

xxd writes each output line into a global buffer before printing.
The maximum size of that buffer was not calculated correctly.

This command was crashing in AddressSanitizer:
$ xxd -Ralways -g1 -c256 -d -o 9223372036854775808 /etc/passwd

This prints a line of 6680 bytes but the buffer only had room for 6549 bytes.
If the output from "-b" was colored, the line could be even longer.

closes: 

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Lennard Hofmann <lennard.hofmann@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 14:41:18 +02:00
tristhaus
85f4521808
patch 9.0.1998: xxd: cannot reverse a bit dump
Problem:  xxd: cannot reverse a bit dump
Solution: implement reversing the bit dump using -b -r

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: tristhaus <tristhaus@yahoo.de>
2023-10-06 19:51:13 +02:00
Christian Brabandt
b74ebfc6bf
runtime(doc): update xxd manpage and mention $NO_COLOR env
also regenerate the xxd.man document page.

fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-03 16:58:55 +02:00
K.Takata
f6fc255e8d
patch 9.0.1834: Some problems with xxd coloring
Problem:  Some problems with xxd coloring
Solution: Fix the following problems:

* Support colored output on Windows.
  SetConsoleMode() is required to enable ANSI color sequences.
* Support "NO_COLOR" environment variable.
  If "NO_COLOR" is defined and not empty, colored output should be
  disabled.
  See https://no-color.org/
* "-R" should only accept "always", "never" or "auto" as the parameter.
* Adjust help and documentation. "-R" cannot omit the parameter. Remove
  surrounding brackets.

Related 
closes: 
closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2023-09-01 18:41:04 +02:00
Aapo Rantalainen
e2528ae111
patch 9.0.1827: xxd: no color support
Problem:  xxd: no color support
Solution: Add color support using xxd -R

Add some basic color support for xxd

The hex-value and value are both colored with the same color depending
on the hex-value, e.g.:

    0x00 = white
    0xff = blue
    printable = green
    non-printable = red
    tabs and linebreaks = yellow

Each character needs 11 more bytes to contain color. (Same color in a
row could contain only one overhead but the logic how xxd creates colums
must be then changed.) Size of colored output is increased by factor of
~6. Also grepping the output will break when colors is used.

Flag for color is "-R", because less uses "-R".

Color uses parameters auto,always,never same as less and grep (among
others).

E.g.

xxd -R always $FILE | less -R

Add some screen-tests (that currently on work on linux) to verify the
feature works as expected.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
2023-08-31 17:58:13 +02:00
Matthias Braun
02551c9de0
patch 9.0.1706: typos in the xxd manpage
Problem: typos in the xxd manpage
Solution: Fix typos and formatting

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Matthias Braun <mb720@users.noreply.github.com>
2023-08-13 19:21:38 +02:00
David Gow
83e11800cc patch 9.0.0008: cannot specify the variable name for "xxd -i"
Problem:    Cannot specify the variable name for "xxd -i".
Solution:   Add the "-name" argument. (David Gow, closes )
2022-06-29 20:24:49 +01:00
Erik Auerswald
c0a1d370fa patch 8.2.4088: xxd cannot output everything in one line
Problem:    Xxd cannot output everything in one line.
Solution:   Make zero columns mean infinite columns. (Erik Auerswald,
            closes )
2022-01-14 11:58:48 +00:00
Bram Moolenaar
79cf7c0d45 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.
2018-04-03 14:21:16 +02:00
Bram Moolenaar
4dcdf29910 updated for version 7.4.652
Problem:    Xxd lacks a few features.
Solution:   Use 8 characters for the file position.  Add the -e and -o
            arguments. (Vadim Vygonets)
2015-03-05 17:51:15 +01:00
Bram Moolenaar
c81e5e79a0 updated for version 7.1a 2007-05-05 18:24:42 +00:00
Bram Moolenaar
3991dab8e0 updated for version 7.0c 2006-03-27 17:01:56 +00:00
Bram Moolenaar
4317d9b486 updated for version 7.0061 2005-03-18 20:25:31 +00:00
Bram Moolenaar
293ee4d421 updated for version 7.0021 2004-12-09 21:34:53 +00:00
Bram Moolenaar
071d4279d6 updated for version 7.0001 2004-06-13 20:20:40 +00:00