r1168 - in /trunk/packages/vim: debian/ upstream/patches/

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Wed Jan 23 19:55:16 UTC 2008


Author: jamessan
Date: Wed Jan 23 19:55:16 2008
New Revision: 1168

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1168
Log:
* New upstream patches (232 - 241), see README.gz for details.

Added:
    trunk/packages/vim/upstream/patches/7.1.232
    trunk/packages/vim/upstream/patches/7.1.233
    trunk/packages/vim/upstream/patches/7.1.234
    trunk/packages/vim/upstream/patches/7.1.235
    trunk/packages/vim/upstream/patches/7.1.236
    trunk/packages/vim/upstream/patches/7.1.237
    trunk/packages/vim/upstream/patches/7.1.238
    trunk/packages/vim/upstream/patches/7.1.239
    trunk/packages/vim/upstream/patches/7.1.240
    trunk/packages/vim/upstream/patches/7.1.241
Modified:
    trunk/packages/vim/debian/README
    trunk/packages/vim/debian/changelog

Modified: trunk/packages/vim/debian/README
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/README?rev=1168&op=diff
==============================================================================
--- trunk/packages/vim/debian/README (original)
+++ trunk/packages/vim/debian/README Wed Jan 23 19:55:16 2008
@@ -262,3 +262,13 @@
   1758  7.1.229  a fold is closed when backspacing in Insert mode
   2052  7.1.230  memory leak when executing SourceCmd autocommands
   8648  7.1.231  when shifting lines the change is acted upon multiple times
