libc/formatter.h header reference
[C library module]

The source code of this header can be browsed online.

Members  

Type  

Functions  

  • ssize_t formatter_dtostr(double d, char *buf, size_t maxlen, size_t prec, size_t prec2, ssize_t g)
  • void formatter_hexdump(void *ctx, printf_output_func_t *const fcn, uintptr_t address, const void *base, size_t size)
  • ssize_t formatter_printf(void *ctx, printf_output_func_t *const fcn, const char *format, va_list ap)
  • void mutek_hexdump_arg(void *ctx, printf_output_func_t *const fcn, uintptr_t address, const void *base, size_t len)

Members detail  

#define MUTEK_PRINTF_ARG_H_  

This macro is declared in libc/formatter.h source file, line 23.

#define PRINTF_OUTPUT_FUNC(x)  

This macro is declared in libc/formatter.h source file, line 33.

ssize_t formatter_dtostr(double d, char *buf, size_t maxlen, size_t prec, size_t prec2, ssize_t g)  

this function write a string from a floating point value

void formatter_hexdump(void *ctx, printf_output_func_t *const fcn, uintptr_t address, const void *base, size_t size)  

ssize_t formatter_printf(void *ctx, printf_output_func_t *const fcn, const char *format, va_list ap)  

This function is used to produce output of printk and printf family of functions. The output function will be called multiple times to write the formatted string.

This function supports the standard printf format string syntax.

The following non standard conversion specifiers are supported:

  • %b output an unsigned integer in binary format

  • %P output an hexadecimal dump of memory, both address and size arguments must be passed.

  • %S output an string with specified length, both address and size arguments must be passed.

When the CONFIG_LIBC_FORMATTER_SIMPLE configuration token is defined, the conversion features are reduced to bare minimum: no padding support, only %d %i %u %s %p %c %x %o are handled and maximum integer value is limited to processor register width. The precision is ignored too; this changes behavior of %.s.

void mutek_hexdump_arg(void *ctx, printf_output_func_t *const fcn, uintptr_t address, const void *base, size_t len)  

typedef void (printf_output_func_t)(void *ctx, const char *str, size_t offset, size_t len)   

This typedef is declared in libc/formatter.h source file, line 36.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:38 2018 using MkDoc