libaard_cat.h
Functions
cat()
int cat(char **dest, char *str, ...);
cat() concatenates some strings in a buffer pointed to by dest. cat() allocates the needed memory by itself, but for obvious reasons does not free it. Remember to free the memory as soon as you don't need it anymore. The last argument to cat must be NULL.
char *tmp; cat(&tmp, "go", "away", "\n", NULL); __write1(tmp); free(tmp);
cati()
char *cati(char *str, ...);
cati concatenates some strings in shared memory and returns a pointer to the concatenated string. The last argument to cati must be NULL. Don't use cati in functions which expect strings as arguments. Due to the shared memory bad things happen if the function gets called with cati in one argument.
__write1(cati("go", "away", "\n", NULL);
cati()
void freecati(void);
freecati() frees the shared memory used by cati()