dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.103
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.103
dcaee6
Problem:    Dos installer uses an old way to escape spaces in the diff
dcaee6
	    command.
dcaee6
Solution:   Adjust the quoting to the new default shellxquote. (Ben Fritz)
dcaee6
Files:	    src/dosinst.c
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.102/src/dosinst.c	2013-11-07 04:49:23.000000000 +0100
dcaee6
--- src/dosinst.c	2013-11-21 18:12:13.000000000 +0100
dcaee6
***************
dcaee6
*** 1192,1214 ****
dcaee6
  	fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
dcaee6
  
dcaee6
  	/* If the path has a space:  When using cmd.exe (Win NT/2000/XP) put
dcaee6
! 	 * quotes around the whole command and around the diff command.
dcaee6
  	 * Otherwise put a double quote just before the space and at the
dcaee6
  	 * end of the command.  Putting quotes around the whole thing
dcaee6
  	 * doesn't work on Win 95/98/ME.  This is mostly guessed! */
dcaee6
- 	fprintf(fd, "  let eq = ''\n");
dcaee6
  	fprintf(fd, "  if $VIMRUNTIME =~ ' '\n");
dcaee6
  	fprintf(fd, "    if &sh =~ '\\
dcaee6
! 	fprintf(fd, "      let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
dcaee6
! 	fprintf(fd, "      let eq = '\"'\n");
dcaee6
  	fprintf(fd, "    else\n");
dcaee6
  	fprintf(fd, "      let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
dcaee6
  	fprintf(fd, "    endif\n");
dcaee6
  	fprintf(fd, "  else\n");
dcaee6
  	fprintf(fd, "    let cmd = $VIMRUNTIME . '\\diff'\n");
dcaee6
  	fprintf(fd, "  endif\n");
dcaee6
! 	fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
dcaee6
! 
dcaee6
  	fprintf(fd, "endfunction\n");
dcaee6
  	fprintf(fd, "\n");
dcaee6
      }
dcaee6
--- 1192,1220 ----
dcaee6
  	fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
dcaee6
  
dcaee6
  	/* If the path has a space:  When using cmd.exe (Win NT/2000/XP) put
dcaee6
! 	 * quotes around the diff command and rely on the default value of
dcaee6
!          * shellxquote to solve the quoting problem for the whole command.
dcaee6
!          *
dcaee6
  	 * Otherwise put a double quote just before the space and at the
dcaee6
  	 * end of the command.  Putting quotes around the whole thing
dcaee6
  	 * doesn't work on Win 95/98/ME.  This is mostly guessed! */
dcaee6
  	fprintf(fd, "  if $VIMRUNTIME =~ ' '\n");
dcaee6
  	fprintf(fd, "    if &sh =~ '\\
dcaee6
! 	fprintf(fd, "      if empty(&shellxquote)\n");
dcaee6
! 	fprintf(fd, "        let l:shxq_sav = ''\n");
dcaee6
! 	fprintf(fd, "        set shellxquote&\n");
dcaee6
! 	fprintf(fd, "      endif\n");
dcaee6
! 	fprintf(fd, "      let cmd = '\"' . $VIMRUNTIME . '\\diff\"'\n");
dcaee6
  	fprintf(fd, "    else\n");
dcaee6
  	fprintf(fd, "      let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
dcaee6
  	fprintf(fd, "    endif\n");
dcaee6
  	fprintf(fd, "  else\n");
dcaee6
  	fprintf(fd, "    let cmd = $VIMRUNTIME . '\\diff'\n");
dcaee6
  	fprintf(fd, "  endif\n");
dcaee6
! 	fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n");
dcaee6
! 	fprintf(fd, "  if exists('l:shxq_sav')\n");
dcaee6
! 	fprintf(fd, "    let &shellxquote=l:shxq_sav\n");
dcaee6
! 	fprintf(fd, "  endif\n");
dcaee6
  	fprintf(fd, "endfunction\n");
dcaee6
  	fprintf(fd, "\n");
dcaee6
      }
dcaee6
*** ../vim-7.4.102/src/version.c	2013-11-21 17:42:26.000000000 +0100
dcaee6
--- src/version.c	2013-11-21 18:11:08.000000000 +0100
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     103,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
The fastest way to get an engineer to solve a problem is to declare that the
dcaee6
problem is unsolvable.  No engineer can walk away from an unsolvable problem
dcaee6
until it's solved.
dcaee6
				(Scott Adams - The Dilbert principle)
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///