+  2002  7.1.232  (after 7.1.207 and 7.1.211) compiler warnings with MSVC
+  3249  7.1.233  crash with Insert mode completion for a user defined command
+  6865  7.1.234  display problems when diff'ing three files
+  5925  7.1.235  pattern matching is slow when using a lot of simple patterns
+ 28992  7.1.236  hang when using complicated pattern and 'hlsearch' or ":match"
+  1704  7.1.237  compiler warning on an Alpha processor in Motif code
+  1801  7.1.238  searchpair() may fail when using 'c' or 'r' flag
+  1639  7.1.239  (after 7.1.233) compiler warning for sprintf() argument
+  5157  7.1.240  "gUe" may stop before the end of the word
+  3093  7.1.241  focus change events not always ignored

Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1168&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Wed Jan 23 19:55:16 2008
@@ -1,12 +1,13 @@
-vim (1:7.1-231+2) UNRELEASED; urgency=low
-
+vim (1:7.1-241+1) UNRELEASED; urgency=low
+
+  * New upstream patches (232 - 241), see README.gz for details.
   * Remove vim-gui-common.menu and provide one menu file for each gvim
     package.  (Closes: #461805)
   * debian/control:
     - Re-add ruby1.8 Build-Depends since that's required for Vim to detect
       that it can build with Ruby support.  (Closes: #462284)
 
- -- James Vega <jamessan at debian.org>  Wed, 23 Jan 2008 14:46:09 -0500
+ -- James Vega <jamessan at debian.org>  Wed, 23 Jan 2008 14:54:06 -0500
 
 vim (1:7.1-231+1) unstable; urgency=low
 

Added: trunk/packages/vim/upstream/patches/7.1.232
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.232?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.232 (added)
+++ trunk/packages/vim/upstream/patches/7.1.232 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,70 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.232
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.232 (after 7.1.207 and 7.1.211)
+Problem:    Compiler warnings with MSVC.
+Solution:   Add type casts. (Mike Williams)
+Files:	    src/ex_cmds2.c, src/netbeans.c
+
+
+*** ../vim-7.1.231/src/ex_cmds2.c	Tue Jan 15 22:16:36 2008
+--- src/ex_cmds2.c	Tue Jan 15 20:41:28 2008
+***************
+*** 916,922 ****
+  
+  	QueryPerformanceCounter(tm);
+  	QueryPerformanceFrequency(&fr);
+! 	tm->QuadPart +=  (double)msec / 1000.0 * (double)fr.QuadPart;
+  # else
+  	long	    usec;
+  
+--- 916,922 ----
+  
+  	QueryPerformanceCounter(tm);
+  	QueryPerformanceFrequency(&fr);
+! 	tm->QuadPart += (LONGLONG)((double)msec / 1000.0 * (double)fr.QuadPart);
+  # else
+  	long	    usec;
+  
+*** ../vim-7.1.231/src/netbeans.c	Sat Jan  5 18:06:33 2008
+--- src/netbeans.c	Mon Jan 14 21:11:02 2008
+***************
+*** 1217,1223 ****
+  
+      oldtext = ml_get(lnum);
+      oldlen = STRLEN(oldtext);
+!     if (first >= oldlen || oldlen == 0)  /* just in case */
+  	return;
+      if (lastbyte >= oldlen)
+  	lastbyte = oldlen - 1;
+--- 1217,1223 ----
+  
+      oldtext = ml_get(lnum);
+      oldlen = STRLEN(oldtext);
+!     if (first >= (colnr_T)oldlen || oldlen == 0)  /* just in case */
+  	return;
+      if (lastbyte >= oldlen)
+  	lastbyte = oldlen - 1;
+*** ../vim-7.1.231/src/version.c	Wed Jan 16 20:01:14 2008
+--- src/version.c	Fri Jan 18 11:38:39 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     232,
+  /**/
+
+-- 
+Why is "abbreviation" such a long word?
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.233
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.233?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.233 (added)
+++ trunk/packages/vim/upstream/patches/7.1.233 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,109 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.233
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.233
+Problem:    Crash when doing Insert mode completion for a user defined
+	    command.  (Yegappan Lakshmanan)
+Solution:   Don't use the non-existing command line.
+Files:	    src/ex_getln.c
+
+
+*** ../vim-7.1.232/src/ex_getln.c	Fri Jan  4 15:16:57 2008
+--- src/ex_getln.c	Fri Jan 18 13:07:11 2008
+***************
+*** 4655,4661 ****
+  static void * call_user_expand_func __ARGS((void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)), expand_T	*xp, int *num_file, char_u ***file));
+  
+  /*
+!  * call "user_expand_func()" to invoke a user defined VimL function and return
+   * the result (either a string or a List).
+   */
+      static void *
+--- 4655,4661 ----
+  static void * call_user_expand_func __ARGS((void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)), expand_T	*xp, int *num_file, char_u ***file));
+  
+  /*
+!  * Call "user_expand_func()" to invoke a user defined VimL function and return
+   * the result (either a string or a List).
+   */
+      static void *
+***************
+*** 4677,4687 ****
+      *num_file = 0;
+      *file = NULL;
+  
+!     keep = ccline.cmdbuff[ccline.cmdlen];
+!     ccline.cmdbuff[ccline.cmdlen] = 0;
+!     sprintf((char *)num, "%d", ccline.cmdpos);
+      args[0] = xp->xp_pattern;
+-     args[1] = ccline.cmdbuff;
+      args[2] = num;
+  
+      /* Save the cmdline, we don't know what the function may do. */
+--- 4677,4698 ----
+      *num_file = 0;
+      *file = NULL;
+  
+!     if (ccline.cmdbuff == NULL)
+!     {
+! 	/* Completion from Insert mode, pass fake arguments. */
+! 	keep = 0;
+! 	sprintf((char *)num, "%d", STRLEN(xp->xp_pattern));
+! 	args[1] = xp->xp_pattern;
+!     }
+!     else
+!     {
+! 	/* Completion on the command line, pass real arguments. */
+! 	keep = ccline.cmdbuff[ccline.cmdlen];
+! 	ccline.cmdbuff[ccline.cmdlen] = 0;
+! 	sprintf((char *)num, "%d", ccline.cmdpos);
+! 	args[1] = ccline.cmdbuff;
+!     }
+      args[0] = xp->xp_pattern;
+      args[2] = num;
+  
+      /* Save the cmdline, we don't know what the function may do. */
+***************
+*** 4694,4701 ****
+  
+      ccline = save_ccline;
+      current_SID = save_current_SID;
+! 
+!     ccline.cmdbuff[ccline.cmdlen] = keep;
+  
+      return ret;
+  }
+--- 4705,4712 ----
+  
+      ccline = save_ccline;
+      current_SID = save_current_SID;
+!     if (ccline.cmdbuff != NULL)
+! 	ccline.cmdbuff[ccline.cmdlen] = keep;
+  
+      return ret;
+  }
+*** ../vim-7.1.232/src/version.c	Fri Jan 18 11:40:02 2008
+--- src/version.c	Fri Jan 18 13:01:05 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     233,
+  /**/
+
+-- 
+"I love deadlines.  I especially like the whooshing sound they
+make as they go flying by."
+                         -- Douglas Adams
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.234
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.234?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.234 (added)
+++ trunk/packages/vim/upstream/patches/7.1.234 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,210 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.234
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.234
+Problem:    When diff'ing three files the third one isn't displayed correctly.
+	    (Gary Johnson)
+Solution:   Compute the size of diff blocks correctly when merging blocks.
+	    Compute filler lines correctly when scrolling.
+Files:	    src/diff.c
+
+
+*** ../vim-7.1.233/src/diff.c	Fri Oct 19 18:57:33 2007
+--- src/diff.c	Fri Jan 18 17:32:31 2008
+***************
+*** 1299,1305 ****
+  	    }
+  	    else
+  		/* second overlap of new block with existing block */
+! 		dp->df_count[idx_new] += count_new - count_orig;
+  
+  	    /* Adjust the size of the block to include all the lines to the
+  	     * end of the existing block or the new diff, whatever ends last. */
+--- 1299,1307 ----
+  	    }
+  	    else
+  		/* second overlap of new block with existing block */
+! 		dp->df_count[idx_new] += count_new - count_orig
+! 		    + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]
+! 		    - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]);
+  
+  	    /* Adjust the size of the block to include all the lines to the
+  	     * end of the existing block or the new diff, whatever ends last. */
+***************
+*** 1628,1641 ****
+      win_T	*fromwin;
+      win_T	*towin;
+  {
+!     buf_T	*buf = fromwin->w_buffer;
+      linenr_T	lnum = fromwin->w_topline;
+!     int		idx;
+      diff_T	*dp;
+      int		i;
+  
+!     idx = diff_buf_idx(buf);
+!     if (idx == DB_COUNT)
+  	return;		/* safety check */
+  
+      if (curtab->tp_diff_invalid)
+--- 1630,1645 ----
+      win_T	*fromwin;
+      win_T	*towin;
+  {
+!     buf_T	*frombuf = fromwin->w_buffer;
+      linenr_T	lnum = fromwin->w_topline;
+!     int		fromidx;
+!     int		toidx;
+      diff_T	*dp;
++     int		max_count;
+      int		i;
+  
+!     fromidx = diff_buf_idx(frombuf);
+!     if (fromidx == DB_COUNT)
+  	return;		/* safety check */
+  
+      if (curtab->tp_diff_invalid)
+***************
+*** 1645,1686 ****
+  
+      /* search for a change that includes "lnum" in the list of diffblocks. */
+      for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
+! 	if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
+  	    break;
+      if (dp == NULL)
+      {
+  	/* After last change, compute topline relative to end of file; no
+  	 * filler lines. */
+  	towin->w_topline = towin->w_buffer->b_ml.ml_line_count
+! 					   - (buf->b_ml.ml_line_count - lnum);
+      }
+      else
+      {
+  	/* Find index for "towin". */
+! 	i = diff_buf_idx(towin->w_buffer);
+! 	if (i == DB_COUNT)
+  	    return;		/* safety check */
+  
+! 	towin->w_topline = lnum + (dp->df_lnum[i] - dp->df_lnum[idx]);
+! 	if (lnum >= dp->df_lnum[idx])
+  	{
+! 	    /* Inside a change: compute filler lines. */
+! 	    if (dp->df_count[i] == dp->df_count[idx])
+  		towin->w_topfill = fromwin->w_topfill;
+! 	    else if (dp->df_count[i] > dp->df_count[idx])
+  	    {
+! 		if (lnum == dp->df_lnum[idx] + dp->df_count[idx])
+! 		    towin->w_topline = dp->df_lnum[i] + dp->df_count[i]
+! 							 - fromwin->w_topfill;
+  	    }
+! 	    else
+  	    {
+! 		if (towin->w_topline >= dp->df_lnum[i] + dp->df_count[i])
+  		{
+! 		    if (diff_flags & DIFF_FILLER)
+! 			towin->w_topfill = dp->df_lnum[idx]
+! 						   + dp->df_count[idx] - lnum;
+! 		    towin->w_topline = dp->df_lnum[i] + dp->df_count[i];
+  		}
+  	    }
+  	}
+--- 1649,1720 ----
+  
+      /* search for a change that includes "lnum" in the list of diffblocks. */
+      for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
+! 	if (lnum <= dp->df_lnum[fromidx] + dp->df_count[fromidx])
+  	    break;
+      if (dp == NULL)
+      {
+  	/* After last change, compute topline relative to end of file; no
+  	 * filler lines. */
+  	towin->w_topline = towin->w_buffer->b_ml.ml_line_count
+! 				       - (frombuf->b_ml.ml_line_count - lnum);
+      }
+      else
+      {
+  	/* Find index for "towin". */
+! 	toidx = diff_buf_idx(towin->w_buffer);
+! 	if (toidx == DB_COUNT)
+  	    return;		/* safety check */
+  
+! 	towin->w_topline = lnum + (dp->df_lnum[toidx] - dp->df_lnum[fromidx]);
+! 	if (lnum >= dp->df_lnum[fromidx])
+  	{
+! 	    /* Inside a change: compute filler lines. With three or more
+! 	     * buffers we need to know the largest count. */
+! 	    max_count = 0;
+! 	    for (i = 0; i < DB_COUNT; ++i)
+! 		if (curtab->tp_diffbuf[i] != NULL
+! 					       && max_count < dp->df_count[i])
+! 		    max_count = dp->df_count[i];
+! 
+! 	    if (dp->df_count[toidx] == dp->df_count[fromidx])
+! 	    {
+! 		/* same number of lines: use same filler count */
+  		towin->w_topfill = fromwin->w_topfill;
+! 	    }
+! 	    else if (dp->df_count[toidx] > dp->df_count[fromidx])
+  	    {
+! 		if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
+! 		{
+! 		    /* more lines in towin and fromwin doesn't show diff
+! 		     * lines, only filler lines */
+! 		    if (max_count - fromwin->w_topfill >= dp->df_count[toidx])
+! 		    {
+! 			/* towin also only shows filler lines */
+! 			towin->w_topline = dp->df_lnum[toidx]
+! 						       + dp->df_count[toidx];
+! 			towin->w_topfill = fromwin->w_topfill;
+! 		    }
+! 		    else
+! 			/* towin still has some diff lines to show */
+! 			towin->w_topline = dp->df_lnum[toidx]
+! 					     + max_count - fromwin->w_topfill;
+! 		}
+  	    }
+! 	    else if (towin->w_topline >= dp->df_lnum[toidx]
+! 							+ dp->df_count[toidx])
+  	    {
+! 		/* less lines in towin and no diff lines to show: compute
+! 		 * filler lines */
+! 		towin->w_topline = dp->df_lnum[toidx] + dp->df_count[toidx];
+! 		if (diff_flags & DIFF_FILLER)
+  		{
+! 		    if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
+! 			/* fromwin is also out of diff lines */
+! 			towin->w_topfill = fromwin->w_topfill;
+! 		    else
+! 			/* fromwin has some diff lines */
+! 			towin->w_topfill = dp->df_lnum[fromidx]
+! 							   + max_count - lnum;
+  		}
+  	    }
+  	}
+*** ../vim-7.1.233/src/version.c	Fri Jan 18 13:15:32 2008
+--- src/version.c	Fri Jan 18 17:37:32 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     234,
+  /**/
+
+-- 
+ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
+                  KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
+                  HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
+                  LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
+                  BROTHER MAYNARD
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.235
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.235?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.235 (added)
+++ trunk/packages/vim/upstream/patches/7.1.235 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,199 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.235
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.235
+Problem:    Pattern matching is slow when using a lot of simple patterns.
+Solution:   Avoid allocating memory by not freeing it when it's not so much.
+	    (Alexei Alexandrov)
+Files:	    src/regexp.c
+
+
+*** ../vim-7.1.234/src/regexp.c	Wed Jan  2 15:34:48 2008
+--- src/regexp.c	Fri Jan 18 20:35:21 2008
+***************
+*** 378,391 ****
+  
+  static char_u		*reg_prev_sub = NULL;
+  
+- #if defined(EXITFREE) || defined(PROTO)
+-     void
+- free_regexp_stuff()
+- {
+-     vim_free(reg_prev_sub);
+- }
+- #endif
+- 
+  /*
+   * REGEXP_INRANGE contains all characters which are always special in a []
+   * range after '\'.
+--- 378,383 ----
+***************
+*** 3206,3217 ****
+  } backpos_T;
+  
+  /*
+!  * regstack and backpos are used by regmatch().  They are kept over calls to
+!  * avoid invoking malloc() and free() often.
+   */
+! static garray_T	regstack;	/* stack with regitem_T items, sometimes
+! 				   preceded by regstar_T or regbehind_T. */
+! static garray_T	backpos;	/* table with backpos_T for BACK */
+  
+  /*
+   * Get pointer to the line "lnum", which is relative to "reg_firstlnum".
+--- 3198,3236 ----
+  } backpos_T;
+  
+  /*
+!  * "regstack" and "backpos" are used by regmatch().  They are kept over calls
+!  * to avoid invoking malloc() and free() often.
+!  * "regstack" is a stack with regitem_T items, sometimes preceded by regstar_T
+!  * or regbehind_T.
+!  * "backpos_T" is a table with backpos_T for BACK
+!  */
+! static garray_T	regstack = {0, 0, 0, 0, NULL};
+! static garray_T	backpos = {0, 0, 0, 0, NULL};
+! 
+! /*
+!  * Both for regstack and backpos tables we use the following strategy of
+!  * allocation (to reduce malloc/free calls):
+!  * - Initial size is fairly small.
+!  * - When needed, the tables are grown bigger (8 times at first, double after
+!  *   that).
+!  * - After executing the match we free the memory only if the array has grown.
+!  *   Thus the memory is kept allocated when it's at the initial size.
+!  * This makes it fast while not keeping a lot of memory allocated.
+!  * A three times speed increase was observed when using many simple patterns.
+   */
+! #define REGSTACK_INITIAL	2048
+! #define BACKPOS_INITIAL		64
+! 
+! #if defined(EXITFREE) || defined(PROTO)
+!     void
+! free_regexp_stuff()
+! {
+!     ga_clear(&regstack);
+!     ga_clear(&backpos);
+!     vim_free(reg_tofree);
+!     vim_free(reg_prev_sub);
+! }
+! #endif
+  
+  /*
+   * Get pointer to the line "lnum", which is relative to "reg_firstlnum".
+***************
+*** 3346,3360 ****
+      char_u	*s;
+      long	retval = 0L;
+  
+!     reg_tofree = NULL;
+! 
+!     /* Init the regstack empty.  Use an item size of 1 byte, since we push
+!      * different things onto it.  Use a large grow size to avoid reallocating
+!      * it too often. */
+!     ga_init2(&regstack, 1, 10000);
+! 
+!     /* Init the backpos table empty. */
+!     ga_init2(&backpos, sizeof(backpos_T), 10);
+  
+      if (REG_MULTI)
+      {
+--- 3365,3389 ----
+      char_u	*s;
+      long	retval = 0L;
+  
+!     /* Create "regstack" and "backpos" if they are not allocated yet.
+!      * We allocate *_INITIAL amount of bytes first and then set the grow size
+!      * to much bigger value to avoid many malloc calls in case of deep regular
+!      * expressions.  */
+!     if (regstack.ga_data == NULL)
+!     {
+! 	/* Use an item size of 1 byte, since we push different things
+! 	 * onto the regstack. */
+! 	ga_init2(&regstack, 1, REGSTACK_INITIAL);
+! 	ga_grow(&regstack, REGSTACK_INITIAL);
+! 	regstack.ga_growsize = REGSTACK_INITIAL * 8;
+!     }
+! 
+!     if (backpos.ga_data == NULL)
+!     {
+! 	ga_init2(&backpos, sizeof(backpos_T), BACKPOS_INITIAL);
+! 	ga_grow(&backpos, BACKPOS_INITIAL);
+! 	backpos.ga_growsize = BACKPOS_INITIAL * 8;
+!     }
+  
+      if (REG_MULTI)
+      {
+***************
+*** 3525,3533 ****
+      }
+  
+  theend:
+!     vim_free(reg_tofree);
+!     ga_clear(&regstack);
+!     ga_clear(&backpos);
+  
+      return retval;
+  }
+--- 3554,3570 ----
+      }
+  
+  theend:
+!     /* Free "reg_tofree" when it's a bit big.
+!      * Free regstack and backpos if they are bigger than their initial size. */
+!     if (reg_tofreelen > 400)
+!     {
+! 	vim_free(reg_tofree);
+! 	reg_tofree = NULL;
+!     }
+!     if (regstack.ga_maxlen > REGSTACK_INITIAL)
+! 	ga_clear(&regstack);
+!     if (backpos.ga_maxlen > BACKPOS_INITIAL)
+! 	ga_clear(&backpos);
+  
+      return retval;
+  }
+***************
+*** 3717,3724 ****
+  #define RA_MATCH	4	/* successful match */
+  #define RA_NOMATCH	5	/* didn't match */
+  
+!   /* Init the regstack and backpos table empty.  They are initialized and
+!    * freed in vim_regexec_both() to reduce malloc()/free() calls. */
+    regstack.ga_len = 0;
+    backpos.ga_len = 0;
+  
+--- 3754,3761 ----
+  #define RA_MATCH	4	/* successful match */
+  #define RA_NOMATCH	5	/* didn't match */
+  
+!   /* Make "regstack" and "backpos" empty.  They are allocated and freed in
+!    * vim_regexec_both() to reduce malloc()/free() calls. */
+    regstack.ga_len = 0;
+    backpos.ga_len = 0;
+  
+*** ../vim-7.1.234/src/version.c	Fri Jan 18 17:39:10 2008
+--- src/version.c	Fri Jan 18 20:33:26 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     235,
+  /**/
+
+-- 
+NEIL INNES PLAYED: THE FIRST SELF-DESTRUCTIVE MONK, ROBIN'S LEAST FAVORITE
+                   MINSTREL, THE PAGE CRUSHED BY A RABBIT, THE OWNER OF A DUCK
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.236
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.236?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.236 (added)
+++ trunk/packages/vim/upstream/patches/7.1.236 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,920 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.236
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.236
+Problem:    When using 'incsearch' and 'hlsearch' a complicated pattern may
+	    make Vim hang until CTRL-C is pressed.
+Solution:   Add the 'redrawtime' option.
+Files:	    runtime/doc/options.txt, src/ex_cmds.c, src/ex_docmd.c,
+	    src/ex_getln.c, src/gui.c, src/misc1.c, src/normal.c,
+	    src/option.c, src/quickfix.c, src/regexp.c, src/proto/regexp.pro,
+	    src/proto/search.pro, src/search.c, src/screen.c,
+	    src/option.h, src/spell.c, src/structs.h, src/syntax.c, src/tag.c,
+	    src/vim.h
+
+
+*** ../vim-7.1.235/runtime/doc/options.txt	Sun Aug 12 16:55:01 2007
+--- runtime/doc/options.txt	Sat Jan 19 14:01:22 2008
+***************
+*** 3618,3623 ****
+--- 3636,3642 ----
+  	When you get bored looking at the highlighted matches, you can turn it
+  	off with |:nohlsearch|.  As soon as you use a search command, the
+  	highlighting comes back.
++ 	'redrawtime' specifies the maximum time spend on finding matches.
+  	When the search pattern can match an end-of-line, Vim will try to
+  	highlight all of the matched text.  However, this depends on where the
+  	search starts.  This will be the first line in the window or the first
+***************
+*** 3851,3856 ****
+--- 3870,3879 ----
+  	original position when no match is found and when pressing <Esc>.  You
+  	still need to finish the search command with <Enter> to move the
+  	cursor to the match.
++ 	When compiled with the |+reltime| feature Vim only searches for about
++ 	half a second.  With a complicated pattern and/or a lot of text the
++ 	match may not be found.  This is to avoid that Vim hangs while you
++ 	are typing the pattern.
+  	The highlighting can be set with the 'i' flag in 'highlight'.
+  	See also: 'hlsearch'.
+  	CTRL-L can be used to add one character from after the current match
+***************
+*** 5185,5190 ****
+--- 5210,5227 ----
+  	{not in Vi:}  When using the ":view" command the 'readonly' option is
+  	set for the newly edited buffer.
+  
++ 						*'redrawtime'* *'rdt'*
++ 'redrawtime' 'rdt'	number	(default 2000)
++ 			global
++ 			{not in Vi}
++ 			{only available when compiled with the |+reltime|
++ 			feature}
++ 	The time in milliseconds for redrawing the display.  This applies to
++ 	searching for patterns for 'hlsearch' and |:match| highlighting.
++ 	When redrawing takes more than this many milliseconds no further
++ 	matches will be highlighted.  This is used to avoid that Vim hangs
++ 	when using a very complicated pattern.
++ 
+  						*'remap'* *'noremap'*
+  'remap'			boolean	(default on)
+  			global
+*** ../vim-7.1.235/src/ex_cmds.c	Sun Jan 13 13:30:34 2008
+--- src/ex_cmds.c	Sat Jan 19 13:04:28 2008
+***************
+*** 4446,4452 ****
+  #endif
+  		); ++lnum)
+      {
+! 	nmatch = vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0);
+  	if (nmatch)
+  	{
+  	    colnr_T	copycol;
+--- 4446,4453 ----
+  #endif
+  		); ++lnum)
+      {
+! 	nmatch = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
+! 							    (colnr_T)0, NULL);
+  	if (nmatch)
+  	{
+  	    colnr_T	copycol;
+***************
+*** 4957,4963 ****
+  			|| (do_ask && !re_lookbehind(regmatch.regprog))
+  			|| nmatch_tl > 0
+  			|| (nmatch = vim_regexec_multi(&regmatch, curwin,
+! 				       curbuf, sub_firstlnum, matchcol)) == 0
+  			|| regmatch.startpos[0].lnum > 0)
+  		{
+  		    if (new_start != NULL)
+--- 4958,4965 ----
+  			|| (do_ask && !re_lookbehind(regmatch.regprog))
+  			|| nmatch_tl > 0
+  			|| (nmatch = vim_regexec_multi(&regmatch, curwin,
+! 							curbuf, sub_firstlnum,
+! 							 matchcol, NULL)) == 0
+  			|| regmatch.startpos[0].lnum > 0)
+  		{
+  		    if (new_start != NULL)
+***************
+*** 5022,5028 ****
+  		    }
+  		    if (nmatch == -1 && !lastone)
+  			nmatch = vim_regexec_multi(&regmatch, curwin, curbuf,
+! 						     sub_firstlnum, matchcol);
+  
+  		    /*
+  		     * 5. break if there isn't another match in this line
+--- 5024,5030 ----
+  		    }
+  		    if (nmatch == -1 && !lastone)
+  			nmatch = vim_regexec_multi(&regmatch, curwin, curbuf,
+! 					       sub_firstlnum, matchcol, NULL);
+  
+  		    /*
+  		     * 5. break if there isn't another match in this line
+***************
+*** 5252,5258 ****
+      for (lnum = eap->line1; lnum <= eap->line2 && !got_int; ++lnum)
+      {
+  	/* a match on this line? */
+! 	match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0);
+  	if ((type == 'g' && match) || (type == 'v' && !match))
+  	{
+  	    ml_setmarked(lnum);
+--- 5254,5261 ----
+      for (lnum = eap->line1; lnum <= eap->line2 && !got_int; ++lnum)
+      {
+  	/* a match on this line? */
+! 	match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
+! 							    (colnr_T)0, NULL);
+  	if ((type == 'g' && match) || (type == 'v' && !match))
+  	{
+  	    ml_setmarked(lnum);
+*** ../vim-7.1.235/src/ex_docmd.c	Sun Jan 13 17:11:25 2008
+--- src/ex_docmd.c	Fri Jan 18 21:01:16 2008
+***************
+*** 3931,3937 ****
+  				curwin->w_cursor.col = 0;
+  			    searchcmdlen = 0;
+  			    if (!do_search(NULL, c, cmd, 1L,
+! 				      SEARCH_HIS + SEARCH_MSG + SEARCH_START))
+  			    {
+  				curwin->w_cursor = pos;
+  				cmd = NULL;
+--- 3931,3938 ----
+  				curwin->w_cursor.col = 0;
+  			    searchcmdlen = 0;
+  			    if (!do_search(NULL, c, cmd, 1L,
+! 					SEARCH_HIS + SEARCH_MSG + SEARCH_START,
+! 					NULL))
+  			    {
+  				curwin->w_cursor = pos;
+  				cmd = NULL;
+*** ../vim-7.1.235/src/ex_getln.c	Fri Jan 18 13:15:32 2008
+--- src/ex_getln.c	Fri Jan 18 21:34:42 2008
+***************
+*** 1709,1714 ****
+--- 1709,1717 ----
+  	if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
+  	{
+  	    pos_T	end_pos;
++ #ifdef FEAT_RELTIME
++ 	    proftime_T	tm;
++ #endif
+  
+  	    /* if there is a character waiting, search and redraw later */
+  	    if (char_avail())
+***************
+*** 1727,1734 ****
+  		cursor_off();		/* so the user knows we're busy */
+  		out_flush();
+  		++emsg_off;    /* So it doesn't beep if bad expr */
+  		i = do_search(NULL, firstc, ccline.cmdbuff, count,
+! 			SEARCH_KEEP + SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK);
+  		--emsg_off;
+  		/* if interrupted while searching, behave like it failed */
+  		if (got_int)
+--- 1730,1747 ----
+  		cursor_off();		/* so the user knows we're busy */
+  		out_flush();
+  		++emsg_off;    /* So it doesn't beep if bad expr */
++ #ifdef FEAT_RELTIME
++ 		/* Set the time limit to half a second. */
++ 		profile_setlimit(500L, &tm);
++ #endif
+  		i = do_search(NULL, firstc, ccline.cmdbuff, count,
+! 			SEARCH_KEEP + SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK,
+! #ifdef FEAT_RELTIME
+! 			&tm
+! #else
+! 			NULL
+! #endif
+! 			);
+  		--emsg_off;
+  		/* if interrupted while searching, behave like it failed */
+  		if (got_int)
+*** ../vim-7.1.235/src/gui.c	Thu Jan  3 16:14:25 2008
+--- src/gui.c	Fri Jan 18 21:01:36 2008
+***************
+*** 5052,5058 ****
+  	/* Search for the next match. */
+  	i = msg_scroll;
+  	do_search(NULL, down ? '/' : '?', ga.ga_data, 1L,
+! 						    SEARCH_MSG + SEARCH_MARK);
+  	msg_scroll = i;	    /* don't let an error message set msg_scroll */
+      }
+  
+--- 5052,5058 ----
+  	/* Search for the next match. */
+  	i = msg_scroll;
+  	do_search(NULL, down ? '/' : '?', ga.ga_data, 1L,
+! 					      SEARCH_MSG + SEARCH_MARK, NULL);
+  	msg_scroll = i;	    /* don't let an error message set msg_scroll */
+      }
+  
+*** ../vim-7.1.235/src/misc1.c	Thu Jan  3 12:42:38 2008
+--- src/misc1.c	Sat Jan 19 13:04:39 2008
+***************
+*** 437,443 ****
+      {
+  	regmatch.rmm_ic = FALSE;
+  	regmatch.rmm_maxcol = 0;
+! 	if (vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0))
+  	{
+  	    pos.lnum = regmatch.endpos[0].lnum + lnum;
+  	    pos.col = regmatch.endpos[0].col;
+--- 437,444 ----
+      {
+  	regmatch.rmm_ic = FALSE;
+  	regmatch.rmm_maxcol = 0;
+! 	if (vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
+! 							    (colnr_T)0, NULL))
+  	{
+  	    pos.lnum = regmatch.endpos[0].lnum + lnum;
+  	    pos.col = regmatch.endpos[0].col;
+*** ../vim-7.1.235/src/normal.c	Sat Jan 12 17:11:25 2008
+--- src/normal.c	Fri Jan 18 21:01:47 2008
+***************
+*** 6093,6099 ****
+      curwin->w_set_curswant = TRUE;
+  
+      i = do_search(cap->oap, dir, pat, cap->count1,
+! 				 opt | SEARCH_OPT | SEARCH_ECHO | SEARCH_MSG);
+      if (i == 0)
+  	clearop(cap->oap);
+      else
+--- 6093,6099 ----
+      curwin->w_set_curswant = TRUE;
+  
+      i = do_search(cap->oap, dir, pat, cap->count1,
+! 			   opt | SEARCH_OPT | SEARCH_ECHO | SEARCH_MSG, NULL);
+      if (i == 0)
+  	clearop(cap->oap);
+      else
+*** ../vim-7.1.235/src/option.c	Tue Oct  2 20:40:01 2007
+--- src/option.c	Sat Jan 19 13:44:33 2008
+***************
+*** 1991,1996 ****
+--- 1991,2003 ----
+      {"redraw",	    NULL,   P_BOOL|P_VI_DEF,
+  			    (char_u *)NULL, PV_NONE,
+  			    {(char_u *)FALSE, (char_u *)0L}},
++     {"redrawtime",  "rdt",  P_NUM|P_VI_DEF,
++ #ifdef FEAT_RELTIME
++ 			    (char_u *)&p_rdt, PV_NONE,
++ #else
++ 			    (char_u *)NULL, PV_NONE,
++ #endif
++ 			    {(char_u *)2000L, (char_u *)0L}},
+      {"remap",	    NULL,   P_BOOL|P_VI_DEF,
+  			    (char_u *)&p_remap, PV_NONE,
+  			    {(char_u *)TRUE, (char_u *)0L}},
+*** ../vim-7.1.235/src/quickfix.c	Sun Sep 30 14:00:41 2007
+--- src/quickfix.c	Sat Jan 19 13:04:53 2008
+***************
+*** 1803,1809 ****
+  	    /* Move the cursor to the first line in the buffer */
+  	    save_cursor = curwin->w_cursor;
+  	    curwin->w_cursor.lnum = 0;
+! 	    if (!do_search(NULL, '/', qf_ptr->qf_pattern, (long)1, SEARCH_KEEP))
+  		curwin->w_cursor = save_cursor;
+  	}
+  
+--- 1803,1810 ----
+  	    /* Move the cursor to the first line in the buffer */
+  	    save_cursor = curwin->w_cursor;
+  	    curwin->w_cursor.lnum = 0;
+! 	    if (!do_search(NULL, '/', qf_ptr->qf_pattern, (long)1,
+! 							   SEARCH_KEEP, NULL))
+  		curwin->w_cursor = save_cursor;
+  	}
+  
+***************
+*** 3159,3165 ****
+  	    {
+  		col = 0;
+  		while (vim_regexec_multi(&regmatch, curwin, buf, lnum,
+! 								     col) > 0)
+  		{
+  		    ;
+  		    if (qf_add_entry(qi, &prevp,
+--- 3160,3166 ----
+  	    {
+  		col = 0;
+  		while (vim_regexec_multi(&regmatch, curwin, buf, lnum,
+! 							       col, NULL) > 0)
+  		{
+  		    ;
+  		    if (qf_add_entry(qi, &prevp,
+*** ../vim-7.1.235/src/regexp.c	Fri Jan 18 20:36:40 2008
+--- src/regexp.c	Sat Jan 19 15:18:12 2008
+***************
+*** 3040,3046 ****
+  } save_se_T;
+  
+  static char_u	*reg_getline __ARGS((linenr_T lnum));
+! static long	vim_regexec_both __ARGS((char_u *line, colnr_T col));
+  static long	regtry __ARGS((regprog_T *prog, colnr_T col));
+  static void	cleanup_subexpr __ARGS((void));
+  #ifdef FEAT_SYN_HL
+--- 3040,3046 ----
+  } save_se_T;
+  
+  static char_u	*reg_getline __ARGS((linenr_T lnum));
+! static long	vim_regexec_both __ARGS((char_u *line, colnr_T col, proftime_T *tm));
+  static long	regtry __ARGS((regprog_T *prog, colnr_T col));
+  static void	cleanup_subexpr __ARGS((void));
+  #ifdef FEAT_SYN_HL
+***************
+*** 3284,3290 ****
+      ireg_icombine = FALSE;
+  #endif
+      ireg_maxcol = 0;
+!     return (vim_regexec_both(line, col) != 0);
+  }
+  
+  #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+--- 3284,3290 ----
+      ireg_icombine = FALSE;
+  #endif
+      ireg_maxcol = 0;
+!     return (vim_regexec_both(line, col, NULL) != 0);
+  }
+  
+  #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+***************
+*** 3308,3314 ****
+      ireg_icombine = FALSE;
+  #endif
+      ireg_maxcol = 0;
+!     return (vim_regexec_both(line, col) != 0);
+  }
+  #endif
+  
+--- 3308,3314 ----
+      ireg_icombine = FALSE;
+  #endif
+      ireg_maxcol = 0;
+!     return (vim_regexec_both(line, col, NULL) != 0);
+  }
+  #endif
+  
+***************
+*** 3321,3332 ****
+   * match otherwise.
+   */
+      long
+! vim_regexec_multi(rmp, win, buf, lnum, col)
+      regmmatch_T	*rmp;
+      win_T	*win;		/* window in which to search or NULL */
+      buf_T	*buf;		/* buffer in which to search */
+      linenr_T	lnum;		/* nr of line to start looking for match */
+      colnr_T	col;		/* column to start looking for match */
+  {
+      long	r;
+      buf_T	*save_curbuf = curbuf;
+--- 3321,3333 ----
+   * match otherwise.
+   */
+      long
+! vim_regexec_multi(rmp, win, buf, lnum, col, tm)
+      regmmatch_T	*rmp;
+      win_T	*win;		/* window in which to search or NULL */
+      buf_T	*buf;		/* buffer in which to search */
+      linenr_T	lnum;		/* nr of line to start looking for match */
+      colnr_T	col;		/* column to start looking for match */
++     proftime_T	*tm;		/* timeout limit or NULL */
+  {
+      long	r;
+      buf_T	*save_curbuf = curbuf;
+***************
+*** 3346,3352 ****
+  
+      /* Need to switch to buffer "buf" to make vim_iswordc() work. */
+      curbuf = buf;
+!     r = vim_regexec_both(NULL, col);
+      curbuf = save_curbuf;
+  
+      return r;
+--- 3347,3353 ----
+  
+      /* Need to switch to buffer "buf" to make vim_iswordc() work. */
+      curbuf = buf;
+!     r = vim_regexec_both(NULL, col, tm);
+      curbuf = save_curbuf;
+  
+      return r;
+***************
+*** 3356,3365 ****
+   * Match a regexp against a string ("line" points to the string) or multiple
+   * lines ("line" is NULL, use reg_getline()).
+   */
+      static long
+! vim_regexec_both(line, col)
+      char_u	*line;
+      colnr_T	col;		/* column to start looking for match */
+  {
+      regprog_T	*prog;
+      char_u	*s;
+--- 3357,3368 ----
+   * Match a regexp against a string ("line" points to the string) or multiple
+   * lines ("line" is NULL, use reg_getline()).
+   */
++ /*ARGSUSED*/
+      static long
+! vim_regexec_both(line, col, tm)
+      char_u	*line;
+      colnr_T	col;		/* column to start looking for match */
++     proftime_T	*tm;		/* timeout limit or NULL */
+  {
+      regprog_T	*prog;
+      char_u	*s;
+***************
+*** 3502,3507 ****
+--- 3505,3513 ----
+      }
+      else
+      {
++ #ifdef FEAT_RELTIME
++ 	int tm_count = 0;
++ #endif
+  	/* Messy cases:  unanchored match. */
+  	while (!got_int)
+  	{
+***************
+*** 3550,3555 ****
+--- 3556,3570 ----
+  	    else
+  #endif
+  		++col;
++ #ifdef FEAT_RELTIME
++ 	    /* Check for timeout once in a twenty times to avoid overhead. */
++ 	    if (tm != NULL && ++tm_count == 20)
++ 	    {
++ 		tm_count = 0;
++ 		if (profile_passed_limit(tm))
++ 		    break;
++ 	    }
++ #endif
+  	}
+      }
+  
+*** ../vim-7.1.235/src/proto/regexp.pro	Sat May  5 19:42:08 2007
+--- src/proto/regexp.pro	Sat Jan 19 13:14:09 2008
+***************
+*** 1,13 ****
+  /* regexp.c */
+- void free_regexp_stuff __ARGS((void));
+  int re_multiline __ARGS((regprog_T *prog));
+  int re_lookbehind __ARGS((regprog_T *prog));
+  char_u *skip_regexp __ARGS((char_u *startp, int dirc, int magic, char_u **newp));
+  regprog_T *vim_regcomp __ARGS((char_u *expr, int re_flags));
+  int vim_regcomp_had_eol __ARGS((void));
+  int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+  int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+! long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col));
+  reg_extmatch_T *ref_extmatch __ARGS((reg_extmatch_T *em));
+  void unref_extmatch __ARGS((reg_extmatch_T *em));
+  char_u *regtilde __ARGS((char_u *source, int magic));
+--- 1,13 ----
+  /* regexp.c */
+  int re_multiline __ARGS((regprog_T *prog));
+  int re_lookbehind __ARGS((regprog_T *prog));
+  char_u *skip_regexp __ARGS((char_u *startp, int dirc, int magic, char_u **newp));
+  regprog_T *vim_regcomp __ARGS((char_u *expr, int re_flags));
+  int vim_regcomp_had_eol __ARGS((void));
++ void free_regexp_stuff __ARGS((void));
+  int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+  int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+! long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
+  reg_extmatch_T *ref_extmatch __ARGS((reg_extmatch_T *em));
+  void unref_extmatch __ARGS((reg_extmatch_T *em));
+  char_u *regtilde __ARGS((char_u *source, int magic));
+*** ../vim-7.1.235/src/proto/search.pro	Sun Jan  6 20:05:36 2008
+--- src/proto/search.pro	Fri Jan 18 21:03:49 2008
+***************
+*** 11,17 ****
+  void set_last_search_pat __ARGS((char_u *s, int idx, int magic, int setlast));
+  void last_pat_prog __ARGS((regmmatch_T *regmatch));
+  int searchit __ARGS((win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm));
+! int do_search __ARGS((oparg_T *oap, int dirc, char_u *pat, long count, int options));
+  int search_for_exact_line __ARGS((buf_T *buf, pos_T *pos, int dir, char_u *pat));
+  int searchc __ARGS((cmdarg_T *cap, int t_cmd));
+  pos_T *findmatch __ARGS((oparg_T *oap, int initc));
+--- 11,17 ----
+  void set_last_search_pat __ARGS((char_u *s, int idx, int magic, int setlast));
+  void last_pat_prog __ARGS((regmmatch_T *regmatch));
+  int searchit __ARGS((win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm));
+! int do_search __ARGS((oparg_T *oap, int dirc, char_u *pat, long count, int options, proftime_T *tm));
+  int search_for_exact_line __ARGS((buf_T *buf, pos_T *pos, int dir, char_u *pat));
+  int searchc __ARGS((cmdarg_T *cap, int t_cmd));
+  pos_T *findmatch __ARGS((oparg_T *oap, int initc));
+*** ../vim-7.1.235/src/search.c	Sun Jan  6 20:05:36 2008
+--- src/search.c	Sat Jan 19 13:13:25 2008
+***************
+*** 606,612 ****
+  		 * Look for a match somewhere in line "lnum".
+  		 */
+  		nmatched = vim_regexec_multi(&regmatch, win, buf,
+! 							    lnum, (colnr_T)0);
+  		/* Abort searching on an error (e.g., out of stack). */
+  		if (called_emsg)
+  		    break;
+--- 606,618 ----
+  		 * Look for a match somewhere in line "lnum".
+  		 */
+  		nmatched = vim_regexec_multi(&regmatch, win, buf,
+! 						      lnum, (colnr_T)0,
+! #ifdef FEAT_RELTIME
+! 						      tm
+! #else
+! 						      NULL
+! #endif
+! 						      );
+  		/* Abort searching on an error (e.g., out of stack). */
+  		if (called_emsg)
+  		    break;
+***************
+*** 615,623 ****
+  		    /* match may actually be in another line when using \zs */
+  		    matchpos = regmatch.startpos[0];
+  		    endpos = regmatch.endpos[0];
+! # ifdef FEAT_EVAL
+  		    submatch = first_submatch(&regmatch);
+! # endif
+  		    /* Line me be past end of buffer for "\n\zs". */
+  		    if (lnum + matchpos.lnum > buf->b_ml.ml_line_count)
+  			ptr = (char_u *)"";
+--- 621,629 ----
+  		    /* match may actually be in another line when using \zs */
+  		    matchpos = regmatch.startpos[0];
+  		    endpos = regmatch.endpos[0];
+! #ifdef FEAT_EVAL
+  		    submatch = first_submatch(&regmatch);
+! #endif
+  		    /* Line me be past end of buffer for "\n\zs". */
+  		    if (lnum + matchpos.lnum > buf->b_ml.ml_line_count)
+  			ptr = (char_u *)"";
+***************
+*** 693,699 ****
+  			    if (ptr[matchcol] == NUL
+  				    || (nmatched = vim_regexec_multi(&regmatch,
+  					      win, buf, lnum + matchpos.lnum,
+! 					      matchcol)) == 0)
+  			    {
+  				match_ok = FALSE;
+  				break;
+--- 699,711 ----
+  			    if (ptr[matchcol] == NUL
+  				    || (nmatched = vim_regexec_multi(&regmatch,
+  					      win, buf, lnum + matchpos.lnum,
+! 					      matchcol,
+! #ifdef FEAT_RELTIME
+! 					      tm
+! #else
+! 					      NULL
+! #endif
+! 					      )) == 0)
+  			    {
+  				match_ok = FALSE;
+  				break;
+***************
+*** 799,805 ****
+  			    if (ptr[matchcol] == NUL
+  				    || (nmatched = vim_regexec_multi(&regmatch,
+  					      win, buf, lnum + matchpos.lnum,
+! 							      matchcol)) == 0)
+  				break;
+  
+  			    /* Need to get the line pointer again, a
+--- 811,823 ----
+  			    if (ptr[matchcol] == NUL
+  				    || (nmatched = vim_regexec_multi(&regmatch,
+  					      win, buf, lnum + matchpos.lnum,
+! 					      matchcol,
+! #ifdef FEAT_RELTIME
+! 					      tm
+! #else
+! 					      NULL
+! #endif
+! 					    )) == 0)
+  				break;
+  
+  			    /* Need to get the line pointer again, a
+***************
+*** 977,988 ****
+   * return 0 for failure, 1 for found, 2 for found and line offset added
+   */
+      int
+! do_search(oap, dirc, pat, count, options)
+      oparg_T	    *oap;	/* can be NULL */
+      int		    dirc;	/* '/' or '?' */
+      char_u	   *pat;
+      long	    count;
+      int		    options;
+  {
+      pos_T	    pos;	/* position of the last match */
+      char_u	    *searchstr;
+--- 995,1007 ----
+   * return 0 for failure, 1 for found, 2 for found and line offset added
+   */
+      int
+! do_search(oap, dirc, pat, count, options, tm)
+      oparg_T	    *oap;	/* can be NULL */
+      int		    dirc;	/* '/' or '?' */
+      char_u	   *pat;
+      long	    count;
+      int		    options;
++     proftime_T	    *tm;	/* timeout limit or NULL */
+  {
+      pos_T	    pos;	/* position of the last match */
+      char_u	    *searchstr;
+***************
+*** 1256,1262 ****
+  		       (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+  			+ SEARCH_MSG + SEARCH_START
+  			+ ((pat != NULL && *pat == ';') ? 0 : SEARCH_NOOF))),
+! 		RE_LAST, (linenr_T)0, NULL);
+  
+  	if (dircp != NULL)
+  	    *dircp = dirc;	/* restore second '/' or '?' for normal_cmd() */
+--- 1275,1281 ----
+  		       (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+  			+ SEARCH_MSG + SEARCH_START
+  			+ ((pat != NULL && *pat == ';') ? 0 : SEARCH_NOOF))),
+! 		RE_LAST, (linenr_T)0, tm);
+  
+  	if (dircp != NULL)
+  	    *dircp = dirc;	/* restore second '/' or '?' for normal_cmd() */
+*** ../vim-7.1.235/src/screen.c	Sat Jan 12 16:45:25 2008
+--- src/screen.c	Sat Jan 19 13:52:29 2008
+***************
+*** 848,858 ****
+--- 848,863 ----
+  	cur->hl.buf = buf;
+  	cur->hl.lnum = 0;
+  	cur->hl.first_lnum = 0;
++ # ifdef FEAT_RELTIME
++ 	/* Set the time limit to 'redrawtime'. */
++ 	profile_setlimit(p_rdt, &(cur->hl.tm));
++ # endif
+  	cur = cur->next;
+      }
+      search_hl.buf = buf;
+      search_hl.lnum = 0;
+      search_hl.first_lnum = 0;
++     /* time limit is set at the toplevel, for all windows */
+  #endif
+  
+  #ifdef FEAT_LINEBREAK
+***************
+*** 6462,6467 ****
+--- 6467,6476 ----
+      {
+  	last_pat_prog(&search_hl.rm);
+  	search_hl.attr = hl_attr(HLF_L);
++ # ifdef FEAT_RELTIME
++ 	/* Set the time limit to 'redrawtime'. */
++ 	profile_setlimit(p_rdt, &search_hl.tm);
++ # endif
+      }
+  }
+  
+***************
+*** 6587,6592 ****
+--- 6596,6609 ----
+      called_emsg = FALSE;
+      for (;;)
+      {
++ #ifdef FEAT_RELTIME
++ 	/* Stop searching after passing the time limit. */
++ 	if (profile_passed_limit(&(shl->tm)))
++ 	{
++ 	    shl->lnum = 0;		/* no match found in time */
++ 	    break;
++ 	}
++ #endif
+  	/* Three situations:
+  	 * 1. No useful previous match: search from start of line.
+  	 * 2. Not Vi compatible or empty match: continue at next character.
+***************
+*** 6620,6626 ****
+  	    matchcol = shl->rm.endpos[0].col;
+  
+  	shl->lnum = lnum;
+! 	nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol);
+  	if (called_emsg)
+  	{
+  	    /* Error while handling regexp: stop using this regexp. */
+--- 6637,6649 ----
+  	    matchcol = shl->rm.endpos[0].col;
+  
+  	shl->lnum = lnum;
+! 	nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
+! #ifdef FEAT_RELTIME
+! 		&(shl->tm)
+! #else
+! 		NULL
+! #endif
+! 		);
+  	if (called_emsg)
+  	{
+  	    /* Error while handling regexp: stop using this regexp. */
+*** ../vim-7.1.235/src/option.h	Thu May 10 20:34:47 2007
+--- src/option.h	Sat Jan 19 13:45:51 2008
+***************
+*** 633,638 ****
+--- 633,641 ----
+  #ifdef FEAT_SEARCHPATH
+  EXTERN char_u	*p_cdpath;	/* 'cdpath' */
+  #endif
++ #ifdef FEAT_RELTIME
++ EXTERN long	p_rdt;		/* 'redrawtime' */
++ #endif
+  EXTERN int	p_remap;	/* 'remap' */
+  EXTERN long	p_report;	/* 'report' */
+  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+*** ../vim-7.1.235/src/spell.c	Sat Jan 12 16:45:25 2008
+--- src/spell.c	Fri Jan 18 21:02:47 2008
+***************
+*** 10343,10349 ****
+      curwin->w_cursor.lnum = 0;
+      while (!got_int)
+      {
+! 	if (do_search(NULL, '/', frompat, 1L, SEARCH_KEEP) == 0
+  						   || u_save_cursor() == FAIL)
+  	    break;
+  
+--- 10343,10349 ----
+      curwin->w_cursor.lnum = 0;
+      while (!got_int)
+      {
+! 	if (do_search(NULL, '/', frompat, 1L, SEARCH_KEEP, NULL) == 0
+  						   || u_save_cursor() == FAIL)
+  	    break;
+  
+*** ../vim-7.1.235/src/structs.h	Mon Oct  1 22:53:27 2007
+--- src/structs.h	Fri Jan 18 21:18:53 2008
+***************
+*** 1717,1722 ****
+--- 1717,1725 ----
+      linenr_T	first_lnum;	/* first lnum to search for multi-line pat */
+      colnr_T	startcol; /* in win_line() points to char where HL starts */
+      colnr_T	endcol;	 /* in win_line() points to char where HL ends */
++ #ifdef FEAT_RELTIME
++     proftime_T	tm;	/* for a time limit */
++ #endif
+  } match_T;
+  
+  /*
+*** ../vim-7.1.235/src/syntax.c	Sun Jan 13 17:39:29 2008
+--- src/syntax.c	Sat Jan 19 13:13:49 2008
+***************
+*** 3097,3103 ****
+      colnr_T	col;
+  {
+      rmp->rmm_maxcol = syn_buf->b_p_smc;
+!     if (vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col) > 0)
+      {
+  	rmp->startpos[0].lnum += lnum;
+  	rmp->endpos[0].lnum += lnum;
+--- 3097,3103 ----
+      colnr_T	col;
+  {
+      rmp->rmm_maxcol = syn_buf->b_p_smc;
+!     if (vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col, NULL) > 0)
+      {
+  	rmp->startpos[0].lnum += lnum;
+  	rmp->endpos[0].lnum += lnum;
+*** ../vim-7.1.235/src/tag.c	Thu May 10 19:44:07 2007
+--- src/tag.c	Fri Jan 18 21:03:41 2008
+***************
+*** 3191,3197 ****
+  #endif
+  	    save_lnum = curwin->w_cursor.lnum;
+  	    curwin->w_cursor.lnum = 0;	/* start search before first line */
+! 	    if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, search_options))
+  		retval = OK;
+  	    else
+  	    {
+--- 3191,3198 ----
+  #endif
+  	    save_lnum = curwin->w_cursor.lnum;
+  	    curwin->w_cursor.lnum = 0;	/* start search before first line */
+! 	    if (do_search(NULL, pbuf[0], pbuf + 1, (long)1,
+! 							search_options, NULL))
+  		retval = OK;
+  	    else
+  	    {
+***************
+*** 3203,3209 ****
+  		 */
+  		p_ic = TRUE;
+  		if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1,
+! 							      search_options))
+  		{
+  		    /*
+  		     * Failed to find pattern, take a guess: "^func  ("
+--- 3204,3210 ----
+  		 */
+  		p_ic = TRUE;
+  		if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1,
+! 							search_options, NULL))
+  		{
+  		    /*
+  		     * Failed to find pattern, take a guess: "^func  ("
+***************
+*** 3213,3225 ****
+  		    cc = *tagp.tagname_end;
+  		    *tagp.tagname_end = NUL;
+  		    sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname);
+! 		    if (!do_search(NULL, '/', pbuf, (long)1, search_options))
+  		    {
+  			/* Guess again: "^char * \<func  (" */
+  			sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(",
+  								tagp.tagname);
+  			if (!do_search(NULL, '/', pbuf, (long)1,
+! 							      search_options))
+  			    found = 0;
+  		    }
+  		    *tagp.tagname_end = cc;
+--- 3214,3227 ----
+  		    cc = *tagp.tagname_end;
+  		    *tagp.tagname_end = NUL;
+  		    sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname);
+! 		    if (!do_search(NULL, '/', pbuf, (long)1,
+! 							search_options, NULL))
+  		    {
+  			/* Guess again: "^char * \<func  (" */
+  			sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(",
+  								tagp.tagname);
+  			if (!do_search(NULL, '/', pbuf, (long)1,
+! 							search_options, NULL))
+  			    found = 0;
+  		    }
+  		    *tagp.tagname_end = cc;
+*** ../vim-7.1.235/src/vim.h	Sat Jan  5 13:34:01 2008
+--- src/vim.h	Fri Jan 18 21:29:22 2008
+***************
+*** 1550,1555 ****
+--- 1550,1565 ----
+  # define MB_MAXBYTES	21
+  #endif
+  
++ #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
++ # ifdef WIN3264
++ typedef LARGE_INTEGER proftime_T;
++ # else
++ typedef struct timeval proftime_T;
++ # endif
++ #else
++ typedef int proftime_T;	    /* dummy for function prototypes */
++ #endif
++ 
+  /* Include option.h before structs.h, because the number of window-local and
+   * buffer-local options is used there. */
+  #include "option.h"	    /* options and default values */
+***************
+*** 1760,1775 ****
+  # include <io.h>	    /* for access() */
+  
+  # define stat(a,b) (access(a,0) ? -1 : stat(a,b))
+- #endif
+- 
+- #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
+- # ifdef WIN3264
+- typedef LARGE_INTEGER proftime_T;
+- # else
+- typedef struct timeval proftime_T;
+- # endif
+- #else
+- typedef int proftime_T;	    /* dummy for function prototypes */
+  #endif
+  
+  #include "ex_cmds.h"	    /* Ex command defines */
+--- 1770,1775 ----
+*** ../vim-7.1.235/src/version.c	Fri Jan 18 20:36:40 2008
+--- src/version.c	Sat Jan 19 15:19:48 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     236,
+  /**/
+
+-- 
+Every time I lose weight, it finds me again!
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.237
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.237?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.237 (added)
+++ trunk/packages/vim/upstream/patches/7.1.237 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,54 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.237
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.237
+Problem:    Compiler warning on an Alpha processor in Motif code.
+Solution:   Change a typecast. (Adri Verhoef)
+Files:	    src/gui_motif.c
+
+
+*** ../vim-7.1.236/src/gui_motif.c	Thu May 10 19:51:05 2007
+--- src/gui_motif.c	Mon Jan 21 21:03:55 2008
+***************
+*** 3813,3819 ****
+  
+      XtAddCallback(frdp->find, XmNactivateCallback,
+  	    find_replace_callback,
+! 	    (XtPointer) (do_replace ? FRD_R_FINDNEXT : FRD_FINDNEXT));
+  
+      if (do_replace)
+      {
+--- 3813,3819 ----
+  
+      XtAddCallback(frdp->find, XmNactivateCallback,
+  	    find_replace_callback,
+! 	    (do_replace ? (XtPointer)FRD_R_FINDNEXT : (XtPointer)FRD_FINDNEXT));
+  
+      if (do_replace)
+      {
+*** ../vim-7.1.236/src/version.c	Sat Jan 19 15:55:51 2008
+--- src/version.c	Tue Jan 22 11:05:12 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     237,
+  /**/
+
+-- 
+I am always surprised in the Linux world how quickly solutions can be
+obtained.  (Imagine sending an email to Bill Gates, asking why Windows
+crashed, and how to fix it...  and then getting an answer that fixed the
+problem... <0>_<0> !)		              -- Mark Langdon
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.238
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.238?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.238 (added)
+++ trunk/packages/vim/upstream/patches/7.1.238 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,61 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.238
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.238
+Problem:    Using the 'c' flag with searchpair() may cause it to fail.  Using
+	    the 'r' flag doesn't work when 'wrapscan' is set.  (A.Politz)
+Solution:   Only use the 'c' flag for the first search, not for repeating.
+	    When using 'r' imply 'W'. (Antony Scriven)
+Files:	    src/eval.c
+
+
+*** ../vim-7.1.237/src/eval.c	Sat Jan 12 16:45:25 2008
+--- src/eval.c	Tue Jan 22 11:42:28 2008
+***************
+*** 14189,14194 ****
+--- 14189,14198 ----
+  	goto theend;
+      }
+  
++     /* Using 'r' implies 'W', otherwise it doesn't work. */
++     if (flags & SP_REPEAT)
++ 	p_ws = FALSE;
++ 
+      /* Optional fifth argument: skip expression */
+      if (argvars[3].v_type == VAR_UNKNOWN
+  	    || argvars[4].v_type == VAR_UNKNOWN)
+***************
+*** 14344,14349 ****
+--- 14348,14356 ----
+  		incl(&pos);
+  	}
+  	foundpos = pos;
++ 
++ 	/* clear the start flag to avoid getting stuck here */
++ 	options &= ~SEARCH_START;
+  
+  	/* If the skip pattern matches, ignore this match. */
+  	if (*skip != NUL)
+*** ../vim-7.1.237/src/version.c	Tue Jan 22 11:06:06 2008
+--- src/version.c	Tue Jan 22 11:57:28 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     238,
+  /**/
+
+-- 
+To keep milk from turning sour: Keep it in the cow.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.239
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.239?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.239 (added)
+++ trunk/packages/vim/upstream/patches/7.1.239 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,53 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.239
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.239 (after 7.1.233)
+Problem:    Compiler warning for sprintf() argument.
+Solution:   Add a typecast. (Nico Weber)
+Files:	    src/ex_getln.c
+
+
+*** ../vim-7.1.238/src/ex_getln.c	Sat Jan 19 15:55:51 2008
+--- src/ex_getln.c	Tue Jan 22 12:40:54 2008
+***************
+*** 4694,4700 ****
+      {
+  	/* Completion from Insert mode, pass fake arguments. */
+  	keep = 0;
+! 	sprintf((char *)num, "%d", STRLEN(xp->xp_pattern));
+  	args[1] = xp->xp_pattern;
+      }
+      else
+--- 4694,4700 ----
+      {
+  	/* Completion from Insert mode, pass fake arguments. */
+  	keep = 0;
+! 	sprintf((char *)num, "%d", (int)STRLEN(xp->xp_pattern));
+  	args[1] = xp->xp_pattern;
+      }
+      else
+*** ../vim-7.1.238/src/version.c	Tue Jan 22 11:58:41 2008
+--- src/version.c	Tue Jan 22 12:42:36 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     239,
+  /**/
+
+-- 
+We apologise again for the fault in the subtitles.  Those responsible for
+sacking the people who have just been sacked have been sacked.
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.240
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.240?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.240 (added)
+++ trunk/packages/vim/upstream/patches/7.1.240 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,186 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.240
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.240
+Problem:    When "gUe" turns a German sharp s into SS the operation stops
+            before the end of the word.  Latin2 has the same sharp s but it's
+            not changed to SS there.
+Solution:   Make sure all the characters are operated upon.  Detect the sharp
+            s in latin2.  Also fixes that changing case of a multi-byte
+            character that changes the byte cound doesn't always work.
+Files:      src/ops.c
+
+
+*** ../vim-7.1.239/src/ops.c	Wed Jan 16 20:01:14 2008
+--- src/ops.c	Tue Jan 22 16:00:07 2008
+***************
+*** 2184,2189 ****
+--- 2184,2191 ----
+  }
+  #endif
+  
++ static int swapchars __ARGS((int op_type, pos_T *pos, int length));
++ 
+  /*
+   * Handle the (non-standard vi) tilde operator.  Also for "gu", "gU" and "g?".
+   */
+***************
+*** 2194,2202 ****
+      pos_T		pos;
+  #ifdef FEAT_VISUAL
+      struct block_def	bd;
+-     int			todo;
+  #endif
+!     int			did_change = 0;
+  
+      if (u_save((linenr_T)(oap->start.lnum - 1),
+  				       (linenr_T)(oap->end.lnum + 1)) == FAIL)
+--- 2196,2203 ----
+      pos_T		pos;
+  #ifdef FEAT_VISUAL
+      struct block_def	bd;
+  #endif
+!     int			did_change;
+  
+      if (u_save((linenr_T)(oap->start.lnum - 1),
+  				       (linenr_T)(oap->end.lnum + 1)) == FAIL)
+***************
+*** 2210,2225 ****
+  	{
+  	    block_prep(oap, &bd, pos.lnum, FALSE);
+  	    pos.col = bd.textcol;
+! 	    for (todo = bd.textlen; todo > 0; --todo)
+! 	    {
+! # ifdef FEAT_MBYTE
+! 		if (has_mbyte)
+! 		    todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
+! # endif
+! 		did_change |= swapchar(oap->op_type, &pos);
+! 		if (inc(&pos) == -1)	    /* at end of file */
+! 		    break;
+! 	    }
+  # ifdef FEAT_NETBEANS_INTG
+  	    if (usingNetbeans && did_change)
+  	    {
+--- 2211,2218 ----
+  	{
+  	    block_prep(oap, &bd, pos.lnum, FALSE);
+  	    pos.col = bd.textcol;
+! 	    did_change = swapchars(oap->op_type, &pos, bd.textlen);
+! 
+  # ifdef FEAT_NETBEANS_INTG
+  	    if (usingNetbeans && did_change)
+  	    {
+***************
+*** 2249,2261 ****
+  	else if (!oap->inclusive)
+  	    dec(&(oap->end));
+  
+! 	while (ltoreq(pos, oap->end))
+! 	{
+! 	    did_change |= swapchar(oap->op_type, &pos);
+! 	    if (inc(&pos) == -1)    /* at end of file */
+! 		break;
+! 	}
+! 
+  	if (did_change)
+  	{
+  	    changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
+--- 2242,2248 ----
+  	else if (!oap->inclusive)
+  	    dec(&(oap->end));
+  
+! 	did_change = swapchars(oap->op_type, &pos, oap->end.col - pos.col + 1);
+  	if (did_change)
+  	{
+  	    changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
+***************
+*** 2309,2314 ****
+--- 2296,2337 ----
+  }
+  
+  /*
++  * Invoke swapchar() on "length" bytes at position "pos".
++  * "pos" is advanced to just after the changed characters.
++  * "length" is rounded up to include the whole last multi-byte character.
++  * Also works correctly when the number of bytes changes.
++  * Returns TRUE if some character was changed.
++  */
++     static int
++ swapchars(op_type, pos, length)
++     int		op_type;
++     pos_T	*pos;
++     int		length;
++ {
++     int todo;
++     int	did_change = 0;
++ 
++     for (todo = length; todo > 0; --todo)
++     {
++ # ifdef FEAT_MBYTE
++ 	int pos_col = pos->col;
++ 
++ 	if (has_mbyte)
++ 	    /* we're counting bytes, not characters */
++ 	    todo -= (*mb_ptr2len)(ml_get_pos(pos)) - 1;
++ # endif
++ 	did_change |= swapchar(op_type, pos);
++ # ifdef FEAT_MBYTE
++ 	/* Changing German sharp s to SS increases the column. */
++ 	todo += pos->col - pos_col;
++ # endif
++ 	if (inc(pos) == -1)    /* at end of file */
++ 	    break;
++     }
++     return did_change;
++ }
++ 
++ /*
+   * If op_type == OP_UPPER: make uppercase,
+   * if op_type == OP_LOWER: make lowercase,
+   * if op_type == OP_ROT13: do rot13 encoding,
+***************
+*** 2330,2336 ****
+  	return FALSE;
+  
+  #ifdef FEAT_MBYTE
+!     if (op_type == OP_UPPER && enc_latin1like && c == 0xdf)
+      {
+  	pos_T   sp = curwin->w_cursor;
+  
+--- 2353,2360 ----
+  	return FALSE;
+  
+  #ifdef FEAT_MBYTE
+!     if (op_type == OP_UPPER && c == 0xdf
+! 		      && (enc_latin1like || STRCMP(p_enc, "iso-8859-2") == 0))
+      {
+  	pos_T   sp = curwin->w_cursor;
+  
+*** ../vim-7.1.239/src/version.c	Tue Jan 22 12:44:03 2008
+--- src/version.c	Tue Jan 22 15:36:36 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     240,
+  /**/
+
+-- 
+ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot.
+        King of all Britons, defeator of the Saxons, sovereign of all England!
+   [Pause]
+SOLDIER: Get away!
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.241
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.241?rev=1168&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.241 (added)
+++ trunk/packages/vim/upstream/patches/7.1.241 Wed Jan 23 19:55:16 2008
@@ -1,0 +1,112 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.241
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.241
+Problem:    Focus change events not always ignored.  (Erik Falor)
+Solution:   Ignore K_IGNORE in Insert mode in a few more places.
+Files:	    src/edit.c
+
+
+*** ../vim-7.1.240/src/edit.c	Wed Jan 16 20:01:14 2008
+--- src/edit.c	Tue Jan 22 17:45:32 2008
+***************
+*** 703,712 ****
+  #endif
+  
+  	/*
+! 	 * Get a character for Insert mode.
+  	 */
+  	lastc = c;			/* remember previous char for CTRL-D */
+! 	c = safe_vgetc();
+  
+  #ifdef FEAT_AUTOCMD
+  	/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
+--- 703,715 ----
+  #endif
+  
+  	/*
+! 	 * Get a character for Insert mode.  Ignore K_IGNORE.
+  	 */
+  	lastc = c;			/* remember previous char for CTRL-D */
+! 	do
+! 	{
+! 	    c = safe_vgetc();
+! 	} while (c == K_IGNORE);
+  
+  #ifdef FEAT_AUTOCMD
+  	/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
+***************
+*** 777,783 ****
+  	/* Prepare for or stop CTRL-X mode.  This doesn't do completion, but
+  	 * it does fix up the text when finishing completion. */
+  	compl_get_longest = FALSE;
+! 	if (c != K_IGNORE && ins_compl_prep(c))
+  	    continue;
+  #endif
+  
+--- 780,786 ----
+  	/* Prepare for or stop CTRL-X mode.  This doesn't do completion, but
+  	 * it does fix up the text when finishing completion. */
+  	compl_get_longest = FALSE;
+! 	if (ins_compl_prep(c))
+  	    continue;
+  #endif
+  
+***************
+*** 4516,4530 ****
+  	else
+  	{
+  	    /* Need to get the character to have KeyTyped set.  We'll put it
+! 	     * back with vungetc() below. */
+  	    c = safe_vgetc();
+  
+! 	    /* Don't interrupt completion when the character wasn't typed,
+! 	     * e.g., when doing @q to replay keys. */
+! 	    if (c != Ctrl_R && KeyTyped)
+! 		compl_interrupted = TRUE;
+! 
+! 	    vungetc(c);
+  	}
+      }
+      if (compl_pending != 0 && !got_int)
+--- 4519,4535 ----
+  	else
+  	{
+  	    /* Need to get the character to have KeyTyped set.  We'll put it
+! 	     * back with vungetc() below.  But skip K_IGNORE. */
+  	    c = safe_vgetc();
++ 	    if (c != K_IGNORE)
++ 	    {
++ 		/* Don't interrupt completion when the character wasn't typed,
++ 		 * e.g., when doing @q to replay keys. */
++ 		if (c != Ctrl_R && KeyTyped)
++ 		    compl_interrupted = TRUE;
+  
+! 		vungetc(c);
+! 	    }
+  	}
+      }
+      if (compl_pending != 0 && !got_int)
+*** ../vim-7.1.240/src/version.c	Tue Jan 22 16:01:25 2008
+--- src/version.c	Tue Jan 22 17:48:46 2008
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     241,
+  /**/
+
+-- 
+The problem with political jokes is that they get elected.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///




More information about the pkg-vim-maintainers mailing list