oh hang on....i'm sorry...i'm not used to C code. i found this:
#define smart_str_appendl(dest, src, len) smart_str_appendl_ex(dest, src, len, 0)
and this:
static inline void smart_str_appendl_ex(smart_str *dest, const char *src, size_t len, int what)
{
size_t newlen;
smart_str_alloc(dest, len, what);
memcpy(dest->c + dest->len, src, len);
dest->len = newlen;
}
#define smart_str_alloc(d, n, what) {\
if (!d->c) d->len = d->a = 0; \
newlen = d->len + n; \
if (newlen >= d->a) {\
d->c = SMART_STR_REALLOC(d->c, newlen + SMART_STR_PREALLOC + 1, what); \
d->a = newlen + SMART_STR_PREALLOC; \
}\
}
I have no idea what this code is doing. anybody care to clue me in?