My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_printf.h"
Functions | |
int | bft_printf (const char *const format,...) |
Replacement for printf() with modifiable behavior. More... | |
int | bft_printf_flush (void) |
Flush for output of bft_printf() with modifiable behavior. More... | |
bft_printf_proxy_t * | bft_printf_proxy_get (void) |
Returns function associated with the bft_printf() function. More... | |
void | bft_printf_proxy_set (bft_printf_proxy_t *const fct) |
Associates a vprintf() type function with the bft_printf() function. More... | |
bft_printf_flush_proxy_t * | bft_printf_flush_proxy_get (void) |
Returns function associated with bft_printf_flush(). More... | |
void | bft_printf_flush_proxy_set (bft_printf_flush_proxy_t *const fct) |
Associates a proxy function with bft_printf_flush(). More... | |
int bft_printf | ( | const char *const | format, |
... | |||
) |
Replacement for printf() with modifiable behavior.
This function calls vprintf() by default, or a function with similar arguments indicated by bft_printf_proxy_set().
[in] | format | format string, as printf() and family. |
[in] | ... | variable arguments based on format string. |
int bft_printf_flush | ( | void | ) |
Flush for output of bft_printf() with modifiable behavior.
This function calls fflush(stdout) if bft_printf()'s default behavior is used. If bft_printf's behavior is modified with bft_printf_proxy_set(), bft_printf_flush()'s behavior may have to be also adjusted with bft_printf_flush_proxy_set().
bft_printf_flush_proxy_t* bft_printf_flush_proxy_get | ( | void | ) |
Returns function associated with bft_printf_flush().
void bft_printf_flush_proxy_set | ( | bft_printf_flush_proxy_t *const | fct | ) |
Associates a proxy function with bft_printf_flush().
[in] | fct | pointer to a function similar to {return fflush(stdout)}. |
bft_printf_proxy_t* bft_printf_proxy_get | ( | void | ) |
Returns function associated with the bft_printf() function.
void bft_printf_proxy_set | ( | bft_printf_proxy_t *const | fct | ) |
Associates a vprintf() type function with the bft_printf() function.
[in] | fct | pointer to a vprintf() type function. |