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