diff options
author | Marco Paland <info@paland.com> | 2018-06-05 11:00:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 11:00:23 +0200 |
commit | aa9d7a9a5413a867ff484436edf25a65dbe9c2d0 (patch) | |
tree | 1a1cd508faaf775eadef05899f3342a973ba985c /printf.h | |
parent | 0116b7491693306e613491b7ccc44743da6d60cb (diff) | |
parent | d40951182f051899acf66f11d55c526003b266c8 (diff) | |
download | printf-aa9d7a9a5413a867ff484436edf25a65dbe9c2d0.tar.gz printf-aa9d7a9a5413a867ff484436edf25a65dbe9c2d0.tar.bz2 printf-aa9d7a9a5413a867ff484436edf25a65dbe9c2d0.zip |
Merge pull request #18 from sgoll/fctprintf-user-data
feat(printf): add user pointer to fctprintf()
Diffstat (limited to 'printf.h')
-rw-r--r-- | printf.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -84,10 +84,11 @@ int vsnprintf(char* buffer, size_t count, const char* format, va_list va); * printf with output function
* You may use this as dynamic alternative to printf() with its fixed _putchar() output
* \param out An output function which takes one character
+ * \param user A pointer to user data passed to output function
* \param format A string that specifies the format of the output
* \return The number of characters that are sent to the output function, not counting the terminating null character
*/
-int fctprintf(void (*out)(char character), const char* format, ...);
+int fctprintf(void (*out)(char character, void* user), void* user, const char* format, ...);
#ifdef __cplusplus
|