objc

printf.h
Go to the documentation of this file.
1 
62 #pragma once
63 #include <stdarg.h>
64 #include <stddef.h>
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
79 extern void sys_puts(const char *str);
80 
89 extern void sys_putch(const char ch);
90 
99 extern size_t sys_printf(const char *format, ...);
100 
108 extern size_t sys_vprintf(const char *format, va_list args);
109 
122 extern size_t sys_sprintf(char *buf, size_t sz, const char *format, ...);
123 
136 extern size_t sys_vsprintf(char *buf, size_t sz, const char *format,
137  va_list args);
138 
147 typedef const char *(*sys_printf_format_handler_t)(char format, va_list *va);
148 
164 extern size_t sys_vprintf_ex(const char *format, va_list args,
165  sys_printf_format_handler_t custom_handler);
166 
187 extern size_t sys_vsprintf_ex(char *buf, size_t sz, const char *format,
188  va_list args,
189  sys_printf_format_handler_t custom_handler);
190 
211 extern size_t sys_sprintf_ex(char *buf, size_t sz, const char *format,
212  sys_printf_format_handler_t custom_handler, ...);
213 
214 #ifdef __cplusplus
215 }
216 #endif
void sys_puts(const char *str)
Outputs a string to the system console or standard output.
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...
size_t sys_sprintf(char *buf, size_t sz, const char *format,...)
Prints formatted output to a string buffer.
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:147
void sys_putch(const char ch)
Outputs a character to the system console or standard output.
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_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_vprintf(const char *format, va_list args)
Prints formatted output using a va_list argument.