Lines Matching refs:subs
296 regmatch_t *subs; in php_ereg() local
339 subs = (regmatch_t *)ecalloc(sizeof(regmatch_t),re.re_nsub+1); in php_ereg()
342 err = regexec(&re, string, re.re_nsub+1, subs, 0); in php_ereg()
346 efree(subs); in php_ereg()
352 match_len = (int) (subs[0].rm_eo - subs[0].rm_so); in php_ereg()
361 start = subs[i].rm_so; in php_ereg()
362 end = subs[i].rm_eo; in php_ereg()
372 efree(subs); in php_ereg()
406 regmatch_t *subs; in php_ereg_replace() local
433 subs = (regmatch_t *)ecalloc(sizeof(regmatch_t),re.re_nsub+1); in php_ereg_replace()
443 err = regexec(&re, &string[pos], re.re_nsub+1, subs, (pos ? REG_NOTBOL : 0)); in php_ereg_replace()
447 efree(subs); in php_ereg_replace()
461 new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ in php_ereg_replace()
465 if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1) { in php_ereg_replace()
466 new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; in php_ereg_replace()
484 strncat(buf, &string[pos], subs[0].rm_so); in php_ereg_replace()
487 walkbuf = &buf[tmp + subs[0].rm_so]; in php_ereg_replace()
491 if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1 in php_ereg_replace()
493 && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) { in php_ereg_replace()
495 tmp = subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; in php_ereg_replace()
496 memcpy (walkbuf, &string[pos + subs[walk[1] - '0'].rm_so], tmp); in php_ereg_replace()
507 if (subs[0].rm_so == subs[0].rm_eo) { in php_ereg_replace()
508 if (subs[0].rm_so + pos >= string_len) { in php_ereg_replace()
519 pos += subs[0].rm_eo + 1; in php_ereg_replace()
523 pos += subs[0].rm_eo; in php_ereg_replace()
540 efree(subs); in php_ereg_replace()
633 regmatch_t subs[1]; in php_split() local
658 while ((count == -1 || count > 1) && !(err = regexec(&re, strp, 1, subs, 0))) { in php_split()
659 if (subs[0].rm_so == 0 && subs[0].rm_eo) { in php_split()
663 strp += subs[0].rm_eo; in php_split()
664 } else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) { in php_split()
677 size = subs[0].rm_so; in php_split()
683 strp = strp + subs[0].rm_eo; in php_split()