summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-03-08 16:52:20 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-03-08 16:52:20 +0200
commita552fa758f13b29953eb44720f8ec10e13718b89 (patch)
tree1835db6ae19525e6b0cdac46fb5eae0ce5bb716b /src
parentf54e7e8c2aeb4fafebf0d5bd5570b060462c9ecf (diff)
stack: Use unsigned char type
Diffstat (limited to 'src')
-rw-r--r--src/escpos/stack.rl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/escpos/stack.rl b/src/escpos/stack.rl
index a051318..5145782 100644
--- a/src/escpos/stack.rl
+++ b/src/escpos/stack.rl
@@ -57,6 +57,7 @@ stack_get_num(const struct stack *stack)
%%{
machine escpos_stack;
+ alphtype unsigned char;
action stack_num {
const char *byte = (char*)stack.var.buf.mem.data + stack.var.offset;
@@ -85,8 +86,8 @@ stack_get_num(const struct stack *stack)
}
NUL = 0x00;
- TEXT = 32..127;
+ TEXT = (32..244 - 192..193);
- stack_num = -128..127 >begin_num $store %stack_num;
+ stack_num = 0..255 >begin_num $store %stack_num;
stack_str = TEXT* $store >begin_str :>> NUL %stack_str;
}%%