7 * save a new match in mp
10 _renewmatch(Resub *mp, int ms, Resublist *sp)
16 if(mp[0].s.sp==0 || sp->m[0].s.sp<mp[0].s.sp ||
17 (sp->m[0].s.sp==mp[0].s.sp && sp->m[0].e.ep>mp[0].e.ep)){
18 for(i=0; i<ms && i<NSUBEXP; i++)
21 mp[i].s.sp = mp[i].e.ep = 0;
26 * Note optimization in _renewthread:
27 * *lp must be pending when _renewthread called; if *l has been looked
28 * at already, the optimization is a bug.
31 _renewthread(Relist *lp, /* _relist to add to */
32 Reinst *ip, /* instruction to add */
33 Resublist *sep) /* pointers to subexpressions */
37 for(p=lp; p->inst; p++){
39 if((sep)->m[0].s.sp < p->se.m[0].s.sp)
51 * same as renewthread, but called with
52 * initial empty start pointer.
55 _renewemptythread(Relist *lp, /* _relist to add to */
56 Reinst *ip, /* instruction to add */
57 char *sp) /* pointers to subexpressions */
61 for(p=lp; p->inst; p++){
63 if(sp < p->se.m[0].s.sp) {
64 memset((void *)&p->se, 0, sizeof(p->se));
71 memset((void *)&p->se, 0, sizeof(p->se));