|
Karsten Hopp |
9e30ed |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
9e30ed |
Subject: Patch 7.3.1192
|
|
Karsten Hopp |
9e30ed |
Fcc: outbox
|
|
Karsten Hopp |
9e30ed |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
9e30ed |
Mime-Version: 1.0
|
|
Karsten Hopp |
9e30ed |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
9e30ed |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
9e30ed |
------------
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
Patch 7.3.1192
|
|
Karsten Hopp |
9e30ed |
Problem: Valgrind reports errors when using backreferences. (Dominique
|
|
Karsten Hopp |
9e30ed |
Pelle)
|
|
Karsten Hopp |
9e30ed |
Solution: Do not check the end of submatches.
|
|
Karsten Hopp |
9e30ed |
Files: src/regexp_nfa.c
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
*** ../vim-7.3.1191/src/regexp_nfa.c 2013-06-14 20:31:20.000000000 +0200
|
|
Karsten Hopp |
9e30ed |
--- src/regexp_nfa.c 2013-06-14 21:09:14.000000000 +0200
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 3612,3618 ****
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
/*
|
|
Karsten Hopp |
9e30ed |
! * Return TRUE if "sub1" and "sub2" have the same positions.
|
|
Karsten Hopp |
9e30ed |
*/
|
|
Karsten Hopp |
9e30ed |
static int
|
|
Karsten Hopp |
9e30ed |
sub_equal(sub1, sub2)
|
|
Karsten Hopp |
9e30ed |
--- 3612,3618 ----
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
/*
|
|
Karsten Hopp |
9e30ed |
! * Return TRUE if "sub1" and "sub2" have the same start positions.
|
|
Karsten Hopp |
9e30ed |
*/
|
|
Karsten Hopp |
9e30ed |
static int
|
|
Karsten Hopp |
9e30ed |
sub_equal(sub1, sub2)
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 3621,3630 ****
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
int i;
|
|
Karsten Hopp |
9e30ed |
int todo;
|
|
Karsten Hopp |
9e30ed |
! linenr_T s1, e1;
|
|
Karsten Hopp |
9e30ed |
! linenr_T s2, e2;
|
|
Karsten Hopp |
9e30ed |
! char_u *sp1, *ep1;
|
|
Karsten Hopp |
9e30ed |
! char_u *sp2, *ep2;
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
todo = sub1->in_use > sub2->in_use ? sub1->in_use : sub2->in_use;
|
|
Karsten Hopp |
9e30ed |
if (REG_MULTI)
|
|
Karsten Hopp |
9e30ed |
--- 3621,3630 ----
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
int i;
|
|
Karsten Hopp |
9e30ed |
int todo;
|
|
Karsten Hopp |
9e30ed |
! linenr_T s1;
|
|
Karsten Hopp |
9e30ed |
! linenr_T s2;
|
|
Karsten Hopp |
9e30ed |
! char_u *sp1;
|
|
Karsten Hopp |
9e30ed |
! char_u *sp2;
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
todo = sub1->in_use > sub2->in_use ? sub1->in_use : sub2->in_use;
|
|
Karsten Hopp |
9e30ed |
if (REG_MULTI)
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 3632,3664 ****
|
|
Karsten Hopp |
9e30ed |
for (i = 0; i < todo; ++i)
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
if (i < sub1->in_use)
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
s1 = sub1->list.multi[i].start.lnum;
|
|
Karsten Hopp |
9e30ed |
- e1 = sub1->list.multi[i].end.lnum;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
s1 = 0;
|
|
Karsten Hopp |
9e30ed |
- e1 = 0;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
if (i < sub2->in_use)
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
s2 = sub2->list.multi[i].start.lnum;
|
|
Karsten Hopp |
9e30ed |
- e2 = sub2->list.multi[i].end.lnum;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
s2 = 0;
|
|
Karsten Hopp |
9e30ed |
! e2 = 0;
|
|
Karsten Hopp |
9e30ed |
! }
|
|
Karsten Hopp |
9e30ed |
! if (s1 != s2 || e1 != e2)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
if (s1 != 0 && sub1->list.multi[i].start.col
|
|
Karsten Hopp |
9e30ed |
!= sub2->list.multi[i].start.col)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
- if (e1 != 0 && sub1->list.multi[i].end.col
|
|
Karsten Hopp |
9e30ed |
- != sub2->list.multi[i].end.col)
|
|
Karsten Hopp |
9e30ed |
- return FALSE;
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
--- 3632,3649 ----
|
|
Karsten Hopp |
9e30ed |
for (i = 0; i < todo; ++i)
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
if (i < sub1->in_use)
|
|
Karsten Hopp |
9e30ed |
s1 = sub1->list.multi[i].start.lnum;
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
s1 = 0;
|
|
Karsten Hopp |
9e30ed |
if (i < sub2->in_use)
|
|
Karsten Hopp |
9e30ed |
s2 = sub2->list.multi[i].start.lnum;
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
s2 = 0;
|
|
Karsten Hopp |
9e30ed |
! if (s1 != s2)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
if (s1 != 0 && sub1->list.multi[i].start.col
|
|
Karsten Hopp |
9e30ed |
!= sub2->list.multi[i].start.col)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 3666,3691 ****
|
|
Karsten Hopp |
9e30ed |
for (i = 0; i < todo; ++i)
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
if (i < sub1->in_use)
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
sp1 = sub1->list.line[i].start;
|
|
Karsten Hopp |
9e30ed |
- ep1 = sub1->list.line[i].end;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
sp1 = NULL;
|
|
Karsten Hopp |
9e30ed |
- ep1 = NULL;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
if (i < sub2->in_use)
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
sp2 = sub2->list.line[i].start;
|
|
Karsten Hopp |
9e30ed |
- ep2 = sub2->list.line[i].end;
|
|
Karsten Hopp |
9e30ed |
- }
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
- {
|
|
Karsten Hopp |
9e30ed |
sp2 = NULL;
|
|
Karsten Hopp |
9e30ed |
! ep2 = NULL;
|
|
Karsten Hopp |
9e30ed |
! }
|
|
Karsten Hopp |
9e30ed |
! if (sp1 != sp2 || ep1 != ep2)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
--- 3651,3664 ----
|
|
Karsten Hopp |
9e30ed |
for (i = 0; i < todo; ++i)
|
|
Karsten Hopp |
9e30ed |
{
|
|
Karsten Hopp |
9e30ed |
if (i < sub1->in_use)
|
|
Karsten Hopp |
9e30ed |
sp1 = sub1->list.line[i].start;
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
sp1 = NULL;
|
|
Karsten Hopp |
9e30ed |
if (i < sub2->in_use)
|
|
Karsten Hopp |
9e30ed |
sp2 = sub2->list.line[i].start;
|
|
Karsten Hopp |
9e30ed |
else
|
|
Karsten Hopp |
9e30ed |
sp2 = NULL;
|
|
Karsten Hopp |
9e30ed |
! if (sp1 != sp2)
|
|
Karsten Hopp |
9e30ed |
return FALSE;
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
}
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 3735,3742 ****
|
|
Karsten Hopp |
9e30ed |
if (thread->state->id == state->id
|
|
Karsten Hopp |
9e30ed |
&& sub_equal(&thread->subs.norm, &subs->norm)
|
|
Karsten Hopp |
9e30ed |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
9e30ed |
! && (!nfa_has_zsubexpr ||
|
|
Karsten Hopp |
9e30ed |
! sub_equal(&thread->subs.synt, &subs->synt))
|
|
Karsten Hopp |
9e30ed |
#endif
|
|
Karsten Hopp |
9e30ed |
)
|
|
Karsten Hopp |
9e30ed |
return TRUE;
|
|
Karsten Hopp |
9e30ed |
--- 3708,3715 ----
|
|
Karsten Hopp |
9e30ed |
if (thread->state->id == state->id
|
|
Karsten Hopp |
9e30ed |
&& sub_equal(&thread->subs.norm, &subs->norm)
|
|
Karsten Hopp |
9e30ed |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
9e30ed |
! && (!nfa_has_zsubexpr
|
|
Karsten Hopp |
9e30ed |
! || sub_equal(&thread->subs.synt, &subs->synt))
|
|
Karsten Hopp |
9e30ed |
#endif
|
|
Karsten Hopp |
9e30ed |
)
|
|
Karsten Hopp |
9e30ed |
return TRUE;
|
|
Karsten Hopp |
9e30ed |
*** ../vim-7.3.1191/src/version.c 2013-06-14 20:31:20.000000000 +0200
|
|
Karsten Hopp |
9e30ed |
--- src/version.c 2013-06-14 21:14:28.000000000 +0200
|
|
Karsten Hopp |
9e30ed |
***************
|
|
Karsten Hopp |
9e30ed |
*** 730,731 ****
|
|
Karsten Hopp |
9e30ed |
--- 730,733 ----
|
|
Karsten Hopp |
9e30ed |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
9e30ed |
+ /**/
|
|
Karsten Hopp |
9e30ed |
+ 1192,
|
|
Karsten Hopp |
9e30ed |
/**/
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
--
|
|
Karsten Hopp |
9e30ed |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
9e30ed |
202. You're amazed to find out Spam is a food.
|
|
Karsten Hopp |
9e30ed |
|
|
Karsten Hopp |
9e30ed |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
9e30ed |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
9e30ed |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
9e30ed |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|