Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
|
Data Structures | |
struct | out_fct_wrap_type |
Macros | |
#define | PRINTF_NTOA_BUFFER_SIZE 32U |
#define | PRINTF_FTOA_BUFFER_SIZE 32U |
#define | PRINTF_SUPPORT_PTRDIFF_T |
#define | FLAGS_ZEROPAD (1U << 0U) |
#define | FLAGS_LEFT (1U << 1U) |
#define | FLAGS_PLUS (1U << 2U) |
#define | FLAGS_SPACE (1U << 3U) |
#define | FLAGS_HASH (1U << 4U) |
#define | FLAGS_UPPERCASE (1U << 5U) |
#define | FLAGS_CHAR (1U << 6U) |
#define | FLAGS_SHORT (1U << 7U) |
#define | FLAGS_LONG (1U << 8U) |
#define | FLAGS_LONG_LONG (1U << 9U) |
#define | FLAGS_PRECISION (1U << 10U) |
#define | FLAGS_WIDTH (1U << 11U) |
Typedefs | |
typedef void(* | out_fct_type) (char character, char *buffer, size_t idx, size_t maxlen) |
Functions | |
static void | _out_buffer (char character, char *buffer, size_t idx, size_t maxlen) |
static void | _out_null (char character, char *buffer, size_t idx, size_t maxlen) |
static void | _out_char (char character, char *buffer, size_t idx, size_t maxlen) |
static void | _out_fct (char character, char *buffer, size_t idx, size_t maxlen) |
static unsigned int | _strlen (const char *str) |
static bool | _is_digit (char ch) |
static unsigned int | _atoi (const char **str) |
static size_t | _ntoa_format (out_fct_type out, char *buffer, size_t idx, size_t maxlen, char *buf, size_t len, bool negative, unsigned int base, unsigned int prec, unsigned int width, unsigned int flags) |
static size_t | _ntoa_long (out_fct_type out, char *buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, unsigned long base, unsigned int prec, unsigned int width, unsigned int flags) |
static int | _vsnprintf (out_fct_type out, char *buffer, const size_t maxlen, const char *format, va_list va) |
int | printf (const char *format,...) |
int | sprintf (char *buffer, const char *format,...) |
int | snprintf (char *buffer, size_t count, const char *format,...) |
int | vsnprintf (char *buffer, size_t count, const char *format, va_list va) |
int | fctprintf (void(*out)(char character, void *arg), void *arg, const char *format,...) |
#define FLAGS_CHAR (1U << 6U) |
#define FLAGS_HASH (1U << 4U) |
#define FLAGS_LEFT (1U << 1U) |
#define FLAGS_LONG (1U << 8U) |
#define FLAGS_LONG_LONG (1U << 9U) |
#define FLAGS_PLUS (1U << 2U) |
#define FLAGS_PRECISION (1U << 10U) |
#define FLAGS_SHORT (1U << 7U) |
#define FLAGS_SPACE (1U << 3U) |
#define FLAGS_UPPERCASE (1U << 5U) |
#define FLAGS_WIDTH (1U << 11U) |
#define FLAGS_ZEROPAD (1U << 0U) |
#define PRINTF_FTOA_BUFFER_SIZE 32U |
#define PRINTF_NTOA_BUFFER_SIZE 32U |
#define PRINTF_SUPPORT_PTRDIFF_T |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
inlinestatic |
|
static |
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
out | An output function which takes one character and an argument pointer |
arg | An argument pointer for user data passed to output function |
format | A string that specifies the format of the output |
int printf | ( | const char * | format, |
... | |||
) |
Tiny printf implementation You have to implement _putchar if you use printf()
format | A string that specifies the format of the output |
int snprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
... | |||
) |
Tiny snprintf/vsnprintf implementation
buffer | A pointer to the buffer where to store the formatted string |
count | The maximum number of characters to store in the buffer, including a terminating null character |
format | A string that specifies the format of the output |
int sprintf | ( | char * | buffer, |
const char * | format, | ||
... | |||
) |
Tiny sprintf implementation Due to security reasons (buffer overflow) YOU SHOULD CONSIDER USING (V)SNPRINTF INSTEAD!
buffer | A pointer to the buffer where to store the formatted string. MUST be big enough to store the output! |
format | A string that specifies the format of the output |
int vsnprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
va_list | va | ||
) |