Commit 4b11638
committed
fix(ptx): Align text wrapping behavior with GNU in traditional mode and add related test
In traditional mode (-G) with references enabled, `uutils/ptx` failed
to wrap long lines in the same way as the GNU `ptx` reference
implementation.
This was due to the layout algorithm operating on an incorrectly large
line width, as the space for the reference column was not being
subtracted from the total width budget.
This commit implements the correct line width adjustment by subtracting
the reference width. This aligns the wrapping behavior and
makes the output identical to GNU `ptx` for the tested cases.1 parent 788bf92 commit 4b11638
2 files changed
+62
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
680 | 689 | | |
681 | 690 | | |
682 | 691 | | |
| |||
722 | 731 | | |
723 | 732 | | |
724 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
725 | 759 | | |
726 | 760 | | |
727 | 761 | | |
| |||
749 | 783 | | |
750 | 784 | | |
751 | 785 | | |
752 | | - | |
| 786 | + | |
753 | 787 | | |
754 | 788 | | |
755 | 789 | | |
| |||
783 | 817 | | |
784 | 818 | | |
785 | 819 | | |
786 | | - | |
| 820 | + | |
787 | 821 | | |
788 | 822 | | |
789 | 823 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
60 | 84 | | |
61 | 85 | | |
62 | 86 | | |
| |||
0 commit comments