summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
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),