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

The source code of this header can be browsed online.

Members [link] 

Type [link] 

Functions [link] 

  • 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 [link] 

#define MUTEK_PRINTF_ARG_H_ [link] 

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

#define PRINTF_OUTPUT_FUNC(x) [link] 

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) [link] 

This function is declared in libc/formatter.h source file, line 70.

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) [link] 

This function is declared in libc/formatter.h source file, line 74.

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

This function is declared in libc/formatter.h source file, line 61.

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) [link] 

This function is declared in libc/formatter.h source file, line 65.

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

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

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc