@ -55,10 +55,25 @@ int vsnprintf(char* buffer, size_t count, const char* format, va_list va);
int fctprintf(void (*out)(char character, void* arg), void* arg, const char* format, ...);
```
**Due to genaral security reasons it is highly recommended to prefer and use `snprintf` (with the max buffer size as `count` parameter) instead of `sprintf`.**
`sprintf` has no buffer limitation, so when needed - use it really with care!
### Streamlike usage
Besides the regular standard `printf()` functions, this module also provides `fctprintf()`, which takes an output function as first parameter to build a streamlike output like `fprintf()`:
```C
// define the output function
void my_stream_output(char character, void* arg)
{
// opt. evaluate the argument and send the char somewhere
}
{
// in your code
void* arg = (void*)100; // this argument is passed to the output function
fctprintf(&my_stream_output, arg, "This is a test: %X", 0xAA);
fctprintf(&my_stream_output, nullptr, "Send to null dev");