summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
AgeCommit message (Collapse)Author
75 min.Simplify 'fix-changefile-lines.py' script.HEADtrunkAndreas Scherer
"In every large program there's a small one struggling to get out." Back to basics (Thanks, Tyge!), with just enough flexibility. In this reduced form, 'f-c-l' handles 'tex.ch', 'ctie-k.ch', 'tie-w2c.ch', 'weave.ch' and the whole slew of CWEB's '*-w2c.ch' monsters correctly. Plus it corrects a few tags in 'bibtex.ch' just for fun. git-svn-id: svn://tug.org/texlive/trunk@71613 c570f23f-e606-0410-a88d-b1316a301751
11 hoursPurge redundancy.Andreas Scherer
're.sub()' does the right thing: When the 'pattern' doesn't 'match', it simply returns the (unmodified) string. git-svn-id: svn://tug.org/texlive/trunk@71607 c570f23f-e606-0410-a88d-b1316a301751
11 hoursMake the transformation from old to new more clear.Andreas Scherer
Handle the disection of 'old_line' and the assembly of 'new_line' simultaneously under the control of the command-line options. git-svn-id: svn://tug.org/texlive/trunk@71606 c570f23f-e606-0410-a88d-b1316a301751
12 hoursOptionally replace optional tags.Andreas Scherer
Now we can update changefiles that only have 'l.NNN' line numbers, without duplicating these (as part of the 'text'). git-svn-id: svn://tug.org/texlive/trunk@71604 c570f23f-e606-0410-a88d-b1316a301751
15 hoursRevert "Catch spurious @y."Andreas Scherer
This reverts commit bb3967e5add1994021eb0374d48aa8cbcc2dad0e. Oops, the 'self._pos += 1' shifts things badly. git-svn-id: svn://tug.org/texlive/trunk@71600 c570f23f-e606-0410-a88d-b1316a301751
15 hoursCatch spurious @y.Andreas Scherer
The author of the change most likely mistyped @y for @z. Note that we can not catch an @x in place of @z at this time. The f-c-l script starts a change hunk whenever it encounters @x. Only a second @x triggers an error---in slight deviation from CWEB's behavior. git-svn-id: svn://tug.org/texlive/trunk@71599 c570f23f-e606-0410-a88d-b1316a301751
18 hoursTry to match error messages with CWEB.Andreas Scherer
We could (a) calculate the distance of a mismatch and print "! Hmm... N of the preceeding lines failed to match." (b) issue a warning/error about a missing @z. git-svn-id: svn://tug.org/texlive/trunk@71598 c570f23f-e606-0410-a88d-b1316a301751
20 hoursCatch another exceptional situation.Andreas Scherer
'WebReader.next_line()' will never set 'tex_line' to 'None' of its own. In the case that it reaches the end of the '_web_lines' array---say the change expects more lines after the last line in the original file---, it returns a single 'None' that gets assigned to the '(p,s,l)' triplet. However, the 'tex_line' is not changed and still holds the last matching line from an earlier 'next_line()' (either in the 'for' loop or in the 'while' loop). We assign 'tex_line = None' when catching the 'TypeError' exception, because the author of the change file might accidentally duplicate a line in the '@x..@y' part of the change hunk. git-svn-id: svn://tug.org/texlive/trunk@71597 c570f23f-e606-0410-a88d-b1316a301751
23 hoursCatch exceptional situation.Andreas Scherer
The simple 'return None' does not suit the assignment to the complex '(part, section, line_number), tex_line' and raises a 'TypeError' exception. git-svn-id: svn://tug.org/texlive/trunk@71596 c570f23f-e606-0410-a88d-b1316a301751
5 daysFix typos in recent changes.Andreas Scherer
My eyes are getting terribly bad. git-svn-id: svn://tug.org/texlive/trunk@71563 c570f23f-e606-0410-a88d-b1316a301751
5 daysTEX.CH and MF.CH refer to the Jubilee Editions.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71562 c570f23f-e606-0410-a88d-b1316a301751
5 dayseTeX is based on TeX 2021.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71561 c570f23f-e606-0410-a88d-b1316a301751
5 days[CWEB] Amemd twinx.ch.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71560 c570f23f-e606-0410-a88d-b1316a301751
5 days[WEB] Recount initial changes for eTeX, pdfTeX, and XeTeX.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71559 c570f23f-e606-0410-a88d-b1316a301751
6 days[CTIE] Recreate change file with 'f-c-l -ph ctie.w ctie-k.ch'.Andreas Scherer
A few changes to 'fix-changefile-lines.py': * Print 'Old:' vs 'New:' differences to 'stderr'. * Avoid double space when using option '-h'. git-svn-id: svn://tug.org/texlive/trunk@71555 c570f23f-e606-0410-a88d-b1316a301751
8 daysAmend error message for unknown cli option.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71541 c570f23f-e606-0410-a88d-b1316a301751
8 daysDon't repeat yourself.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71540 c570f23f-e606-0410-a88d-b1316a301751
8 daysVamp up 'fix-changefile-lines.py' script.Andreas Scherer
'main()' does not mainly deal with the options. Use OptHandler class. Extended USAGE message including the set of options and their purpose. git-svn-id: svn://tug.org/texlive/trunk@71539 c570f23f-e606-0410-a88d-b1316a301751
9 days[WEB] Conservative substitutions.Andreas Scherer
weave.ch has '[148]' at the end of an '@x' line; don't mess with this. git-svn-id: svn://tug.org/texlive/trunk@71531 c570f23f-e606-0410-a88d-b1316a301751
9 days[WEB] Output '@x' with optional information.Andreas Scherer
E.g., 'fix-changefile-lines -hlp dvicopy.{wen,ch}' prints only '@x [section] text' lines. ('[137/138]' was replaced with '[137]'.) git-svn-id: svn://tug.org/texlive/trunk@71530 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] CWEB rule 69 requires a semicolon.Andreas Scherer
Make the C parts syntactically complete. git-svn-id: svn://tug.org/texlive/trunk@71503 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Reframe do..while loops.Andreas Scherer
It's not necessary to force the default layout with tons of '@+' commands; CWEB learned the stringent format decades ago. Moreover, '} @+ while' adds noticeable extra whitespace. And '@+@/' is curious, but ineffective; it always results in '@+'. git-svn-id: svn://tug.org/texlive/trunk@71502 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Consistently format 'sizeof' operator.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71500 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Make C parts syntactically self-contained.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71499 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Use unsigned type for unsigned values.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71498 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Adapt to updated cwebmac/pdfwebtocfront.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71497 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Indent tabular material.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71496 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Format start of section.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71495 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Make use of unused section.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71494 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Purge spurious \macro inserts.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71493 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Handle C/C++ keywords.Andreas Scherer
Although these uses are technically permitted, CWEAVE doesn't format them correctly in this instances. git-svn-id: svn://tug.org/texlive/trunk@71492 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Fix section count from classic TeX.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71491 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Fix indentation of @<named sections@>.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71490 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Fix some not so obvious typos.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71489 c570f23f-e606-0410-a88d-b1316a301751
12 days[HiTeX] Fix some obvious typos.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71488 c570f23f-e606-0410-a88d-b1316a301751
13 daysallow interactive deletion of \outer token, see ↵Luigi Scarso
https://tug.org/texmfbug/newbug.html#B142outer git-svn-id: svn://tug.org/texlive/trunk@71483 c570f23f-e606-0410-a88d-b1316a301751
2024-06-09[CWEB] Fix typo (upstream).Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71461 c570f23f-e606-0410-a88d-b1316a301751
2024-06-09[CWEB] CWEB comments start with '@q'.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71460 c570f23f-e606-0410-a88d-b1316a301751
2024-06-09[CWEB] Ignore @<comment@> in ctwill-w2c.ch.Andreas Scherer
Section 'Index' of COMMON.W is on Level 1, not 0. git-svn-id: svn://tug.org/texlive/trunk@71459 c570f23f-e606-0410-a88d-b1316a301751
2024-06-06Fix typo and support extension-less include files.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71451 c570f23f-e606-0410-a88d-b1316a301751
2024-06-06Purge local variables.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71450 c570f23f-e606-0410-a88d-b1316a301751
2024-06-06[CWEB] Add [part.section] l.ine information.Andreas Scherer
Apply some OO/C++ knowledge from the late nineties. git-svn-id: svn://tug.org/texlive/trunk@71449 c570f23f-e606-0410-a88d-b1316a301751
2024-06-05Reshuffle code amd comment.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71442 c570f23f-e606-0410-a88d-b1316a301751
2024-06-05[WEB] Restore @x comments with square brackets.Andreas Scherer
The initial regex was too gready. git-svn-id: svn://tug.org/texlive/trunk@71440 c570f23f-e606-0410-a88d-b1316a301751
2024-06-05Restore @x comment.Andreas Scherer
Only replace leading '-' in @x comments. Also fix special case "@ @c" (with or without following space after '@'). git-svn-id: svn://tug.org/texlive/trunk@71439 c570f23f-e606-0410-a88d-b1316a301751
2024-06-05Correctly count parts and sections.Andreas Scherer
Rerun 'fix-changefile-lines.py' on TEX.WEB amd MF.WEB. git-svn-id: svn://tug.org/texlive/trunk@71438 c570f23f-e606-0410-a88d-b1316a301751
2024-06-05[WEB] Correctly count section start markers.Andreas Scherer
Both WEAVE.WEB and TANGLE.WEB have '@*' and '@ ' markers in their exposition. Only those at the beginning of a 'line' count. Make the 'fix-changefile-lines.py' self-executable (on Linux). git-svn-id: svn://tug.org/texlive/trunk@71437 c570f23f-e606-0410-a88d-b1316a301751
2024-06-04[TIE] Fix two change chunks.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71427 c570f23f-e606-0410-a88d-b1316a301751
2024-06-04[CTIE] Add section numbers in change file.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71426 c570f23f-e606-0410-a88d-b1316a301751
2024-06-04Update [section numbers] in basic WEB change files.Andreas Scherer
git-svn-id: svn://tug.org/texlive/trunk@71425 c570f23f-e606-0410-a88d-b1316a301751