kalvinC / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

xxd -i output syntactically incorrect for empty files. #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an empty file:
  $ touch empty.txt
2. Run xxd -i on an empty file:
  $ xxd -i empty.txt

What is the expected output? What do you see instead?

This should return:
unsigned char empty_txt[] = {};
unsigned int empty_txt_len = 0;

However, it returns:
unsigned char empty_txt[] = {
unsigned int empty_txt_len = 0;

What version of the product are you using? On what operating system?
Vim 7.3.831 on Linux

Please provide any additional information below.
This is an issue because of the use of xxd -i in automated builds.

Original issue reported on code.google.com by lorrywoo...@gmail.com on 26 Feb 2013 at 10:43

GoogleCodeExporter commented 9 years ago
I have fixed this with the following commit:
http://code.google.com/r/lorrywoodman-fix-xxd-zero-byte-input-bug/source/detail?
r=687a7d45da13e62bad6f801fd0873f0d86c2c8a3

Original comment by lorrywoo...@gmail.com on 26 Feb 2013 at 11:06

GoogleCodeExporter commented 9 years ago
Should be fixed by Vim 7.3.835

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 7:20