Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitabaaa8f

Browse files
committed
track nmatch with sp
1 parent2d96c35 commitabaaa8f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎pike.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ plist[plistidx++] = npc; \
473473

474474
#defineonclist(nn) \
475475

476-
#define endnlist() if (*npc == MATCH) nmatch =1; \
476+
#define endnlist() if (*npc == MATCH) nmatch =sp; \
477477

478478
#defineendclist() \
479479

@@ -571,8 +571,8 @@ int re_pikevm(rcode *prog, const char *s, const char **subp, int nsubp)
571571
{
572572
intrsubsize=sizeof(rsub)+(sizeof(char*)*nsubp);
573573
inti,j,c,suboff=rsubsize,*npc,osubp=nsubp*sizeof(char*);
574-
intclistidx=0,nlistidx,plistidx,nmatch;
575-
constchar*sp=s,*_sp=s;
574+
intclistidx=0,nlistidx,plistidx;
575+
constchar*sp=s,*_sp=s,*nmatch=NULL;
576576
int*insts=prog->insts;
577577
int*pcs[prog->splits],*plist[prog->splits];
578578
rsub*subs[prog->splits];
@@ -584,7 +584,7 @@ int re_pikevm(rcode *prog, const char *s, const char **subp, int nsubp)
584584
for (;;sp=_sp) {
585585
uc_len(i,sp)uc_code(c,sp)
586586
_sp=sp+i;
587-
nlistidx=0;plistidx=0;nmatch=0;
587+
nlistidx=0;plistidx=0;
588588
for (i=0;i<clistidx;i++) {
589589
npc=clist[i].pc;
590590
nsub=clist[i].sub;
@@ -594,7 +594,7 @@ int re_pikevm(rcode *prog, const char *s, const char **subp, int nsubp)
594594
break;
595595
caseANY:
596596
addthread:
597-
if (nmatch)
597+
if (nmatch==sp)
598598
break;
599599
addthread(2,nlist,nlistidx)
600600
caseCLASS:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp