Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4200 → Rev 4201

/branches/dd/kernel/generic/include/printf/printf_core.h
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup generic
/** @addtogroup generic
* @{
*/
/** @file
35,20 → 35,23
#ifndef KERN_PRINTF_CORE_H_
#define KERN_PRINTF_CORE_H_
 
#include <arch/types.h>
#include <typedefs.h>
#include <arch/arg.h>
 
/** Structure for specifying output methods for different printf clones. */
struct printf_spec {
/* Output function, returns count of printed characters or EOF */
int (*write)(void *, size_t, void *);
/* Support data - output stream specification, its state, locks,... */
typedef struct {
/* UTF-8 output function, returns number of printed UTF-8 characters or EOF */
int (*write_utf8)(const char *, size_t, void *);
/* UTF-32 output function, returns number of printed UTF-32 characters or EOF */
int (*write_utf32)(const wchar_t *, size_t, void *);
/* User data - output stream specification, state, locks, etc. */
void *data;
} printf_spec_t;
 
};
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
 
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap);
 
#endif
 
/** @}