Age | Commit message (Collapse) | Author |
|
Remove redundant copies of these macros.
Note that '\scan' has moved almost next to '\pdfnote'. However, I don't
see how to replace the latter with the former at this time. '\pdfnote'
receives much more than just numbers outside of the '\inx' macro.
git-svn-id: svn://tug.org/texlive/trunk@72004 c570f23f-e606-0410-a88d-b1316a301751
|
|
Martin Ruckert (@ruckertm) has provided new macros for scanning the
index entries and amending them with '\pdflink' macros for PDF and HINT.
This revision applies the '\scan' macro only in the '\inx' macro. (Also
in the upcoming 'pwebmac.tex'.) Of course, the heavy copy- and pasting
leads to the idea of further integrating the new stuff at a more central
and common spot in 'cweb*mac.tex'. We'll see...
However, in this present state, the major application of the C/WEB
macros for the 'knuth-pdf' and 'knuth-hint' packages delivers great
results. The main run of the 'makeall' script, producing 58 PDF files,
reduces the overall runtime from 1m7s to 0m45s.
Thanks to Martin for the exycellent contribution!
git-svn-id: svn://tug.org/texlive/trunk@72003 c570f23f-e606-0410-a88d-b1316a301751
|
|
Martin Ruckert's talk at TUG'24 about 'Profiling TeX' (watch on YouTube:
https://www.youtube.com/live/d7vTW7PR0B4?t=7795s) and the ensuing private
discussion with him lead me to inspect the relevant parts of
'cwebacromac.tex' (and 'pwebmac.tex') more closely in order to address
the performance issues with certain large C/WEB programs.
The most glaring example is MP.W, where every advanced TeX engine (for
PDF and HINT) virtually stops for 1--2 seconds (on my machine) at two of
the index pages because of the huge lists of section references for the
variable 'mp' and the type 'MP' that are used 'everywhere'. (See below.)
At this point, we haven't solved the quadratic performance behavior yet.
However, the main changes applied in this commit at least slightly
improve the macros and their application. In the overall context of the
'knuth-pdf'/'knuth-hint' packages, the 'index issue' reported by Martin
becomes more or less irrelvant. The script 'makeall' produces 58 PDF
documents in the main run. With all optimizations applied, the runtime
is reduced by mere seconds from '1m7s' to '0m59s' (with 'pdftex').
(a) '\pdflink' and '\HINTlink' have lost their second parameter, which
was only used with 'plain TeX plus dvipdf' and 'XeTeX' anyway. This cut
down the replacement strings significantly. In one example I observed a
runtime improvement of about twenty percent (2--3 seconds) by this
change alone.
(b) Macros '\makeoutlinetoks' and 'outilnedone' swallowed the
surrounding macro calls, thus simplifying their application.
(c) '\newcount\countC' was replaced with '\newif\ifhavenum' to avoid
arithmetic with '0' and '1' for a simple Boolean operation.
(d) '\newcount\countD' was renamed to '\countNOS'. (Unrelated.)
In order to address the 'worst' CWEB code MP.W mentioned above, I
changed both the macros and the 'makeall' script. My local MP.CH changes
the '\inx' macro to address two 'Overfull \hboxes', so it is easy to
remove the use of '\pdfnote' when setting up the index. Instead,
'makeall' invokes SED to amemd the MP.IDX file created by CWEAVE with
the necessary '\pdflink' macro invocations for all section numbers in
one fell swoop. This cuts the processing time for MP.TEX in half (!!).
However, I do not intend to incorporate this approach into
'cwebmac.tex'/'pwebmac.tex' because this would most likely require
'--shell-escape' and become too system-dependent. For small to midsize
C/WEB programs, this would show minor improvements anyway.
Watch this space for possible further improvements. (I'll hold back the
releases of 'CWEB 4.12' and 'pwebmac 5.0' for the time being.)
git-svn-id: svn://tug.org/texlive/trunk@71979 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@71900 c570f23f-e606-0410-a88d-b1316a301751
|
|
Maybe someone wants to use a different set of fonts in future.
'\eightrm' is already loaded in 'cwebmac.tex'.
git-svn-id: svn://tug.org/texlive/trunk@71886 c570f23f-e606-0410-a88d-b1316a301751
|
|
See https://github.com/ascherer/web/issues/25 for some context.
This will trigger new releases of CWEB, pwebmac, knuth-[hint,pdf} later.
git-svn-id: svn://tug.org/texlive/trunk@71332 c570f23f-e606-0410-a88d-b1316a301751
|
|
* 'do..while' loops should be separated from surrounding statements
(like plain 'while' loops, or 'if' and 'for'), even when CWEAVE is
invoked with option '-f'. (Can still be overwritten with '@+' before
'do' and after 'while'.)
* A stacked construct like
if (..) whatever;
else if (..) whatever;
else break;
should place 'break' right below 'if'; 'break_space' (\5) is a tad
too wide.
* Pandoc 3.1.11.1 escapes all hyphens. (Might be reverted in future.)
git-svn-id: svn://tug.org/texlive/trunk@69571 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@68646 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@68616 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@68578 c570f23f-e606-0410-a88d-b1316a301751
|
|
Note that 'pdfwebtocfront.tex' is not yet ready for LuaTeX, because
'gftodvi.tex' breaks in and around 'pwebmac.tex'. -- Later.
git-svn-id: svn://tug.org/texlive/trunk@68405 c570f23f-e606-0410-a88d-b1316a301751
|
|
Extract common macros from cwebmac.tex and the PDF variants of the
CTWILL macros. Update cwebman.tex accordingly.
Fixes in CWEB code:
- Consistent formatting of terminal output in cases of error
- Revert fputs back to printf
- Add curly braces for progress report (harmless glitch in CWEB 2.0)
git-svn-id: svn://tug.org/texlive/trunk@68327 c570f23f-e606-0410-a88d-b1316a301751
|
|
This is a major update for CWEB 4.9 from May 2023. The base package
received fixes, internal changes, and significant revisions:
Fixes:
* Fix issue #43: 'out_buf' overflow on malign user input
- Handle border case from bug report
- Discard rest of input lines exceeding 'buf_size' characters
- Purge 'ungetc' from the TeX part as well
* Fix typo in 'examples/wordtest.w' (reported by DEK)
* 'Ilk' is of type 'eight_bits'
* Avoid over-/underflow of section depth with malicious user input
Internal changes:
* Unroll 'init_p' helper function in COMMON
- it is used for CWEAVE only (and CTWILL downstream)
* Match 'common.w' and 'common.h'
- Reshuffle declarations and some code sections
- Add starred section titles
* Demote all starred sections in 'common.w' (single star)
* Code cleanup
- Make 'pop_level' a simple macro in CWEAVE
- Use structure assignment (as in CTANGLE)
- More compact 'stack' handling
- Make use of type 'mode'
- Purge a few 'goto' statements (and add some others)
- Replace some 'sprintf' with 'snprintf'
- Syntactic sugar for functional macros
- Straighten 'byte_start' arithmetic
- Desolve former section 19 of CWEAVE with internal array sizes
- Hide 'print_text' analytics function from C compiler with DEBUG
- Streamline 'phase_two' of CTANGLE
- Refurbish 'phase_three' of CWEAVE
* Insert blank line after '\ch' in TeX output (cf. CWEB 3.0)
Macro changes
* Cleanup some '\acro' macros in 'cwebmac.tex'
Also the CWEBbin package received updates and amendments:
Preparation:
* Fix a bug in 'twinxmac.tex' (3rd patch file applied in 'cwebbin.spec')
* Apply a 5th patch file to adapt CTWILL macros to CWEB 4.9/4.10
Special formatting:
* Format 'common.w' with CTWILL using 'comm-mini.ch'
* Format 'ctwill.w' with HiTeX using 'proofmac.tex' and 'ctwill-hint.ch'
* New 'pdfproofmac.tex' for use with HiTeX and pdfTeX and XeTeX
- pdfctwimac.tex will no longer work with HiTeX
* Add 'proofsort' script in addition to 'refsort' program
* Minor improvements in all pdf macros
TeX Live:
* CTWILL in TeX Live uses 'kpse_find_file' to look up 'bux' files
* Slightly extend arrays in 'ctwill' and 'refsort' for TeX Live
* Max out 'max_refs' for CWEAVE/CTWILL
* Add 'ctwill.test' for TeX Live
Revise formatted sources:
* e.g., 'twinx'
* 'ctwill' in all its incarnations
git-svn-id: svn://tug.org/texlive/trunk@67978 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@67359 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@67158 c570f23f-e606-0410-a88d-b1316a301751
|
|
This commit bumps the version number to 4.9.
And it reverts a few occurrences of '\ifacro' as synonym for '\ifpdf'.
All other changes since CWEB 4.8 were committed as rolling releases.
git-svn-id: svn://tug.org/texlive/trunk@67119 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@66769 c570f23f-e606-0410-a88d-b1316a301751
|
|
A CWEB program without any starred sections bombs in '\inx';
see https://www-cs-faculty.stanford.edu/~knuth/programs/reflect.w.gz
as example.
git-svn-id: svn://tug.org/texlive/trunk@65080 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@65065 c570f23f-e606-0410-a88d-b1316a301751
|
|
More importantly: Don't forget to output the PDF bookmarks for starred
sections when using 'tex "\let\pdf+..."'.
git-svn-id: svn://tug.org/texlive/trunk@63784 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@63651 c570f23f-e606-0410-a88d-b1316a301751
|
|
iftex.sty sets \ifpdf according to \pdfoutput. This can be set _before_
'\input cwebmac.tex'.
Note that you can _not use 'pdftex "\let\pdf+\pdfoutput=0\input ..."',
because \ifpdftex is always 'true' for PDFTeX.
HINT has infinite space, so we can also show TeX code for section 31.
git-svn-id: svn://tug.org/texlive/trunk@63649 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@63636 c570f23f-e606-0410-a88d-b1316a301751
|
|
While '\pdftextrue' and '\pdftrue' should be mutually exclusive in
classic CWEB, this has to be programmatically expressed for the future
use of 'iftex.sty'. (Introduced 2002.)
And the 'count' attribute for the 'Names of Sections' bookmark should
not exceed the number of subentries, lest many PDF validators will
rightfully complain. So, instead of the total number of all sections,
i.e., the number of the 'Index.' section, we had better calculate the
actual number of '@<named sections@>'. (Introduced 2000.)
(And the new 'ctan' target in the 'Makefile' should prevent any future
mishaps when uploading updates of the CWEB package to CTAN.)
git-svn-id: svn://tug.org/texlive/trunk@63625 c570f23f-e606-0410-a88d-b1316a301751
|
|
This new release provides the following features:
* @<Code sections@> can be used freely in any #if -- #elif -- #else --
#endif preprocessor branches without bashing the debugger
* The GCC compiler can be invoked with option -Wimplicit-fallthrough=2
on all CWEB code modules and will acknowledge /* fall through */
comments in the tangled C code
* Simple C casts like '(double)x' are formatted with non-breaking small
spaces as '(double)\,x' in the woven TeX output
* The HINT boolean macros are now in lowercase (as in ifhint.tex)
* Comma-separated lists of variable declarations are formatted in
accordance with function parameter lists and enumerations, i.e.,
comma is handled in math-mode with associated small spacing
and it fixes these bugs:
* Section @<Preprocessor definitions@> isn't overprinted (in PDF)
* Trivial CWEB code is formatted correctly (issue #36)
* Nested type definitions are recognized (issue #34)
Major remaining bug (as of CWEB 4.3.1):
* Issue #38 as described earlier
git-svn-id: svn://tug.org/texlive/trunk@63490 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@62022 c570f23f-e606-0410-a88d-b1316a301751
|
|
'\pdfnote' has moved from '\ifacro' to '\ifacroHINT' block.
'\rangle' was placed too far left and over 'definitions'.
git-svn-id: svn://tug.org/texlive/trunk@61965 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@61863 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@61852 c570f23f-e606-0410-a88d-b1316a301751
|
|
ATTOW, this requires
$ hitex -ini -jobname=hitex **tex.ini
to activate the HiTeX extensions.
git-svn-id: svn://tug.org/texlive/trunk@61790 c570f23f-e606-0410-a88d-b1316a301751
|
|
The upcoming CWEB 4.7 will support HiTeX and its HINT format.
To use this material you can
$ hitex -ini -jobname=hitex tex.ini
$ make all PDF=hi fullmanual
$ hintview common.hnt # et al.
git-svn-id: svn://tug.org/texlive/trunk@61785 c570f23f-e606-0410-a88d-b1316a301751
|
|
Major changes since CWEB 4.5:
* Restore '\T' macro backward compatibility.
CWEB 4.3 introduced a major change in the '\T' macro to allow C++ 'hex
exponent' notation (e.g., 0x1FFFFp10). This made CWEAVE/CTWILL mutually
incompatible with non-matching versions of their set of macros and v.v.
This release tries to reestablish the standard behavior at least for
numeric constants. Of course, 'old' CWEAVE/CTWILL won't deliver on 'hex
exponents' in the CWEB input, but those should be rare anyway.
* Restore 'classic' PDF page dimensions.
Heiko's PDF files of 2014 used 'Executive' page dimensions, i.e.,
7.5in times 10in. C/WEB's internal inch values suggest to use those
plus a 0.5in border on each side.
* Revert meaning of option 'c'.
Option 'c' is OFF by default to avoid spurious entries in build.log.
* 'squash'/'reduce' have been straightened out for k=1,..,4.
* Code beautifications for 'make fullmanual'.
* Code cleanup for internal reasons.
* Cleanup in 'prod.w' (indentation et al.).
* New 'prod-cweave.w' (along 'prod-twill.w') for material from CWEBbin.
* Fixes for option '-o' (didn't work as advertised in border cases).
* New signature for the 'make_ministring' function in CTWILL.
git-svn-id: svn://tug.org/texlive/trunk@61411 c570f23f-e606-0410-a88d-b1316a301751
|
|
CWEB 4.3 introduced a major change in the '\T' macro to allow C++ 'hex
exponent' notation (e.g., 0x1FFFFp10). This made CWEAVE/CTWILL mutually
incompatible with non-matching versions of their set of macros and v.v.
This change tries to reestablish the standard behavior at least for
numeric constants. Of course, 'old' CWEAVE/CTWILL won't deliver on 'hex
exponents' in the CWEB input, but those should be rare anyway.
git-svn-id: svn://tug.org/texlive/trunk@60909 c570f23f-e606-0410-a88d-b1316a301751
|
|
This is a service update due to general demand:
* Option 'c' is OFF by default to avoid spurious entries in build.log.
* 'squash'/'reduce' have been straightened out for k=1,..,4.
* Code beautifications for 'make fullmanual'.
* Code cleanup for internal reasons.
* Cleanup in 'prod.w' (indentation et al.).
* New 'prod-cweave.w' (along 'prod-twill.w') for material from CWEBbin.
* Fixes for option '-o' (didn't work as advertised in border cases).
* New signature for the 'make_ministring' function in CTWILL.
git-svn-id: svn://tug.org/texlive/trunk@60519 c570f23f-e606-0410-a88d-b1316a301751
|
|
This is a service release for CWEB 4.0.
* Upstream CWEB 4.5 was reviewed with the 'splint' utility. This
resulted in lots of cast changes and a few code improvements.
* All 'length' variables are retyped to 'size_t'.
* <stdbool.h> is replaced by <kpathsea/simpletypes.h> to keep CWEB
compatible with antique systems that still support TeX Live.
git-svn-id: svn://tug.org/texlive/trunk@59926 c570f23f-e606-0410-a88d-b1316a301751
|
|
This is yet another service release for CWEB 4.0.
* Upstream CWEB 4.4 has been reset to the original buffer sizes
of CWEB 3.64c. These are now also used in stand-alone CWEBbin.
CWEB for TeX Live uses extended/maxed-out buffer settings.
* A few minor typographical bugs were fixed.
* Tons of minutiae were addressed in the 'fullmanual' documents.
git-svn-id: svn://tug.org/texlive/trunk@59486 c570f23f-e606-0410-a88d-b1316a301751
|
|
This release is almost the same as CWEB 4.3 of 2021-04-16, but
* it fixes the indexing bug in CWEAVE/CTWILL that got retracted
* it extracts and collects all additions made in CTWILL, so that the
section numbers of CWEAVE are retained up to §272 and new material is
described in the (first) appendix, including the CTWILL user manual
* it provides fully revised and (hopefully) corrected mini-indexes for
CTWILL, if it is processed by itself (to be published in package
'knuth-pdf' on CTAN)
git-svn-id: svn://tug.org/texlive/trunk@59061 c570f23f-e606-0410-a88d-b1316a301751
|
|
This reverts commit 3ccac2a7d0f4a19dde861c6f4c178e853d90f0cc.
CWEB 4.3 is seriously broken.
git-svn-id: svn://tug.org/texlive/trunk@59048 c570f23f-e606-0410-a88d-b1316a301751
|
|
This release introduces new features to CWEB 4:
* Former option '-t' is now called '-c'.
- New option '-t' for CWEAVE when dealing with 'typename' in
C++ templates.
- New option '-k' for CTANGLE to keep '-separators in numeric
literals.
* Support for "variadic macros" along "variadic functions".
* @d is printed similar to #define (and vice versa):
- '#' is no longer printed in boldface.
- Spacing is similar in most cases.
* Support for extended C99/C++ numeric literals:
- hexadecimal, octal, and -- new! -- binary numbers.
- NOTE: 'cwebmac.tex 4.3' is NOT compatible with CWEAVE 4.2 and older
and vice versa.
* Long parameter lists in ANSI function definitions are indented similar
to old-style function parameters.
- Option '-i' works similar for old-style and modern function headers.
* Additional C99/C++ keywords -- from 'alignas' to 'thread_local' -- are
supported internally.
* '@i'nclude file 'iso_types.w' for numeric types (in addition to
'c++lib.w').
* Countless code modifications, including some corrections amd
improvements.
Thanks and cudos to Github user "@texdraft" for numerous contributions
to this feature release!
git-svn-id: svn://tug.org/texlive/trunk@58884 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@57912 c570f23f-e606-0410-a88d-b1316a301751
|
|
This second service release wraps up the major code overhaul
of CWEB 4.0. New features will take more time.
git-svn-id: svn://tug.org/texlive/trunk@57895 c570f23f-e606-0410-a88d-b1316a301751
|
|
Enough changes have accumulated since the major release of CWEB 4.0
to warrant a new revision number.
git-svn-id: svn://tug.org/texlive/trunk@57806 c570f23f-e606-0410-a88d-b1316a301751
|
|
In the course of the "2021 TeX tuneup", Don Knuth kindly transferred
the responsibility for CWEB to me; see the original CWEB home page
(https://www-cs-faculty.stanford.edu/~knuth/cweb.html), section
"CWEB 4.0" and the updated CWEB development project
(https://github.com/ascherer/cweb).
This first new release draws heavily on the multi-decade work collected
in my "CWEBbin" project (https://github.com/ascherer/cwebbin). I moved
(almost) all stuff from the "*-patch.*" changefiles into the new CWEB
sources and applied all of the "*-ansi.*" changes as well.
Moreover, I made "common.h" the full interface of "common.w" in order to
avoid code redundancy. And I tried to fix as many of the bugs reported
by email to DEK and/or tex-k@tug.org.
In total, "make; make cautiously; make fullmanual" runs flawlessly with
GCC on Linux and with LLVM on MacOS.
After the release of "CWEB 4.0", also "CWEBbin 2021" has also been fully
revised. Thousands of lines of changefiles could be purged. What's
left are the clearcut extensions for CWEB and the additional stuff for
integration in "TeX Live 2021".
git-svn-id: svn://tug.org/texlive/trunk@57658 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@45064 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@43075 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@39442 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@3417 c570f23f-e606-0410-a88d-b1316a301751
|
|
git-svn-id: svn://tug.org/texlive/trunk@1485 c570f23f-e606-0410-a88d-b1316a301751
|