From 0d1817e7ca3f27e978fc537a190090b2e3005dc6 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 1 Oct 2022 09:50:24 +0200 Subject: [PATCH] Add tiny example of no stdio support. --- example/ex-no-stdio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 example/ex-no-stdio.c diff --git a/example/ex-no-stdio.c b/example/ex-no-stdio.c new file mode 100644 index 00000000..9011797e --- /dev/null +++ b/example/ex-no-stdio.c @@ -0,0 +1,16 @@ +/* + * Micro example to test if M*LIB supports not using stdio.h + */ +#define M_USE_STDIO 0 +#define M_RAISE_FATAL(...) abort() +#include "m-array.h" + +ARRAY_DEF(arr, int) + +int main(void) { + arr_t a; + arr_init(a); + arr_push_back(a, 4); + arr_clear(a); + return 0; +}