All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexprintf.h File Reference

Lightweight printf with float support header. More...

Go to the source code of this file.

Functions

int vex_printf (const char *format,...)
 send formated string to the console More...
 
int vex_chprintf (vexStream *chp, const char *format,...)
 send formated string to a vexStream More...
 
int vex_vprintf (const char *format, va_list args)
 send formated string to a vexStream More...
 
int vex_vchprintf (vexStream *chp, const char *format, va_list args)
 send formated string to a vexStream More...
 
int vex_sprintf (char *out, const char *format,...)
 create formated string in a buffer More...
 
int vex_snprintf (char *out, uint16_t max_len, const char *format,...)
 create formated string in a buffer More...
 
int vex_vsprintf (char *out, const char *format, va_list args)
 create formated string in a buffer from a va_list More...
 
int vex_vsnprintf (char *out, uint16_t max_len, const char *format, va_list args)
 create formated string in a buffer from a va_list More...
 

Detailed Description

Lightweight printf with float support header.

Function Documentation

int vex_printf ( const char *  format,
  ... 
)

send formated string to the console

Parameters
[in]formatThe format string
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf

int vex_chprintf ( vexStream chp,
const char *  format,
  ... 
)

send formated string to a vexStream

Parameters
[in]chpThe stream
[in]formatThe format string
Returns
the number of characters that were output

This function is used as a direct replacement for chprintf. It has similar but reduced functionality to the standard library function sprintf.

int vex_vprintf ( const char *  format,
va_list  args 
)

send formated string to a vexStream

Parameters
[in]formatThe format string
[in]argsvariable argument list
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf. This version takes a variable argument list directly.

int vex_vchprintf ( vexStream chp,
const char *  format,
va_list  args 
)

send formated string to a vexStream

Parameters
[in]chpThe stream
[in]formatThe format string
[in]argsvariable argument list
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf. This version takes a variable argument list directly and can also output to a stream that is not the CONSOLE.

int vex_sprintf ( char *  out,
const char *  format,
  ... 
)

create formated string in a buffer

Parameters
[out]outThe output buffer
[in]formatThe format string
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf

int vex_snprintf ( char *  out,
uint16_t  max_len,
const char *  format,
  ... 
)

create formated string in a buffer

Parameters
[out]outThe output buffer
[out]max_lenThe output buffer length
[in]formatThe format string
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf

int vex_vsprintf ( char *  out,
const char *  format,
va_list  args 
)

create formated string in a buffer from a va_list

Parameters
[out]outThe output buffer
[in]formatThe format string
[in]argsa variable argument list
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf

int vex_vsnprintf ( char *  out,
uint16_t  max_len,
const char *  format,
va_list  args 
)

create formated string in a buffer from a va_list

Parameters
[out]outThe output buffer
[out]max_lenThe output buffer length
[in]formatThe format string
[in]argsa variable argument list
Returns
the number of characters that were output

This has similar but reduced functionality to the standard library function sprintf