diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-27 11:03:30 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-27 11:03:30 -0300 |
commit | 97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125 (patch) | |
tree | 3ec0442b2f1ce9f3a081da5cf14f281b2d2811d5 /lpprint.c | |
parent | 012cf9c86cf91cb8354e229bde335592d41b84b2 (diff) | |
download | lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.gz lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.bz2 lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.zip |
New macros 'fillset' and 'clearset'
Diffstat (limited to 'lpprint.c')
-rw-r--r-- | lpprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -37,7 +37,7 @@ static 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 | printf("(%02x-%d) ", inst->i.aux2.set.offset, inst->i.aux2.set.size); |
40 | loopset(j, cs[j] = 0); | 40 | clearset(cs); |
41 | for (i = 0; i < CHARSETSIZE * 8; i++) { | 41 | for (i = 0; i < CHARSETSIZE * 8; i++) { |
42 | if (charinset(inst, buff, i)) | 42 | if (charinset(inst, buff, i)) |
43 | setchar(cs, i); | 43 | setchar(cs, i); |
@@ -50,7 +50,7 @@ static void printTcharset (TTree *tree) { | |||
50 | byte cs[CHARSETSIZE]; | 50 | byte cs[CHARSETSIZE]; |
51 | int i; | 51 | int i; |
52 | printf("(%02x-%d) ", tree->u.set.offset, tree->u.set.size); | 52 | printf("(%02x-%d) ", tree->u.set.offset, tree->u.set.size); |
53 | loopset(j, cs[j] = tree->u.set.deflt); | 53 | fillset(cs, tree->u.set.deflt); |
54 | for (i = 0; i < tree->u.set.size; i++) | 54 | for (i = 0; i < tree->u.set.size; i++) |
55 | cs[tree->u.set.offset + i] = treebuffer(tree)[i]; | 55 | cs[tree->u.set.offset + i] = treebuffer(tree)[i]; |
56 | printcharset(cs); | 56 | printcharset(cs); |