Macros | Functions
printf.h File Reference
#include <stdarg.h>
#include <stddef.h>
Include dependency graph for printf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _PRINTF_H_
 
#define printf   printf_
 
#define printf   printf_
 
#define snprintf   snprintf_
 
#define snprintf   snprintf_
 
#define sprintf   sprintf_
 
#define sprintf   sprintf_
 
#define vprintf   vprintf_
 
#define vprintf   vprintf_
 
#define vsnprintf   vsnprintf_
 
#define vsnprintf   vsnprintf_
 

Functions

void _putchar (char character)
 
int fctprintf (void(*out)(char character, void *arg), void *arg, const char *format,...)
 
int printf_ (const char *format,...)
 
int snprintf_ (char *buffer, size_t count, const char *format,...)
 
int sprintf_ (char *buffer, const char *format,...)
 
int vprintf_ (const char *format, va_list va)
 
int vsnprintf_ (char *buffer, size_t count, const char *format, va_list va)
 

Macro Definition Documentation

◆ _PRINTF_H_

#define _PRINTF_H_

Definition at line 34 of file test_suite.cpp.

◆ printf [1/2]

#define printf   printf_

Tiny printf implementation You have to implement putchar if you use printf() To avoid conflicts with the regular printf() API it is overridden by macro defines and internal underscore-appended functions like printf() are used

Parameters
formatA string that specifies the format of the output
Returns
The number of characters that are written into the array, not counting the terminating null character

Definition at line 61 of file test_suite.cpp.

◆ printf [2/2]

#define printf   printf_

◆ snprintf [1/2]

#define snprintf   snprintf_

◆ snprintf [2/2]

#define snprintf   snprintf_

Tiny SNPRINTF/vsnprintf implementation

Parameters
bufferA pointer to the buffer where to store the formatted string
countThe maximum number of characters to store in the buffer, including a terminating null character
formatA string that specifies the format of the output
vaA value identifying a variable arguments list
Returns
The number of characters that COULD have been written into the buffer, not counting the terminating null character. A value equal or larger than count indicates truncation. Only when the returned value is non-negative and less than count, the string has been completely written.

Definition at line 86 of file test_suite.cpp.

◆ sprintf [1/2]

#define sprintf   sprintf_

◆ sprintf [2/2]

#define sprintf   sprintf_

Tiny sprintf implementation Due to security reasons (buffer overflow) YOU SHOULD CONSIDER USING (V)SNPRINTF INSTEAD!

Parameters
bufferA pointer to the buffer where to store the formatted string. MUST be big enough to store the output!
formatA string that specifies the format of the output
Returns
The number of characters that are WRITTEN into the buffer, not counting the terminating null character

Definition at line 72 of file test_suite.cpp.

◆ vprintf [1/2]

#define vprintf   vprintf_

Tiny vprintf implementation

Parameters
formatA string that specifies the format of the output
vaA value identifying a variable arguments list
Returns
The number of characters that are WRITTEN into the buffer, not counting the terminating null character

Definition at line 98 of file test_suite.cpp.

◆ vprintf [2/2]

#define vprintf   vprintf_

◆ vsnprintf [1/2]

#define vsnprintf   vsnprintf_

Definition at line 87 of file test_suite.cpp.

◆ vsnprintf [2/2]

#define vsnprintf   vsnprintf_

Function Documentation

◆ _putchar()

void _putchar ( char  character)

Output a character to a custom device like UART, used by the printf() function This function is declared here only. You have to write your custom implementation somewhere

Parameters
characterCharacter to output

◆ fctprintf()

int fctprintf ( void(*)(char character, void *arg)  out,
void *  arg,
const char *  format,
  ... 
)

printf with output function You may use this as dynamic alternative to printf() with its fixed _putchar() output

Parameters
outAn output function which takes one character and an argument pointer
argAn argument pointer for user data passed to output function
formatA string that specifies the format of the output
Returns
The number of characters that are sent to the output function, not counting the terminating null character

Definition at line 906 of file printf.c.

◆ printf_()

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

Definition at line 862 of file printf.c.

◆ snprintf_()

int snprintf_ ( char *  buffer,
size_t  count,
const char *  format,
  ... 
)

Definition at line 883 of file printf.c.

◆ sprintf_()

int sprintf_ ( char *  buffer,
const char *  format,
  ... 
)

Definition at line 873 of file printf.c.

◆ vprintf_()

int vprintf_ ( const char *  format,
va_list  va 
)

Definition at line 893 of file printf.c.

◆ vsnprintf_()

int vsnprintf_ ( char *  buffer,
size_t  count,
const char *  format,
va_list  va 
)

Definition at line 900 of file printf.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:06