53fcb7f
To: vim-dev@vim.org
53fcb7f
Subject: Patch 7.2.290
53fcb7f
Fcc: outbox
53fcb7f
From: Bram Moolenaar <Bram@moolenaar.net>
53fcb7f
Mime-Version: 1.0
53fcb7f
Content-Type: text/plain; charset=UTF-8
53fcb7f
Content-Transfer-Encoding: 8bit
53fcb7f
------------
53fcb7f
53fcb7f
Patch 7.2.290
53fcb7f
Problem:    Not freeing memory from ":lmap", ":xmap" and ":menutranslate".
53fcb7f
Solution:   Free the memory when exiting. (Dominique Pelle)
53fcb7f
Files:	    src/misc2.c
53fcb7f
53fcb7f
53fcb7f
*** ../vim-7.2.289/src/misc2.c	2009-11-03 16:44:04.000000000 +0100
53fcb7f
--- src/misc2.c	2009-11-11 16:49:13.000000000 +0100
53fcb7f
***************
53fcb7f
*** 1005,1013 ****
53fcb7f
--- 1005,1018 ----
53fcb7f
  # ifdef FEAT_MENU
53fcb7f
      /* Clear menus. */
53fcb7f
      do_cmdline_cmd((char_u *)"aunmenu *");
53fcb7f
+ #  ifdef FEAT_MULTI_LANG
53fcb7f
+     do_cmdline_cmd((char_u *)"menutranslate clear");
53fcb7f
+ #  endif
53fcb7f
  # endif
53fcb7f
  
53fcb7f
      /* Clear mappings, abbreviations, breakpoints. */
53fcb7f
+     do_cmdline_cmd((char_u *)"lmapclear");
53fcb7f
+     do_cmdline_cmd((char_u *)"xmapclear");
53fcb7f
      do_cmdline_cmd((char_u *)"mapclear");
53fcb7f
      do_cmdline_cmd((char_u *)"mapclear!");
53fcb7f
      do_cmdline_cmd((char_u *)"abclear");
53fcb7f
***************
53fcb7f
*** 1282,1288 ****
53fcb7f
  
53fcb7f
  /*
53fcb7f
   * Escape "string" for use as a shell argument with system().
53fcb7f
!  * This uses single quotes, except when we know we need to use double qoutes
53fcb7f
   * (MS-DOS and MS-Windows without 'shellslash' set).
53fcb7f
   * Escape a newline, depending on the 'shell' option.
53fcb7f
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
53fcb7f
--- 1287,1293 ----
53fcb7f
  
53fcb7f
  /*
53fcb7f
   * Escape "string" for use as a shell argument with system().
53fcb7f
!  * This uses single quotes, except when we know we need to use double quotes
53fcb7f
   * (MS-DOS and MS-Windows without 'shellslash' set).
53fcb7f
   * Escape a newline, depending on the 'shell' option.
53fcb7f
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
53fcb7f
***************
53fcb7f
*** 1537,1543 ****
53fcb7f
  #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
53fcb7f
  /*
53fcb7f
   * Copy a character a number of times.
53fcb7f
!  * Does not work for multi-byte charactes!
53fcb7f
   */
53fcb7f
      void
53fcb7f
  copy_chars(ptr, count, c)
53fcb7f
--- 1542,1548 ----
53fcb7f
  #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
53fcb7f
  /*
53fcb7f
   * Copy a character a number of times.
53fcb7f
!  * Does not work for multi-byte characters!
53fcb7f
   */
53fcb7f
      void
53fcb7f
  copy_chars(ptr, count, c)
53fcb7f
***************
53fcb7f
*** 4260,4266 ****
53fcb7f
  	 * or '**76' is transposed to '**N'( 'N' is ASCII value 76).
53fcb7f
  	 * For EBCDIC you get different character values.
53fcb7f
  	 * If no restrict is given after '**' the default is used.
53fcb7f
! 	 * Due to this technic the path looks awful if you print it as a
53fcb7f
  	 * string.
53fcb7f
  	 */
53fcb7f
  	len = 0;
53fcb7f
--- 4265,4271 ----
53fcb7f
  	 * or '**76' is transposed to '**N'( 'N' is ASCII value 76).
53fcb7f
  	 * For EBCDIC you get different character values.
53fcb7f
  	 * If no restrict is given after '**' the default is used.
53fcb7f
! 	 * Due to this technique the path looks awful if you print it as a
53fcb7f
  	 * string.
53fcb7f
  	 */
53fcb7f
  	len = 0;
53fcb7f
***************
53fcb7f
*** 4649,4655 ****
53fcb7f
  				      && !mch_isdir(stackp->ffs_filearray[i]))
53fcb7f
  			    continue;   /* not a directory */
53fcb7f
  
53fcb7f
! 			/* prepare the filename to be checked for existance
53fcb7f
  			 * below */
53fcb7f
  			STRCPY(file_path, stackp->ffs_filearray[i]);
53fcb7f
  			add_pathsep(file_path);
53fcb7f
--- 4654,4660 ----
53fcb7f
  				      && !mch_isdir(stackp->ffs_filearray[i]))
53fcb7f
  			    continue;   /* not a directory */
53fcb7f
  
53fcb7f
! 			/* prepare the filename to be checked for existence
53fcb7f
  			 * below */
53fcb7f
  			STRCPY(file_path, stackp->ffs_filearray[i]);
53fcb7f
  			add_pathsep(file_path);
53fcb7f
***************
53fcb7f
*** 5438,5444 ****
53fcb7f
  #if defined(MSWIN) || defined(MSDOS) || defined(OS2)
53fcb7f
  	    /* handle "\tmp" as absolute path */
53fcb7f
  	    || vim_ispathsep(ff_file_to_find[0])
53fcb7f
! 	    /* handle "c:name" as absulute path */
53fcb7f
  	    || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
53fcb7f
  #endif
53fcb7f
  #ifdef AMIGA
53fcb7f
--- 5443,5449 ----
53fcb7f
  #if defined(MSWIN) || defined(MSDOS) || defined(OS2)
53fcb7f
  	    /* handle "\tmp" as absolute path */
53fcb7f
  	    || vim_ispathsep(ff_file_to_find[0])
53fcb7f
! 	    /* handle "c:name" as absolute path */
53fcb7f
  	    || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
53fcb7f
  #endif
53fcb7f
  #ifdef AMIGA
53fcb7f
***************
53fcb7f
*** 5681,5687 ****
53fcb7f
  		p2 = (char_u *)base + (j + gap) * elm_size;
53fcb7f
  		if ((*cmp)((void *)p1, (void *)p2) <= 0)
53fcb7f
  		    break;
53fcb7f
! 		/* Exchange the elemets. */
53fcb7f
  		mch_memmove(buf, p1, elm_size);
53fcb7f
  		mch_memmove(p1, p2, elm_size);
53fcb7f
  		mch_memmove(p2, buf, elm_size);
53fcb7f
--- 5686,5692 ----
53fcb7f
  		p2 = (char_u *)base + (j + gap) * elm_size;
53fcb7f
  		if ((*cmp)((void *)p1, (void *)p2) <= 0)
53fcb7f
  		    break;
53fcb7f
! 		/* Exchange the elements. */
53fcb7f
  		mch_memmove(buf, p1, elm_size);
53fcb7f
  		mch_memmove(p1, p2, elm_size);
53fcb7f
  		mch_memmove(p2, buf, elm_size);
53fcb7f
*** ../vim-7.2.289/src/version.c	2009-11-11 16:23:37.000000000 +0100
53fcb7f
--- src/version.c	2009-11-11 16:54:53.000000000 +0100
53fcb7f
***************
53fcb7f
*** 683,684 ****
53fcb7f
--- 683,686 ----
53fcb7f
  {   /* Add new patch number below this line */
53fcb7f
+ /**/
53fcb7f
+     290,
53fcb7f
  /**/
53fcb7f
53fcb7f
-- 
53fcb7f
ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot.
53fcb7f
        King of all Britons, defeator of the Saxons, sovereign of all England!
53fcb7f
   [Pause]
53fcb7f
SOLDIER: Get away!
53fcb7f
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
53fcb7f
53fcb7f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
53fcb7f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
53fcb7f
\\\        download, build and distribute -- http://www.A-A-P.org        ///
53fcb7f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///