From 1c161a8cbe16aa59cc8bf4d60d5fa64fdcbc6aa5 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 8 Dec 2003 02:20:14 +0000 Subject: Added subject_macro; Tweaked check order; Fixed some warnings --- src/dstring.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/dstring.c') 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; } -- cgit v1.2.3