re2_c.cxx
/* Return 0 if the pattern matches the given text, 1 otherwise; captures are
 * returned via "aux".
 */
Return 0 if the pattern matches the given text, 1 otherwise; captures are
returned via "aux".
Return 0 if the pattern matches the given text 1 otherwise ; captures are returned via " aux " .
int
re2c_match(const char* text, int text_len, struct re2_pattern_t* pattern,
           struct re2c_match_aux* aux) {
    RE2* re2 = (RE2*)(void*)pattern;
    if (unlikely(!re2))
        return 1;
    int ncap = re2->NumberOfCapturingGroups() + 1;
    if (!aux->cap_vect_len || aux->cap_vect_len < ncap) {
        delete[] aux->captures;
        aux->captures = new re2::StringPiece[ncap];
        aux->cap_vect_len = ncap;
    }
    aux->ncap = ncap;
    bool match = re2->Match(re2::StringPiece(text, text_len),
                            0 , text_len ,
                            re2::RE2::UNANCHORED, aux->captures, ncap);
    return match ? 0 : 1;
}
int re2c_match ( const char * text , int text_len , struct re2_pattern_t * pattern , struct re2c_match_aux * aux ) { RE2 * re2 = ( RE2 * ) ( void * ) pattern ; if ( unlikely ( ! re2 ) ) return 1 ; int ncap = re2 -> NumberOfCapturingGroups ( ) + 1 ; if ( ! aux -> cap_vect_len || aux -> cap_vect_len < ncap ) { delete [ ] aux -> captures ; aux -> captures = new re2 :: StringPiece [ ncap ] ; aux -> cap_vect_len = ncap ; } aux -> ncap = ncap ; bool match = re2 -> Match ( re2 :: StringPiece ( text , text_len ) , 0 , text_len , re2 :: RE2 :: UNANCHORED , aux -> captures , ncap ) ; return match ? 0 : 1 ; }
Return 0 if the pattern matches the given text, 1 otherwise; captures are
 returned via "aux".
Return 0 if the pattern matches the given text 1 otherwise ; captures are returned via " aux " .
/* startpos */ /* endpos*/