summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-03-08 16:53:10 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-03-08 16:53:10 +0200
commit159344852921967140b44de91e1eb717f23f6cde (patch)
tree892828ac7317e1835e7527385931a7a0cd104193 /src/bin
parenta552fa758f13b29953eb44720f8ec10e13718b89 (diff)
Implement print buffer and utf8
Now just raster modes and it's done.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/escpos2raster.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/escpos2raster.c b/src/bin/escpos2raster.c
index e4c9708..4eaafe1 100644
--- a/src/bin/escpos2raster.c
+++ b/src/bin/escpos2raster.c
@@ -54,16 +54,18 @@ int
main(int argc, char *argv[])
{
{
-#define CANVAS_W 256
+#define CANVAS_W 267 * 2
#define CANVAS_H 1024
- char window[4096];
- uint8_t canvas_data[CANVAS_W * CANVAS_H];
+ char window[4096], var[256];
+ uint8_t canvas_data[CANVAS_W * CANVAS_H], print_buffer[CANVAS_W * ESCPOS_PRINT_BUFFER_MAX_HEIGHT];
struct parser p = {
.parser = {
.read = escpos_read,
.write = escpos_write,
.canvas = { .data = canvas_data, .w = CANVAS_W, .h = CANVAS_H },
- .window = { .data = window, sizeof(window) },
+ .print_buffer = { .data = print_buffer, .w = CANVAS_W, .h = ESCPOS_PRINT_BUFFER_MAX_HEIGHT },
+ .window = { .data = window, .len = sizeof(window) },
+ .var = { .data = var, .len = sizeof(var) },
},
.input = (argc >= 2 ? fopen_or_die(argv[1], "rb") : stdin),
.output = (argc >= 3 ? fopen_or_die(argv[2], "wb") : stdout),