From 5f8d72f1d2b8ec4f6c2b1cc08ffead8a17500bdc Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 16 Mar 2026 11:12:05 +0100 Subject: [PATCH] Mon 16 Mar 11:09:06 CET 2026 --- src/printf.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/printf.h diff --git a/src/printf.h b/src/printf.h new file mode 100644 index 0000000..8431566 --- /dev/null +++ b/src/printf.h @@ -0,0 +1,23 @@ +#ifndef _PRINTF_H +#define _PRINTF_H + +#include "types.h" +/* + Set standard output channel (default 1) +*/ +index_t print_stdout(index_t handle); + +void print_char(char c); +void print_int(int n); +void print_uint_hex(int n); +void print_uint(unsigned int n); +int print_array(number_t *s, index_t len); +int print_string(char *s); +void print_number(number_t x); +void print_format(char *format, ...); +char* sprint_int(char *buf, int i); +// buffer version supporting up and down growing cyclic buffers +int bprint_char(char *buf, int off, int size, int dir, char c); +int bprint_int(char *buf, int off, int size, int dir, int i); + +#endif