aboutsummaryrefslogtreecommitdiff
path: root/lpprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'lpprint.c')
-rw-r--r--lpprint.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/lpprint.c b/lpprint.c
index 1b5c488..ed52328 100644
--- a/lpprint.c
+++ b/lpprint.c
@@ -33,6 +33,18 @@ void printcharset (const byte *st) {
33} 33}
34 34
35 35
36static void printIcharset (const Instruction *inst, const byte *buff) {
37 byte cs[CHARSETSIZE];
38 int i;
39 loopset(j, cs[j] = 0);
40 for (i = 0; i < CHARSETSIZE << 3; i++) {
41 if (charinset(inst, buff, i))
42 setchar(cs, i);
43 }
44 printcharset(cs);
45}
46
47
36static const char *capkind (int kind) { 48static const char *capkind (int kind) {
37 const char *const modes[] = { 49 const char *const modes[] = {
38 "close", "position", "constant", "backref", 50 "close", "position", "constant", "backref",
@@ -83,15 +95,15 @@ void printinst (const Instruction *op, const Instruction *p) {
83 break; 95 break;
84 } 96 }
85 case ISet: { 97 case ISet: {
86 printcharset((p+1)->buff); 98 printIcharset(p, (p+1)->buff);
87 break; 99 break;
88 } 100 }
89 case ITestSet: { 101 case ITestSet: {
90 printcharset((p+2)->buff); printjmp(op, p); 102 printIcharset(p, (p+2)->buff); printjmp(op, p);
91 break; 103 break;
92 } 104 }
93 case ISpan: { 105 case ISpan: {
94 printcharset((p+1)->buff); 106 printIcharset(p, (p+1)->buff);
95 break; 107 break;
96 } 108 }
97 case IOpenCall: { 109 case IOpenCall: {