SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros | Functions
xformat.h File Reference
#include <stdarg.h>
#include <string.h>
Include dependency graph for xformat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XCFG_FORMAT_STATIC
 Define internal parameters as volatile for 8 bit cpu define XCFG_FORMAT_STATIC=static to reduce stack usage.
 
#define XCFG_FORMAT_FLOAT   1
 Define XCFG_FORMAT_FLOAT=0 to remove floating point support.
 
#define XCFG_FORMAT_LONGLONG   1
 Define to 1 to support long long type (prefix ll)
 

Functions

unsigned xvformat (void(*outchar)(void *arg, char), void *arg, const char *fmt, va_list args)
 Formats and outputs a string according to a format string 'fmt' and a variable argument list 'args'.
 
unsigned xformat (void(*outchar)(void *arg, char), void *arg, const char *fmt,...)
 Formats and outputs a string according to a format string 'fmt' and an arbitrary number of variable arguments.
 

Macro Definition Documentation

◆ XCFG_FORMAT_FLOAT

#define XCFG_FORMAT_FLOAT   1

Define XCFG_FORMAT_FLOAT=0 to remove floating point support.

◆ XCFG_FORMAT_LONGLONG

#define XCFG_FORMAT_LONGLONG   1

Define to 1 to support long long type (prefix ll)

◆ XCFG_FORMAT_STATIC

#define XCFG_FORMAT_STATIC

Define internal parameters as volatile for 8 bit cpu define XCFG_FORMAT_STATIC=static to reduce stack usage.

Function Documentation

◆ xformat()

unsigned xformat ( void(*)(void *arg, char)  outchar,
void *  arg,
const char *  fmt,
  ... 
)

Formats and outputs a string according to a format string 'fmt' and an arbitrary number of variable arguments.

The output is written character by character using a user-defined output function 'outchar'.

Parameters
outcharThe output function that writes a single character.
argA pointer to optional arguments for the output function.
fmtThe format string specifying the output format.
...The variable arguments containing the values to be formatted and output.
Returns
The number of characters written.

◆ xvformat()

unsigned xvformat ( void(*)(void *arg, char)  outchar,
void *  arg,
const char *  fmt,
va_list  args 
)

Formats and outputs a string according to a format string 'fmt' and a variable argument list 'args'.

The output is written character by character using a user-defined output function 'outchar'.

Parameters
outcharThe output function that writes a single character.
argA pointer to optional arguments for the output function.
fmtThe format string specifying the output format.
argsThe variable argument list containing the values to be formatted and output.
Returns
The number of characters written.