aboutsummaryrefslogtreecommitdiff
path: root/lpprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'lpprint.c')
-rw-r--r--lpprint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lpprint.c b/lpprint.c
index ed52328..518d822 100644
--- a/lpprint.c
+++ b/lpprint.c
@@ -23,7 +23,7 @@ void printcharset (const byte *st) {
23 printf("["); 23 printf("[");
24 for (i = 0; i <= UCHAR_MAX; i++) { 24 for (i = 0; i <= UCHAR_MAX; i++) {
25 int first = i; 25 int first = i;
26 while (testchar(st, i) && i <= UCHAR_MAX) i++; 26 while (i <= UCHAR_MAX && testchar(st, i)) i++;
27 if (i - 1 == first) /* unary range? */ 27 if (i - 1 == first) /* unary range? */
28 printf("(%02x)", first); 28 printf("(%02x)", first);
29 else if (i - 1 > first) /* non-empty range? */ 29 else if (i - 1 > first) /* non-empty range? */
@@ -36,8 +36,9 @@ void printcharset (const byte *st) {
36static void printIcharset (const Instruction *inst, const byte *buff) { 36static void printIcharset (const Instruction *inst, const byte *buff) {
37 byte cs[CHARSETSIZE]; 37 byte cs[CHARSETSIZE];
38 int i; 38 int i;
39 printf("(%02x-%d) ", inst->i.aux2.set.offset, inst->i.aux2.set.size);
39 loopset(j, cs[j] = 0); 40 loopset(j, cs[j] = 0);
40 for (i = 0; i < CHARSETSIZE << 3; i++) { 41 for (i = 0; i < CHARSETSIZE * 8; i++) {
41 if (charinset(inst, buff, i)) 42 if (charinset(inst, buff, i))
42 setchar(cs, i); 43 setchar(cs, i);
43 } 44 }