Clean up message from excess whitespace and make sure that the last line ends with a '\n '.
Optionally, can remove lines starting with a "#".
The user-allocated buffer which will be filled with the cleaned up message. Pass NULL if you just want to get the needed size of the prettified message as the output value.
Size of the out
buffer in bytes.
The message to be prettified.
Non-zero to remove lines starting with "#", 0 to leave them in.
-1 on error, else number of characters in prettified message including the trailing NUL byte