diff options
Diffstat (limited to 'src/libregexp/rregaux.c')
-rw-r--r-- | src/libregexp/rregaux.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libregexp/rregaux.c b/src/libregexp/rregaux.c new file mode 100644 index 00000000..f4cb0068 --- /dev/null +++ b/src/libregexp/rregaux.c @@ -0,0 +1,26 @@ +#include "lib9.h" +#include "regexp9.h" +#include "regcomp.h" + +extern Relist* +_rrenewemptythread(Relist *lp, /* _relist to add to */ + Reinst *ip, /* instruction to add */ + Rune *rsp) /* pointers to subexpressions */ +{ + Relist *p; + + for(p=lp; p->inst; p++){ + if(p->inst == ip){ + if(rsp < p->se.m[0].s.rsp) { + memset((void *)&p->se, 0, sizeof(p->se)); + p->se.m[0].s.rsp = rsp; + } + return 0; + } + } + p->inst = ip; + memset((void *)&p->se, 0, sizeof(p->se)); + p->se.m[0].s.rsp = rsp; + (++p)->inst = 0; + return p; +} |