mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
made Writeout() capable of getting called repeatedly
This commit is contained in:
parent
7d1ef9646d
commit
89e960f118
@ -93,9 +93,11 @@ void WriteOut(struct UrlData *data)
|
|||||||
else {
|
else {
|
||||||
/* this is meant as a variable to output */
|
/* this is meant as a variable to output */
|
||||||
char *end;
|
char *end;
|
||||||
|
char keepit;
|
||||||
int i;
|
int i;
|
||||||
if(('{' == ptr[1]) && (end=strchr(ptr, '}'))) {
|
if(('{' == ptr[1]) && (end=strchr(ptr, '}'))) {
|
||||||
ptr+=2; /* pass the % and the { */
|
ptr+=2; /* pass the % and the { */
|
||||||
|
keepit=*end;
|
||||||
*end=0; /* zero terminate */
|
*end=0; /* zero terminate */
|
||||||
for(i=0; replacements[i].name; i++) {
|
for(i=0; replacements[i].name; i++) {
|
||||||
if(strequal(ptr, replacements[i].name)) {
|
if(strequal(ptr, replacements[i].name)) {
|
||||||
@ -138,6 +140,7 @@ void WriteOut(struct UrlData *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr=end+1; /* pass the end */
|
ptr=end+1; /* pass the end */
|
||||||
|
*end = keepit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* illegal syntax, then just output the characters that are used */
|
/* illegal syntax, then just output the characters that are used */
|
||||||
|
Loading…
Reference in New Issue
Block a user