- Notifications
You must be signed in to change notification settings - Fork5
Commit6eefd24
committed
Remove typedef celt from the regex library, along with macro NOCELT.
The regex library used to have a notion of a "collating element" that wasdistinct from a "character", but Henry Spencer never actually implementedhis planned support for multi-character collating elements, and the Tclcrew ripped out most of the stubs for that years ago. The only thing leftthat distinguished the "celt" typedef from the "chr" typedef was that"celt" was supposed to also be able to hold the not-a-character "NOCELT"value. However, NOCELT was not used anywhere after the MCCE stub removalchanges, which means there's no need for celt to be different from chr.Removing the separate typedef simplifies matters and also removes a trapfor the unwary, in that celt is signed while chr may not be, so comparisonscould mean different things. There's no bug there today because werestrict CHR_MAX to be less than INT_MAX, but I think there may have beensuch bugs before we did that, and there could be again if anyone everdecides to fool with the range of chr.This patch also removes assorted unnecessary casts to "chr" of valuesthat are already chrs. Many of these seem to be leftover from days whenthe code was compatible with pre-ANSI C.1 parent5285c5e commit6eefd24
File tree
5 files changed
+33
-38
lines changed- src
- backend/regex
- include/regex
5 files changed
+33
-38
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
94 |
| - | |
| 93 | + | |
| 94 | + | |
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
|
Lines changed: 5 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
870 | 870 |
| |
871 | 871 |
| |
872 | 872 |
| |
873 |
| - | |
| 873 | + | |
874 | 874 |
| |
875 | 875 |
| |
876 | 876 |
| |
| |||
986 | 986 |
| |
987 | 987 |
| |
988 | 988 |
| |
989 |
| - | |
| 989 | + | |
990 | 990 |
| |
991 |
| - | |
992 |
| - | |
993 | 991 |
| |
994 | 992 |
| |
995 | 993 |
| |
| |||
1153 | 1151 |
| |
1154 | 1152 |
| |
1155 | 1153 |
| |
1156 |
| - | |
| 1154 | + | |
1157 | 1155 |
| |
1158 | 1156 |
| |
1159 | 1157 |
| |
| |||
1165 | 1163 |
| |
1166 | 1164 |
| |
1167 | 1165 |
| |
1168 |
| - | |
| 1166 | + | |
1169 | 1167 |
| |
1170 | 1168 |
| |
1171 | 1169 |
| |
1172 |
| - | |
| 1170 | + | |
1173 | 1171 |
| |
1174 | 1172 |
|
Lines changed: 18 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
364 |
| - | |
| 364 | + | |
365 | 365 |
| |
366 |
| - | |
| 366 | + | |
367 | 367 |
| |
368 | 368 |
| |
369 | 369 |
| |
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 |
| - | |
405 |
| - | |
| 404 | + | |
| 405 | + | |
406 | 406 |
| |
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
410 |
| - | |
| 410 | + | |
411 | 411 |
| |
412 | 412 |
| |
413 | 413 |
| |
| |||
444 | 444 |
| |
445 | 445 |
| |
446 | 446 |
| |
447 |
| - | |
| 447 | + | |
448 | 448 |
| |
449 | 449 |
| |
450 | 450 |
| |
| |||
455 | 455 |
| |
456 | 456 |
| |
457 | 457 |
| |
458 |
| - | |
| 458 | + | |
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
| |||
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
480 |
| - | |
| 480 | + | |
481 | 481 |
| |
482 | 482 |
| |
483 |
| - | |
| 483 | + | |
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
| |||
493 | 493 |
| |
494 | 494 |
| |
495 | 495 |
| |
496 |
| - | |
| 496 | + | |
497 | 497 |
| |
498 | 498 |
| |
499 | 499 |
| |
| |||
503 | 503 |
| |
504 | 504 |
| |
505 | 505 |
| |
506 |
| - | |
507 |
| - | |
| 506 | + | |
| 507 | + | |
508 | 508 |
| |
509 | 509 |
| |
510 |
| - | |
511 |
| - | |
| 510 | + | |
| 511 | + | |
512 | 512 |
| |
513 | 513 |
| |
514 | 514 |
| |
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
521 |
| - | |
| 521 | + | |
522 | 522 |
| |
523 | 523 |
| |
524 | 524 |
| |
| |||
673 | 673 |
| |
674 | 674 |
| |
675 | 675 |
| |
676 |
| - | |
| 676 | + | |
677 | 677 |
| |
678 | 678 |
| |
679 |
| - | |
680 | 679 |
| |
681 | 680 |
| |
682 | 681 |
| |
683 |
| - | |
684 |
| - | |
| 682 | + | |
| 683 | + | |
685 | 684 |
| |
686 | 685 |
| |
687 | 686 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
| |||
1424 | 1424 |
| |
1425 | 1425 |
| |
1426 | 1426 |
| |
1427 |
| - | |
1428 |
| - | |
| 1427 | + | |
| 1428 | + | |
1429 | 1429 |
| |
1430 | 1430 |
| |
1431 | 1431 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 | 61 |
| |
63 |
| - | |
64 | 62 |
| |
65 | 63 |
| |
66 | 64 |
| |
67 | 65 |
| |
68 | 66 |
| |
69 |
| - | |
| 67 | + | |
70 | 68 |
| |
71 | 69 |
| |
72 | 70 |
| |
|
0 commit comments
Comments
(0)