jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.437

073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.437
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.437
073263
Problem:    New and old regexp engine are not consistent.
073263
Solution:   Also give an error for "\ze*" for the old regexp engine.
073263
Files:	    src/regexp.c, src/regexp_nfa.c
073263
073263
073263
*** ../vim-7.4.436/src/regexp.c	2014-07-09 19:32:30.935678834 +0200
073263
--- src/regexp.c	2014-09-09 17:11:32.444539356 +0200
073263
***************
073263
*** 358,363 ****
073263
--- 358,365 ----
073263
  static char_u	*regprop __ARGS((char_u *));
073263
  #endif
073263
  
073263
+ static int re_mult_next __ARGS((char *what));
073263
+ 
073263
  static char_u e_missingbracket[] = N_("E769: Missing ] after %s[");
073263
  static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%(");
073263
  static char_u e_unmatchedp[] = N_("E54: Unmatched %s(");
073263
***************
073263
*** 2166,2174 ****
073263
--- 2168,2180 ----
073263
  #endif
073263
  
073263
  		case 's': ret = regnode(MOPEN + 0);
073263
+ 			  if (re_mult_next("\\zs") == FAIL)
073263
+ 			      return NULL;
073263
  			  break;
073263
  
073263
  		case 'e': ret = regnode(MCLOSE + 0);
073263
+ 			  if (re_mult_next("\\ze") == FAIL)
073263
+ 			      return NULL;
073263
  			  break;
073263
  
073263
  		default:  EMSG_RET_NULL(_("E68: Invalid character after \\z"));
073263
***************
073263
*** 7005,7010 ****
073263
--- 7011,7028 ----
073263
  }
073263
  #endif	    /* DEBUG */
073263
  
073263
+ /*
073263
+  * Used in a place where no * or \+ can follow.
073263
+  */
073263
+     static int
073263
+ re_mult_next(what)
073263
+     char *what;
073263
+ {
073263
+     if (re_multi_type(peekchr()) == MULTI_MULT)
073263
+ 	EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
073263
+     return OK;
073263
+ }
073263
+ 
073263
  #ifdef FEAT_MBYTE
073263
  static void mb_decompose __ARGS((int c, int *c1, int *c2, int *c3));
073263
  
073263
*** ../vim-7.4.436/src/regexp_nfa.c	2014-08-29 11:56:21.350422045 +0200
073263
--- src/regexp_nfa.c	2014-09-09 17:10:17.572539193 +0200
073263
***************
073263
*** 291,297 ****
073263
  static int nfa_regconcat __ARGS((void));
073263
  static int nfa_regbranch __ARGS((void));
073263
  static int nfa_reg __ARGS((int paren));
073263
- static int re_mult_next __ARGS((char *what));
073263
  #ifdef DEBUG
073263
  static void nfa_set_code __ARGS((int c));
073263
  static void nfa_postfix_dump __ARGS((char_u *expr, int retval));
073263
--- 291,296 ----
073263
***************
073263
*** 2281,2298 ****
073263
      return OK;
073263
  }
073263
  
073263
- /*
073263
-  * Used in a place where no * or \+ can follow.
073263
-  */
073263
-     static int
073263
- re_mult_next(what)
073263
-     char *what;
073263
- {
073263
-     if (re_multi_type(peekchr()) == MULTI_MULT)
073263
- 	EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
073263
-     return OK;
073263
- }
073263
- 
073263
  #ifdef DEBUG
073263
  static char_u code[50];
073263
  
073263
--- 2280,2285 ----
073263
*** ../vim-7.4.436/src/version.c	2014-09-09 16:59:34.792537789 +0200
073263
--- src/version.c	2014-09-09 17:12:34.352539491 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     437,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
110. You actually volunteer to become your employer's webmaster.
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    ///