MCPcopy Create free account
hub / github.com/boostorg/build / regtry

Function regtry

src/engine/regexp.cpp:861–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859 */
860
861static int32_t /* 0 failure, 1 success */
862regtry(
863 regexp *prog,
864 const char *string )
865{
866 int32_t i;
867 const char * * sp;
868 const char * * ep;
869
870 reginput = string;
871 regstartp = prog->startp;
872 regendp = prog->endp;
873
874 sp = prog->startp;
875 ep = prog->endp;
876 for ( i = NSUBEXP; i > 0; --i )
877 {
878 *sp++ = NULL;
879 *ep++ = NULL;
880 }
881 if ( regmatch( prog->program + 1 ) )
882 {
883 prog->startp[ 0 ] = string;
884 prog->endp[ 0 ] = reginput;
885 return 1;
886 }
887 else
888 return 0;
889}
890
891
892/*

Callers 1

regexecFunction · 0.85

Calls 1

regmatchFunction · 0.85

Tested by

no test coverage detected