Karsten Hopp f4766d
To: vim_dev@googlegroups.com
Karsten Hopp f4766d
Subject: Patch 7.3.835
Karsten Hopp f4766d
Fcc: outbox
Karsten Hopp f4766d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f4766d
Mime-Version: 1.0
Karsten Hopp f4766d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f4766d
Content-Transfer-Encoding: 8bit
Karsten Hopp f4766d
------------
Karsten Hopp f4766d
Karsten Hopp f4766d
Patch 7.3.835
Karsten Hopp f4766d
Problem:    "xxd -i" fails on an empty file.
Karsten Hopp f4766d
Solution:   Do output the closing } for an empty file. (partly by Lawrence
Karsten Hopp f4766d
	    Woodman)
Karsten Hopp f4766d
Files:	    src/xxd/xxd.c
Karsten Hopp f4766d
Karsten Hopp f4766d
Karsten Hopp f4766d
*** ../vim-7.3.834/src/xxd/xxd.c	2011-04-11 21:35:03.000000000 +0200
Karsten Hopp f4766d
--- src/xxd/xxd.c	2013-02-26 14:08:48.000000000 +0100
Karsten Hopp f4766d
***************
Karsten Hopp f4766d
*** 729,737 ****
Karsten Hopp f4766d
        if (c == EOF && ferror(fp))
Karsten Hopp f4766d
  	die(2);
Karsten Hopp f4766d
  
Karsten Hopp f4766d
!       if (p)
Karsten Hopp f4766d
! 	if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF)
Karsten Hopp f4766d
! 	  die(3);
Karsten Hopp f4766d
  
Karsten Hopp f4766d
        if (fp != stdin)
Karsten Hopp f4766d
  	{
Karsten Hopp f4766d
--- 729,738 ----
Karsten Hopp f4766d
        if (c == EOF && ferror(fp))
Karsten Hopp f4766d
  	die(2);
Karsten Hopp f4766d
  
Karsten Hopp f4766d
!       if (p && fputs("\n", fpo) == EOF)
Karsten Hopp f4766d
! 	die(3);
Karsten Hopp f4766d
!       if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF)
Karsten Hopp f4766d
! 	die(3);
Karsten Hopp f4766d
  
Karsten Hopp f4766d
        if (fp != stdin)
Karsten Hopp f4766d
  	{
Karsten Hopp f4766d
*** ../vim-7.3.834/src/version.c	2013-02-26 13:41:31.000000000 +0100
Karsten Hopp f4766d
--- src/version.c	2013-02-26 14:11:21.000000000 +0100
Karsten Hopp f4766d
***************
Karsten Hopp f4766d
*** 730,731 ****
Karsten Hopp f4766d
--- 730,733 ----
Karsten Hopp f4766d
  {   /* Add new patch number below this line */
Karsten Hopp f4766d
+ /**/
Karsten Hopp f4766d
+     835,
Karsten Hopp f4766d
  /**/
Karsten Hopp f4766d
Karsten Hopp f4766d
-- 
Karsten Hopp f4766d
For society, it's probably a good thing that engineers value function over
Karsten Hopp f4766d
appearance.  For example, you wouldn't want engineers to build nuclear power
Karsten Hopp f4766d
plants that only _look_ like they would keep all the radiation inside.
Karsten Hopp f4766d
				(Scott Adams - The Dilbert principle)
Karsten Hopp f4766d
Karsten Hopp f4766d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f4766d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f4766d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f4766d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///