diff options
author | Sverker Eriksson <[email protected]> | 2016-11-17 16:49:30 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-11-17 16:49:30 +0100 |
commit | 4d7f8c2ab1a7b8c204d932166837b58d08de6506 (patch) | |
tree | 342de93328fc3fb7fd4f071eef90c447f93f014e /erts/include/internal | |
parent | 4c3141e8765bcaaaf998dd84b4f53059c3fe066f (diff) | |
download | otp-4d7f8c2ab1a7b8c204d932166837b58d08de6506.tar.gz otp-4d7f8c2ab1a7b8c204d932166837b58d08de6506.tar.bz2 otp-4d7f8c2ab1a7b8c204d932166837b58d08de6506.zip |
erts: Add cbprintf for Callback Printing
Diffstat (limited to 'erts/include/internal')
-rw-r--r-- | erts/include/internal/erl_printf.h | 7 | ||||
-rw-r--r-- | erts/include/internal/erl_printf_format.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/erts/include/internal/erl_printf.h b/erts/include/internal/erl_printf.h index c4565dfafc..f180a53f18 100644 --- a/erts/include/internal/erl_printf.h +++ b/erts/include/internal/erl_printf.h @@ -41,12 +41,18 @@ struct erts_dsprintf_buf_t_ { #define ERTS_DSPRINTF_BUF_INITER(GFUNC) {NULL, 0, 0, (GFUNC)} +typedef int (*fmtfn_t)(void*, char*, size_t); + +int erts_write_fd(void *vfdp, char* buf, size_t len); +int erts_write_ds(void *vdsbufp, char* buf, size_t len); + int erts_printf(const char *, ...); int erts_fprintf(FILE *, const char *, ...); int erts_fdprintf(int, const char *, ...); int erts_sprintf(char *, const char *, ...); int erts_snprintf(char *, size_t, const char *, ...); int erts_dsprintf(erts_dsprintf_buf_t *, const char *, ...); +int erts_cbprintf(fmtfn_t, void*, const char*, ...); int erts_vprintf(const char *, va_list); int erts_vfprintf(FILE *, const char *, va_list); @@ -54,5 +60,6 @@ int erts_vfdprintf(int, const char *, va_list); int erts_vsprintf(char *, const char *, va_list); int erts_vsnprintf(char *, size_t, const char *, va_list); int erts_vdsprintf(erts_dsprintf_buf_t *, const char *, va_list); +int erts_vcbprintf(fmtfn_t, void*, const char*, va_list); #endif /* #ifndef ERL_PRINTF_H_ */ diff --git a/erts/include/internal/erl_printf_format.h b/erts/include/internal/erl_printf_format.h index 4f969bdbcb..56ec032bd1 100644 --- a/erts/include/internal/erl_printf_format.h +++ b/erts/include/internal/erl_printf_format.h @@ -30,6 +30,7 @@ #include <stdlib.h> #include "erl_int_sizes_config.h" +#include "erl_printf.h" #if SIZEOF_VOID_P == SIZEOF_LONG typedef unsigned long ErlPfUWord; @@ -44,8 +45,6 @@ typedef long long ErlPfSWord; #error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint' #endif -typedef int (*fmtfn_t)(void*, char*, size_t); - extern int erts_printf_format(fmtfn_t, void*, char*, va_list); extern int erts_printf_char(fmtfn_t, void*, char); |