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