|
Karsten Hopp |
5afbe7 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
5afbe7 |
Subject: Patch 7.3.1036
|
|
Karsten Hopp |
5afbe7 |
Fcc: outbox
|
|
Karsten Hopp |
5afbe7 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
5afbe7 |
Mime-Version: 1.0
|
|
Karsten Hopp |
5afbe7 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
5afbe7 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
5afbe7 |
------------
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
Patch 7.3.1036
|
|
Karsten Hopp |
5afbe7 |
Problem: Can't build on HP-UX.
|
|
Karsten Hopp |
5afbe7 |
Solution: Give the union a name. (John Marriott)
|
|
Karsten Hopp |
5afbe7 |
Files: src/regexp_nfa.c
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
*** ../vim-7.3.1035/src/regexp_nfa.c 2013-05-28 22:30:22.000000000 +0200
|
|
Karsten Hopp |
5afbe7 |
--- src/regexp_nfa.c 2013-05-28 22:35:55.000000000 +0200
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2493,2512 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
int in_use; /* number of subexpr with useful info */
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
! /* When REG_MULTI is TRUE multilist is used, otherwise linelist. */
|
|
Karsten Hopp |
5afbe7 |
union
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
struct multipos
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
lpos_T start;
|
|
Karsten Hopp |
5afbe7 |
lpos_T end;
|
|
Karsten Hopp |
5afbe7 |
! } multilist[NSUBEXP];
|
|
Karsten Hopp |
5afbe7 |
struct linepos
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
char_u *start;
|
|
Karsten Hopp |
5afbe7 |
char_u *end;
|
|
Karsten Hopp |
5afbe7 |
! } linelist[NSUBEXP];
|
|
Karsten Hopp |
5afbe7 |
! };
|
|
Karsten Hopp |
5afbe7 |
} regsub_T;
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
/* nfa_thread_T contains execution information of a NFA state */
|
|
Karsten Hopp |
5afbe7 |
--- 2493,2512 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
int in_use; /* number of subexpr with useful info */
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
! /* When REG_MULTI is TRUE list.multi is used, otherwise list.line. */
|
|
Karsten Hopp |
5afbe7 |
union
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
struct multipos
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
lpos_T start;
|
|
Karsten Hopp |
5afbe7 |
lpos_T end;
|
|
Karsten Hopp |
5afbe7 |
! } multi[NSUBEXP];
|
|
Karsten Hopp |
5afbe7 |
struct linepos
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
char_u *start;
|
|
Karsten Hopp |
5afbe7 |
char_u *end;
|
|
Karsten Hopp |
5afbe7 |
! } line[NSUBEXP];
|
|
Karsten Hopp |
5afbe7 |
! } list;
|
|
Karsten Hopp |
5afbe7 |
} regsub_T;
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
/* nfa_thread_T contains execution information of a NFA state */
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2536,2550 ****
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n *** group %d, start: c=%d, l=%d, end: c=%d, l=%d",
|
|
Karsten Hopp |
5afbe7 |
j,
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[j].start.col,
|
|
Karsten Hopp |
5afbe7 |
! (int)sub->multilist[j].start.lnum,
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[j].end.col,
|
|
Karsten Hopp |
5afbe7 |
! (int)sub->multilist[j].end.lnum);
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n *** group %d, start: \"%s\", end: \"%s\"",
|
|
Karsten Hopp |
5afbe7 |
j,
|
|
Karsten Hopp |
5afbe7 |
! (char *)sub->linelist[j].start,
|
|
Karsten Hopp |
5afbe7 |
! (char *)sub->linelist[j].end);
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n");
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
#endif
|
|
Karsten Hopp |
5afbe7 |
--- 2536,2550 ----
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n *** group %d, start: c=%d, l=%d, end: c=%d, l=%d",
|
|
Karsten Hopp |
5afbe7 |
j,
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[j].start.col,
|
|
Karsten Hopp |
5afbe7 |
! (int)sub->list.multi[j].start.lnum,
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[j].end.col,
|
|
Karsten Hopp |
5afbe7 |
! (int)sub->list.multi[j].end.lnum);
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n *** group %d, start: \"%s\", end: \"%s\"",
|
|
Karsten Hopp |
5afbe7 |
j,
|
|
Karsten Hopp |
5afbe7 |
! (char *)sub->list.line[j].start,
|
|
Karsten Hopp |
5afbe7 |
! (char *)sub->list.line[j].end);
|
|
Karsten Hopp |
5afbe7 |
fprintf(log_fd, "\n");
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
#endif
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2626,2637 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
/* Copy the match start and end positions. */
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! mch_memmove(&lastthread->sub.multilist[0],
|
|
Karsten Hopp |
5afbe7 |
! &sub->multilist[0],
|
|
Karsten Hopp |
5afbe7 |
sizeof(struct multipos) * sub->in_use);
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! mch_memmove(&lastthread->sub.linelist[0],
|
|
Karsten Hopp |
5afbe7 |
! &sub->linelist[0],
|
|
Karsten Hopp |
5afbe7 |
sizeof(struct linepos) * sub->in_use);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
--- 2626,2637 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
/* Copy the match start and end positions. */
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! mch_memmove(&lastthread->sub.list.multi[0],
|
|
Karsten Hopp |
5afbe7 |
! &sub->list.multi[0],
|
|
Karsten Hopp |
5afbe7 |
sizeof(struct multipos) * sub->in_use);
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! mch_memmove(&lastthread->sub.list.line[0],
|
|
Karsten Hopp |
5afbe7 |
! &sub->list.line[0],
|
|
Karsten Hopp |
5afbe7 |
sizeof(struct linepos) * sub->in_use);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2705,2711 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (subidx < sub->in_use)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_lpos = sub->multilist[subidx].start;
|
|
Karsten Hopp |
5afbe7 |
save_in_use = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
--- 2705,2711 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (subidx < sub->in_use)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_lpos = sub->list.multi[subidx].start;
|
|
Karsten Hopp |
5afbe7 |
save_in_use = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2713,2732 ****
|
|
Karsten Hopp |
5afbe7 |
save_in_use = sub->in_use;
|
|
Karsten Hopp |
5afbe7 |
for (i = sub->in_use; i < subidx; ++i)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[i].start.lnum = -1;
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[i].end.lnum = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
if (off == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].start.lnum = reglnum + 1;
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].start.col = 0;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].start.lnum = reglnum;
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].start.col =
|
|
Karsten Hopp |
5afbe7 |
(colnr_T)(reginput - regline + off);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
--- 2713,2732 ----
|
|
Karsten Hopp |
5afbe7 |
save_in_use = sub->in_use;
|
|
Karsten Hopp |
5afbe7 |
for (i = sub->in_use; i < subidx; ++i)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[i].start.lnum = -1;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[i].end.lnum = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
if (off == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].start.lnum = reglnum + 1;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].start.col = 0;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].start.lnum = reglnum;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].start.col =
|
|
Karsten Hopp |
5afbe7 |
(colnr_T)(reginput - regline + off);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2734,2740 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (subidx < sub->in_use)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_ptr = sub->linelist[subidx].start;
|
|
Karsten Hopp |
5afbe7 |
save_in_use = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
--- 2734,2740 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (subidx < sub->in_use)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_ptr = sub->list.line[subidx].start;
|
|
Karsten Hopp |
5afbe7 |
save_in_use = -1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2742,2753 ****
|
|
Karsten Hopp |
5afbe7 |
save_in_use = sub->in_use;
|
|
Karsten Hopp |
5afbe7 |
for (i = sub->in_use; i < subidx; ++i)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[i].start = NULL;
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[i].end = NULL;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[subidx].start = reginput + off;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
addstate(l, state->out, sub, off);
|
|
Karsten Hopp |
5afbe7 |
--- 2742,2753 ----
|
|
Karsten Hopp |
5afbe7 |
save_in_use = sub->in_use;
|
|
Karsten Hopp |
5afbe7 |
for (i = sub->in_use; i < subidx; ++i)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[i].start = NULL;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[i].end = NULL;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[subidx].start = reginput + off;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
addstate(l, state->out, sub, off);
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2755,2763 ****
|
|
Karsten Hopp |
5afbe7 |
if (save_in_use == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].start = save_lpos;
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[subidx].start = save_ptr;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = save_in_use;
|
|
Karsten Hopp |
5afbe7 |
--- 2755,2763 ----
|
|
Karsten Hopp |
5afbe7 |
if (save_in_use == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].start = save_lpos;
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[subidx].start = save_ptr;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = save_in_use;
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2793,2823 ****
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_lpos = sub->multilist[subidx].end;
|
|
Karsten Hopp |
5afbe7 |
if (off == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].end.lnum = reglnum + 1;
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].end.col = 0;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].end.lnum = reglnum;
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].end.col =
|
|
Karsten Hopp |
5afbe7 |
(colnr_T)(reginput - regline + off);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_ptr = sub->linelist[subidx].end;
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[subidx].end = reginput + off;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
addstate(l, state->out, sub, off);
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! sub->multilist[subidx].end = save_lpos;
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! sub->linelist[subidx].end = save_ptr;
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = save_in_use;
|
|
Karsten Hopp |
5afbe7 |
break;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
--- 2793,2823 ----
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = subidx + 1;
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_lpos = sub->list.multi[subidx].end;
|
|
Karsten Hopp |
5afbe7 |
if (off == -1)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].end.lnum = reglnum + 1;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].end.col = 0;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].end.lnum = reglnum;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].end.col =
|
|
Karsten Hopp |
5afbe7 |
(colnr_T)(reginput - regline + off);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! save_ptr = sub->list.line[subidx].end;
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[subidx].end = reginput + off;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
addstate(l, state->out, sub, off);
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
! sub->list.multi[subidx].end = save_lpos;
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
! sub->list.line[subidx].end = save_ptr;
|
|
Karsten Hopp |
5afbe7 |
sub->in_use = save_in_use;
|
|
Karsten Hopp |
5afbe7 |
break;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2975,2987 ****
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! if (sub->multilist[subidx].start.lnum < 0
|
|
Karsten Hopp |
5afbe7 |
! || sub->multilist[subidx].end.lnum < 0)
|
|
Karsten Hopp |
5afbe7 |
goto retempty;
|
|
Karsten Hopp |
5afbe7 |
/* TODO: line breaks */
|
|
Karsten Hopp |
5afbe7 |
! len = sub->multilist[subidx].end.col
|
|
Karsten Hopp |
5afbe7 |
! - sub->multilist[subidx].start.col;
|
|
Karsten Hopp |
5afbe7 |
! if (cstrncmp(regline + sub->multilist[subidx].start.col,
|
|
Karsten Hopp |
5afbe7 |
reginput, &len) == 0)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
*bytelen = len;
|
|
Karsten Hopp |
5afbe7 |
--- 2975,2987 ----
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! if (sub->list.multi[subidx].start.lnum < 0
|
|
Karsten Hopp |
5afbe7 |
! || sub->list.multi[subidx].end.lnum < 0)
|
|
Karsten Hopp |
5afbe7 |
goto retempty;
|
|
Karsten Hopp |
5afbe7 |
/* TODO: line breaks */
|
|
Karsten Hopp |
5afbe7 |
! len = sub->list.multi[subidx].end.col
|
|
Karsten Hopp |
5afbe7 |
! - sub->list.multi[subidx].start.col;
|
|
Karsten Hopp |
5afbe7 |
! if (cstrncmp(regline + sub->list.multi[subidx].start.col,
|
|
Karsten Hopp |
5afbe7 |
reginput, &len) == 0)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
*bytelen = len;
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 2990,3000 ****
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! if (sub->linelist[subidx].start == NULL
|
|
Karsten Hopp |
5afbe7 |
! || sub->linelist[subidx].end == NULL)
|
|
Karsten Hopp |
5afbe7 |
goto retempty;
|
|
Karsten Hopp |
5afbe7 |
! len = (int)(sub->linelist[subidx].end - sub->linelist[subidx].start);
|
|
Karsten Hopp |
5afbe7 |
! if (cstrncmp(sub->linelist[subidx].start, reginput, &len) == 0)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
*bytelen = len;
|
|
Karsten Hopp |
5afbe7 |
return TRUE;
|
|
Karsten Hopp |
5afbe7 |
--- 2990,3000 ----
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! if (sub->list.line[subidx].start == NULL
|
|
Karsten Hopp |
5afbe7 |
! || sub->list.line[subidx].end == NULL)
|
|
Karsten Hopp |
5afbe7 |
goto retempty;
|
|
Karsten Hopp |
5afbe7 |
! len = (int)(sub->list.line[subidx].end - sub->list.line[subidx].start);
|
|
Karsten Hopp |
5afbe7 |
! if (cstrncmp(sub->list.line[subidx].start, reginput, &len) == 0)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
*bytelen = len;
|
|
Karsten Hopp |
5afbe7 |
return TRUE;
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 3260,3274 ****
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
for (j = 0; j < submatch->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! submatch->multilist[j].start =
|
|
Karsten Hopp |
5afbe7 |
! t->sub.multilist[j].start;
|
|
Karsten Hopp |
5afbe7 |
! submatch->multilist[j].end = t->sub.multilist[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
for (j = 0; j < submatch->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! submatch->linelist[j].start = t->sub.linelist[j].start;
|
|
Karsten Hopp |
5afbe7 |
! submatch->linelist[j].end = t->sub.linelist[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
#ifdef ENABLE_LOG
|
|
Karsten Hopp |
5afbe7 |
log_subexpr(&t->sub);
|
|
Karsten Hopp |
5afbe7 |
--- 3260,3275 ----
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
for (j = 0; j < submatch->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! submatch->list.multi[j].start =
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.multi[j].start;
|
|
Karsten Hopp |
5afbe7 |
! submatch->list.multi[j].end = t->sub.list.multi[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
for (j = 0; j < submatch->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! submatch->list.line[j].start =
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.line[j].start;
|
|
Karsten Hopp |
5afbe7 |
! submatch->list.line[j].end = t->sub.list.line[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
#ifdef ENABLE_LOG
|
|
Karsten Hopp |
5afbe7 |
log_subexpr(&t->sub);
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 3355,3368 ****
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
for (j = 1; j < m->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! t->sub.multilist[j].start = m->multilist[j].start;
|
|
Karsten Hopp |
5afbe7 |
! t->sub.multilist[j].end = m->multilist[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
for (j = 1; j < m->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! t->sub.linelist[j].start = m->linelist[j].start;
|
|
Karsten Hopp |
5afbe7 |
! t->sub.linelist[j].end = m->linelist[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
t->sub.in_use = m->in_use;
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
--- 3356,3369 ----
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
for (j = 1; j < m->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.multi[j].start = m->list.multi[j].start;
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.multi[j].end = m->list.multi[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
for (j = 1; j < m->in_use; j++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.line[j].start = m->list.line[j].start;
|
|
Karsten Hopp |
5afbe7 |
! t->sub.list.line[j].end = m->list.line[j].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
t->sub.in_use = m->in_use;
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 3907,3919 ****
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
/* Use 0xff to set lnum to -1 */
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(sub.multilist, 0xff, sizeof(struct multipos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(m.multilist, 0xff, sizeof(struct multipos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(sub.linelist, 0, sizeof(struct linepos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(m.linelist, 0, sizeof(struct linepos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub.in_use = 0;
|
|
Karsten Hopp |
5afbe7 |
m.in_use = 0;
|
|
Karsten Hopp |
5afbe7 |
--- 3908,3920 ----
|
|
Karsten Hopp |
5afbe7 |
if (REG_MULTI)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
/* Use 0xff to set lnum to -1 */
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(sub.list.multi, 0xff, sizeof(struct multipos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(m.list.multi, 0xff, sizeof(struct multipos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
else
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(sub.list.line, 0, sizeof(struct linepos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
! vim_memset(m.list.line, 0, sizeof(struct linepos) * nfa_nsubexpr);
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
sub.in_use = 0;
|
|
Karsten Hopp |
5afbe7 |
m.in_use = 0;
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 3926,3933 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
for (i = 0; i < sub.in_use; i++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! reg_startpos[i] = sub.multilist[i].start;
|
|
Karsten Hopp |
5afbe7 |
! reg_endpos[i] = sub.multilist[i].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (reg_startpos[0].lnum < 0)
|
|
Karsten Hopp |
5afbe7 |
--- 3927,3934 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
for (i = 0; i < sub.in_use; i++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! reg_startpos[i] = sub.list.multi[i].start;
|
|
Karsten Hopp |
5afbe7 |
! reg_endpos[i] = sub.list.multi[i].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (reg_startpos[0].lnum < 0)
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 3949,3956 ****
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
for (i = 0; i < sub.in_use; i++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! reg_startp[i] = sub.linelist[i].start;
|
|
Karsten Hopp |
5afbe7 |
! reg_endp[i] = sub.linelist[i].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (reg_startp[0] == NULL)
|
|
Karsten Hopp |
5afbe7 |
--- 3950,3957 ----
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
for (i = 0; i < sub.in_use; i++)
|
|
Karsten Hopp |
5afbe7 |
{
|
|
Karsten Hopp |
5afbe7 |
! reg_startp[i] = sub.list.line[i].start;
|
|
Karsten Hopp |
5afbe7 |
! reg_endp[i] = sub.list.line[i].end;
|
|
Karsten Hopp |
5afbe7 |
}
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
if (reg_startp[0] == NULL)
|
|
Karsten Hopp |
5afbe7 |
*** ../vim-7.3.1035/src/version.c 2013-05-28 22:31:43.000000000 +0200
|
|
Karsten Hopp |
5afbe7 |
--- src/version.c 2013-05-28 22:37:01.000000000 +0200
|
|
Karsten Hopp |
5afbe7 |
***************
|
|
Karsten Hopp |
5afbe7 |
*** 730,731 ****
|
|
Karsten Hopp |
5afbe7 |
--- 730,733 ----
|
|
Karsten Hopp |
5afbe7 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
5afbe7 |
+ /**/
|
|
Karsten Hopp |
5afbe7 |
+ 1036,
|
|
Karsten Hopp |
5afbe7 |
/**/
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
--
|
|
Karsten Hopp |
5afbe7 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
5afbe7 |
9. All your daydreaming is preoccupied with getting a faster connection to the
|
|
Karsten Hopp |
5afbe7 |
net: 28.8...ISDN...cable modem...T1...T3.
|
|
Karsten Hopp |
5afbe7 |
|
|
Karsten Hopp |
5afbe7 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
5afbe7 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
5afbe7 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
5afbe7 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|