forked from mirrors/tftp-hpa-google
Handle transformations with matches
This commit is contained in:
parent
cbf26dca81
commit
8a2f696097
1 changed files with 3 additions and 2 deletions
|
@ -90,8 +90,9 @@ static int genmatchstring(char *string, const char *pattern, const char *input,
|
||||||
mlen = pmatch[n].rm_eo - pmatch[n].rm_so;
|
mlen = pmatch[n].rm_eo - pmatch[n].rm_so;
|
||||||
len += mlen;
|
len += mlen;
|
||||||
if ( string ) {
|
if ( string ) {
|
||||||
memcpy(string, input+pmatch[n].rm_so, mlen);
|
const char *p = input+pmatch[n].rm_so;
|
||||||
string += mlen;
|
while ( mlen-- )
|
||||||
|
*string++ = xform(*p++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue