aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-08-15 21:54:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-08-15 21:54:38 +0000
commit89e960f11896a26c859ecaf7084f7989462132c0 (patch)
treeee83fcd33e5f33b25fc6a89e3a481a091ef4dd94 /lib
parent7d1ef9646db69145cdb6c7121596346c3c1fabd3 (diff)
made Writeout() capable of getting called repeatedly
Diffstat (limited to 'lib')
-rw-r--r--lib/writeout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/writeout.c b/lib/writeout.c
index 80ee6f2e3..f37cc7cb3 100644
--- a/lib/writeout.c
+++ b/lib/writeout.c
@@ -93,9 +93,11 @@ void WriteOut(struct UrlData *data)
else {
/* this is meant as a variable to output */
char *end;
+ char keepit;
int i;
if(('{' == ptr[1]) && (end=strchr(ptr, '}'))) {
ptr+=2; /* pass the % and the { */
+ keepit=*end;
*end=0; /* zero terminate */
for(i=0; replacements[i].name; i++) {
if(strequal(ptr, replacements[i].name)) {
@@ -138,6 +140,7 @@ void WriteOut(struct UrlData *data)
}
}
ptr=end+1; /* pass the end */
+ *end = keepit;
}
else {
/* illegal syntax, then just output the characters that are used */