Data Fields
printf_context Struct Reference

A printf context. More...

#include <vsprintf.h>

Data Fields

void(* handler )(struct printf_context *ctx, unsigned int c)
 Character handler. More...
size_t len
 Length of formatted string. More...

Detailed Description

A printf context.

Contexts are used in order to be able to share code between vprintf() and vsnprintf(), without requiring the allocation of a buffer for vprintf().

Definition at line 47 of file vsprintf.h.

Field Documentation

◆ handler

void( * printf_context::handler) (struct printf_context *ctx, unsigned int c)

Character handler.


This method is called for each character written to the formatted string.

Definition at line 57 of file vsprintf.h.

Referenced by efi_vsnprintf(), vsnprintf(), and vw_printw().

◆ len

size_t printf_context::len

Length of formatted string.

When handler() is called, @len will be set to the number of characters written so far (i.e. zero for the first call to handler()).

Definition at line 64 of file vsprintf.h.

The documentation for this struct was generated from the following file: