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