diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-01 08:31:01 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-12 03:34:18 +0200 |
commit | f54e7e8c2aeb4fafebf0d5bd5570b060462c9ecf (patch) | |
tree | b3bcc7ca21cda7d655bfcc0d9ec26d4a6668f27f /src/util/membuf.h |
Initial commit
Diffstat (limited to 'src/util/membuf.h')
-rw-r--r-- | src/util/membuf.h | 14 |
1 files changed, 14 insertions, 0 deletions
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); |