printnode.c

Recursively prints the a node to a C string

Author

Marcel Sondaar

License

Public Domain

Summary
printnode.cRecursively prints the a node to a C string
Functions
strnputsafe write returning written length as neither strncpy nor strncat can do this efficiently A null terminator will always be placed.

Functions

strnput

static int strnput(char *out,
const char *in,
size_t max)

safe write returning written length as neither strncpy nor strncat can do this efficiently A null terminator will always be placed.

in

outpointer to the char array to write
inpointer to the null-terminated input string
maxmaximum number of characters to copy.

out

returnnumber of characters copied
static int strnput(char *out,
const char *in,
size_t max)
safe write returning written length as neither strncpy nor strncat can do this efficiently A null terminator will always be placed.