summaryrefslogtreecommitdiff
path: root/src/dstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dstring.c')
-rw-r--r--src/dstring.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dstring.c b/src/dstring.c
index e614e83..7e13067 100644
--- a/src/dstring.c
+++ b/src/dstring.c
@@ -87,6 +87,8 @@ DString DSAddChar(DString to, char c)
to->text[to->len++]=c;
to->text[to->len]=0;
+
+ return to;
}
@@ -96,15 +98,16 @@ DString DSAddCP(DString to, const char *from)
to->text=Realloc(to->text,(((to->len+1)/BLOCKSIZE)+1)*BLOCKSIZE);
strcat(to->text,from);
+
+ return to;
}
DString DSAddDS(DString to, const DString from)
{
- to->len+=from->len;
- to->text=Realloc(to->text,(((to->len+1)/BLOCKSIZE)+1)*BLOCKSIZE);
+ DSAddCP(to,from->text);
- strcat(to->text,from->text);
+ return to;
}