lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
fd0342e
To: vim_dev@googlegroups.com
fd0342e
Subject: Patch 7.4.527
fd0342e
Fcc: outbox
fd0342e
From: Bram Moolenaar <Bram@moolenaar.net>
fd0342e
Mime-Version: 1.0
fd0342e
Content-Type: text/plain; charset=UTF-8
fd0342e
Content-Transfer-Encoding: 8bit
fd0342e
------------
fd0342e
fd0342e
Patch 7.4.527
fd0342e
Problem:    Still confusing regexp failure and NFA_TOO_EXPENSIVE.
fd0342e
Solution:   NFA changes equivalent of 7.4.526.
fd0342e
Files:	    src/regexp_nfa.c
fd0342e
fd0342e
fd0342e
*** ../vim-7.4.526/src/regexp_nfa.c	2014-11-05 14:26:30.764758363 +0100
fd0342e
--- src/regexp_nfa.c	2014-11-23 15:50:57.980625347 +0100
fd0342e
***************
fd0342e
*** 6767,6773 ****
fd0342e
  
fd0342e
  /*
fd0342e
   * Try match of "prog" with at regline["col"].
fd0342e
!  * Returns 0 for failure, number of lines contained in the match otherwise.
fd0342e
   */
fd0342e
      static long
fd0342e
  nfa_regtry(prog, col)
fd0342e
--- 6767,6773 ----
fd0342e
  
fd0342e
  /*
fd0342e
   * Try match of "prog" with at regline["col"].
fd0342e
!  * Returns <= 0 for failure, number of lines contained in the match otherwise.
fd0342e
   */
fd0342e
      static long
fd0342e
  nfa_regtry(prog, col)
fd0342e
***************
fd0342e
*** 6897,6903 ****
fd0342e
   * Match a regexp against a string ("line" points to the string) or multiple
fd0342e
   * lines ("line" is NULL, use reg_getline()).
fd0342e
   *
fd0342e
!  * Returns 0 for failure, number of lines contained in the match otherwise.
fd0342e
   */
fd0342e
      static long
fd0342e
  nfa_regexec_both(line, startcol)
fd0342e
--- 6897,6903 ----
fd0342e
   * Match a regexp against a string ("line" points to the string) or multiple
fd0342e
   * lines ("line" is NULL, use reg_getline()).
fd0342e
   *
fd0342e
!  * Returns <= 0 for failure, number of lines contained in the match otherwise.
fd0342e
   */
fd0342e
      static long
fd0342e
  nfa_regexec_both(line, startcol)
fd0342e
***************
fd0342e
*** 7137,7143 ****
fd0342e
   * Uses curbuf for line count and 'iskeyword'.
fd0342e
   * If "line_lbr" is TRUE consider a "\n" in "line" to be a line break.
fd0342e
   *
fd0342e
!  * Return TRUE if there is a match, FALSE if not.
fd0342e
   */
fd0342e
      static int
fd0342e
  nfa_regexec_nl(rmp, line, col, line_lbr)
fd0342e
--- 7137,7143 ----
fd0342e
   * Uses curbuf for line count and 'iskeyword'.
fd0342e
   * If "line_lbr" is TRUE consider a "\n" in "line" to be a line break.
fd0342e
   *
fd0342e
!  * Returns <= 0 for failure, number of lines contained in the match otherwise.
fd0342e
   */
fd0342e
      static int
fd0342e
  nfa_regexec_nl(rmp, line, col, line_lbr)
fd0342e
***************
fd0342e
*** 7157,7163 ****
fd0342e
      ireg_icombine = FALSE;
fd0342e
  #endif
fd0342e
      ireg_maxcol = 0;
fd0342e
!     return (nfa_regexec_both(line, col) != 0);
fd0342e
  }
fd0342e
  
fd0342e
  
fd0342e
--- 7157,7163 ----
fd0342e
      ireg_icombine = FALSE;
fd0342e
  #endif
fd0342e
      ireg_maxcol = 0;
fd0342e
!     return nfa_regexec_both(line, col);
fd0342e
  }
fd0342e
  
fd0342e
  
fd0342e
***************
fd0342e
*** 7166,7172 ****
fd0342e
   * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
fd0342e
   * Uses curbuf for line count and 'iskeyword'.
fd0342e
   *
fd0342e
!  * Return zero if there is no match.  Return number of lines contained in the
fd0342e
   * match otherwise.
fd0342e
   *
fd0342e
   * Note: the body is the same as bt_regexec() except for nfa_regexec_both()
fd0342e
--- 7166,7172 ----
fd0342e
   * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
fd0342e
   * Uses curbuf for line count and 'iskeyword'.
fd0342e
   *
fd0342e
!  * Return <= 0 if there is no match.  Return number of lines contained in the
fd0342e
   * match otherwise.
fd0342e
   *
fd0342e
   * Note: the body is the same as bt_regexec() except for nfa_regexec_both()
fd0342e
*** ../vim-7.4.526/src/version.c	2014-11-20 23:07:00.515474686 +0100
fd0342e
--- src/version.c	2014-11-23 15:53:23.170981186 +0100
fd0342e
***************
fd0342e
*** 743,744 ****
fd0342e
--- 743,746 ----
fd0342e
  {   /* Add new patch number below this line */
fd0342e
+ /**/
fd0342e
+     527,
fd0342e
  /**/
fd0342e
fd0342e
-- 
fd0342e
"I know that there are people who don't love their fellow man,
fd0342e
and I hate those people!" - Tom Lehrer
fd0342e
fd0342e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
fd0342e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
fd0342e
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
fd0342e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///