Karsten Hopp 24582d
To: vim_dev@googlegroups.com
Karsten Hopp 24582d
Subject: Patch 7.3.373
Karsten Hopp 24582d
Fcc: outbox
Karsten Hopp 24582d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 24582d
Mime-Version: 1.0
Karsten Hopp 24582d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 24582d
Content-Transfer-Encoding: 8bit
Karsten Hopp 24582d
------------
Karsten Hopp 24582d
Karsten Hopp 24582d
Patch 7.3.373 (after 7.3.366)
Karsten Hopp 24582d
Problem:    A tags file with an extremely long name may cause an infinite loop.
Karsten Hopp 24582d
Solution:   When encountering a long name switch to linear search.
Karsten Hopp 24582d
Files:	    src/tag.c
Karsten Hopp 24582d
Karsten Hopp 24582d
Karsten Hopp 24582d
*** ../vim-7.3.372/src/tag.c	2011-12-08 15:12:08.000000000 +0100
Karsten Hopp 24582d
--- src/tag.c	2011-12-14 14:13:28.000000000 +0100
Karsten Hopp 24582d
***************
Karsten Hopp 24582d
*** 1854,1860 ****
Karsten Hopp 24582d
  
Karsten Hopp 24582d
  		if (state == TS_BINARY && orgpat.regmatch.rm_ic && !sortic)
Karsten Hopp 24582d
  		{
Karsten Hopp 24582d
! 		    /* binary search won't work for ignoring case, use linear
Karsten Hopp 24582d
  		     * search. */
Karsten Hopp 24582d
  		    linear = TRUE;
Karsten Hopp 24582d
  		    state = TS_LINEAR;
Karsten Hopp 24582d
--- 1854,1860 ----
Karsten Hopp 24582d
  
Karsten Hopp 24582d
  		if (state == TS_BINARY && orgpat.regmatch.rm_ic && !sortic)
Karsten Hopp 24582d
  		{
Karsten Hopp 24582d
! 		    /* Binary search won't work for ignoring case, use linear
Karsten Hopp 24582d
  		     * search. */
Karsten Hopp 24582d
  		    linear = TRUE;
Karsten Hopp 24582d
  		    state = TS_LINEAR;
Karsten Hopp 24582d
***************
Karsten Hopp 24582d
*** 1922,1927 ****
Karsten Hopp 24582d
--- 1922,1940 ----
Karsten Hopp 24582d
  			    MSG(_("Ignoring long line in tags file"));
Karsten Hopp 24582d
  			    verbose_leave();
Karsten Hopp 24582d
  			}
Karsten Hopp 24582d
+ #ifdef FEAT_TAG_BINS
Karsten Hopp 24582d
+ 			if (state != TS_LINEAR)
Karsten Hopp 24582d
+ 			{
Karsten Hopp 24582d
+ 			    /* Avoid getting stuck. */
Karsten Hopp 24582d
+ 			    linear = TRUE;
Karsten Hopp 24582d
+ 			    state = TS_LINEAR;
Karsten Hopp 24582d
+ # ifdef HAVE_FSEEKO
Karsten Hopp 24582d
+ 			    fseeko(fp, search_info.low_offset, SEEK_SET);
Karsten Hopp 24582d
+ # else
Karsten Hopp 24582d
+ 			    fseek(fp, (long)search_info.low_offset, SEEK_SET);
Karsten Hopp 24582d
+ # endif
Karsten Hopp 24582d
+ 			}
Karsten Hopp 24582d
+ #endif
Karsten Hopp 24582d
  			continue;
Karsten Hopp 24582d
  		    }
Karsten Hopp 24582d
  
Karsten Hopp 24582d
*** ../vim-7.3.372/src/version.c	2011-12-08 18:44:47.000000000 +0100
Karsten Hopp 24582d
--- src/version.c	2011-12-14 14:12:06.000000000 +0100
Karsten Hopp 24582d
***************
Karsten Hopp 24582d
*** 716,717 ****
Karsten Hopp 24582d
--- 716,719 ----
Karsten Hopp 24582d
  {   /* Add new patch number below this line */
Karsten Hopp 24582d
+ /**/
Karsten Hopp 24582d
+     373,
Karsten Hopp 24582d
  /**/
Karsten Hopp 24582d
Karsten Hopp 24582d
-- 
Karsten Hopp 24582d
ZOOT:  I'm afraid our life must seem very dull and quiet compared to yours.
Karsten Hopp 24582d
       We are but eightscore young blondes, all between sixteen and
Karsten Hopp 24582d
       nineteen-and-a-half, cut off in this castle, with no one to protect us.
Karsten Hopp 24582d
       Oooh.  It is a lonely life ... bathing ...  dressing ... undressing ...
Karsten Hopp 24582d
       making exciting underwear....
Karsten Hopp 24582d
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 24582d
Karsten Hopp 24582d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 24582d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 24582d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 24582d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///