From f54e7e8c2aeb4fafebf0d5bd5570b060462c9ecf Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 1 Feb 2018 08:31:01 +0200 Subject: Initial commit --- src/util/membuf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/util/membuf.h (limited to 'src/util/membuf.h') diff --git a/src/util/membuf.h b/src/util/membuf.h new file mode 100644 index 0000000..aef21a9 --- /dev/null +++ b/src/util/membuf.h @@ -0,0 +1,14 @@ +#pragma once + +#include "escpos/memory.h" + +struct membuf { + struct escpos_mem mem; + size_t written; +}; + +void +membuf_terminate(struct membuf *buf, const void *data, const size_t data_sz); + +void +membuf_append(struct membuf *buf, const void *data, const size_t data_sz); -- cgit v1.2.3