+ else if(rule->type == PAT_REST)
+ rmo = obuf[gr[0].rm_eo];
+ if(rule->fl & PATFL_MSS) {
+ if(mstr) {
+ flog(LOG_WARNING, "two pattern rules marked with `s' flag found (for handler %s)", pat->childnm);
+ freeca(mstr);
+ }
+ for(o = 0; o < 10; o++) {
+ if(gr[o].rm_so < 0)
+ break;
+ }
+ mstr = szmalloc((o + 1) * sizeof(*mstr));
+ for(o = 0; o < 10; o++) {
+ if(gr[o].rm_so < 0)
+ break;
+ mstr[o] = smalloc(obuf[gr[o].rm_eo] - obuf[gr[o].rm_so] + 1);
+ memcpy(mstr[o], pstr + obuf[gr[o].rm_so], obuf[gr[o].rm_eo] - obuf[gr[o].rm_so]);
+ mstr[o][obuf[gr[o].rm_eo] - obuf[gr[o].rm_so]] = 0;
+ }
+ }