I said that due to the wall to wall agreement over the superiority of sprintf/snprintf. If there is a consensus, we should stick to it.
But the performance of it will suck badly.....
Something like:
char * str_add(char *s, char *lim, const char *a) { int c;
do { if (s >= lim) { s = lim - 1; c = 0; } else c = *a++; *s++ = c; } while (c);
return s; }
So you can do: lim = buf + len; buf = str_add(buf, lim, "abc"); buf = str_add(buf, lim, "123"); ... might be safer.
David