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