diff options
Diffstat (limited to 'imap/src/c-client/misc.c')
-rw-r--r-- | imap/src/c-client/misc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/imap/src/c-client/misc.c b/imap/src/c-client/misc.c index 0ddab9cc..621118b2 100644 --- a/imap/src/c-client/misc.c +++ b/imap/src/c-client/misc.c @@ -490,3 +490,16 @@ int compare_csizedtext (unsigned char *s1,SIZEDTEXT *s2) if (*s1) return 1; /* first string is longer */ return j ? -1 : 0; /* second string longer : strings identical */ } + +void +buffer_add(unsigned char **bufp, unsigned char *text) +{ + size_t len; + + if(!bufp || !text || !*text) return; + + len = *bufp ? strlen(*bufp) : 0; + fs_resize((void **) bufp, len + strlen(text) + 1); + (*bufp)[len] = '\0'; + strcat(*bufp, text); +} |