summaryrefslogtreecommitdiff
path: root/src/dstring.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2003-12-08 02:20:14 +0000
committerIan C <ianc@noddybox.co.uk>2003-12-08 02:20:14 +0000
commit1c161a8cbe16aa59cc8bf4d60d5fa64fdcbc6aa5 (patch)
tree355d3a053199f03f5e13d8fa25b05723bf1da720 /src/dstring.c
parent787bb7625c9abc6b09efbc6bbe004a19d4b96166 (diff)
Added subject_macro; Tweaked check order; Fixed some warnings
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;
}