Donate

You can make a donation if you'd like to support my work:


Contact

I deactivated the rating mechanism for now due to excessive spamming; while I got some interesting comments when I started it the current ratio is several hundred spam comments for one useful comment. If you have anything to say, please write an email to bwachter-hp@lart.info

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()