picofuse

printf.h
Go to the documentation of this file.
1 
64 #pragma once
65 #include <stdarg.h>
66 #include <stddef.h>
67 
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 
73 
83 extern void sys_puts(const char *str);
84 
93 extern void sys_putch(const char ch);
94 
103 extern size_t sys_printf(const char *format, ...);
104 
112 extern size_t sys_vprintf(const char *format, va_list args);
113 
126 extern size_t sys_sprintf(char *buf, size_t sz, const char *format, ...);
127 
140 extern size_t sys_vsprintf(char *buf, size_t sz, const char *format,
141  va_list args);
142 
151 typedef const char *(*sys_printf_format_handler_t)(char format, va_list *va);
152 
168 extern size_t sys_vprintf_ex(const char *format, va_list args,
169  sys_printf_format_handler_t custom_handler);
170 
191 extern size_t sys_vsprintf_ex(char *buf, size_t sz, const char *format,
192  va_list args,
193  sys_printf_format_handler_t custom_handler);
194 
215 extern size_t sys_sprintf_ex(char *buf, size_t sz, const char *format,
216  sys_printf_format_handler_t custom_handler, ...);
217 
219 
220 #ifdef __cplusplus
221 }
222 #endif
size_t sys_printf(const char *format,...)
Prints formatted output to the system console.
const char *(* sys_printf_format_handler_t)(char format, va_list *va)
Custom format handler function type.
Definition: printf.h:151
void sys_putch(const char ch)
Outputs a character to the system console or standard output.
size_t sys_sprintf(char *buf, size_t sz, const char *format,...)
Prints formatted output to a string buffer.
void sys_puts(const char *str)
Outputs a string to the system console or standard output.
size_t sys_vprintf(const char *format, va_list args)
Prints formatted output using a va_list argument.
size_t sys_vsprintf(char *buf, size_t sz, const char *format, va_list args)
Prints formatted output to a string buffer using a va_list argument.
size_t sys_sprintf_ex(char *buf, size_t sz, const char *format, sys_printf_format_handler_t custom_handler,...)
Prints formatted output to a string buffer with custom format handler support.
size_t sys_vprintf_ex(const char *format, va_list args, sys_printf_format_handler_t custom_handler)
Prints formatted output using a va_list argument with custom format handler support.
size_t sys_vsprintf_ex(char *buf, size_t sz, const char *format, va_list args, sys_printf_format_handler_t custom_handler)
Prints formatted output to a string buffer using a va_list argument with custom format handler suppor...