texlive[63488] Build/source/texk/web2c/cwebdir: [CWEB] Update

commits+ascherer at tug.org commits+ascherer at tug.org
Sun Jun 5 13:14:21 CEST 2022


Revision: 63488
          http://tug.org/svn/texlive?view=revision&revision=63488
Author:   ascherer
Date:     2022-06-05 13:14:20 +0200 (Sun, 05 Jun 2022)
Log Message:
-----------
[CWEB] Update borderline cases.

Related to the 'bug, known' in CWEAVE section 200, there's a second
known bug with the treatment of '@t TeX material @>' in a peculiar
application scenario, i.e., when you try to place a function declaration
(aka prototype) next to the function definition and separate them with a
'force' line break instead of the default 'big_force' (from production
rule 76).

For example, several codes of MMIX (mmixal.w, mmix-arith.w,
mmix-config.w, mmix-io.w, mmix-mem.w, mmix-sim.w, mmmix.w) use the
convention

void flush_listing_line @,@,@[ARGS((char*))@];@+ at t}\6{@>
void flush_listing_line(s)
  char *s;
{ ... }

Most likely because of the modified production rule 1, the '@t}\6{@>'
ends up _after_ the '\1\1' introduced by 'dindent' around the function
header and causes the function definition to be indented together with
the list of arguments. To avoid this bug in this particular case, you
should use '@t}\6\4\4{@>' instead. (Other non-conflicting cases of
'@t}\6{@>' work as before.)

Note that MMIX uses different conventions, too: mmotype.w does _not_
mingle with the line separation at all, leaving the CWEB default of
'big_force' intact. And mmix-pipe.w cleanly separates @<Prototypes@>
from @<Subroutines@> (both internal and external). I have not found
any other codes outside MMIX that are affected by this bug in CWEB 4.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/cweave.w
    trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cwebman.tex

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2022-06-04 23:42:51 UTC (rev 63487)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2022-06-05 11:14:20 UTC (rev 63488)
@@ -1,3 +1,9 @@
+2022-06-05  Andreas Scherer  <https://ascherer.github.io>
+
+	* cweave.w,
+	* cwebman-w2c.ch,
+	* cwebman.tex: Update borderline cases.
+
 2022-06-04  Andreas Scherer  <https://ascherer.github.io>
 
 	* cwebman.tex: Update codes in Appendices.

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2022-06-04 23:42:51 UTC (rev 63487)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2022-06-05 11:14:20 UTC (rev 63488)
@@ -3602,7 +3602,7 @@
 There's a known bug here, in cases where an adjacent scrap is
 |prelangle| or |prerangle|. Then the \TEX/ string can disappear
 when the \.{\\langle} or \.{\\rangle} becomes \.{<} or \.{>}.
-For example, if the user writes \.{\v x<@@ty@@>\v}, the \TEX/ string
+For example, if the user writes \.{\v x<@@ty@@><42\v}, the \TEX/ string
 \.{\\hbox\{y\}} eventually becomes part of an |insert| scrap, which is combined
 with a |prelangle| scrap and eventually lost. The best way to work around
 this bug is probably to enclose the \.{@@t...@@>} in \.{@@[...@@]} so that

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2022-06-04 23:42:51 UTC (rev 63487)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2022-06-05 11:14:20 UTC (rev 63488)
@@ -210,6 +210,14 @@
 @z
 
 @x
+the `\.{@\#}' will put extra space after `$\langle\,$Other locals$\,\rangle$'.
+ at y
+the `\.{@\#}' will put extra space after `$\langle\,$Other locals$\,\rangle$'.%
+\cwebfootnote{This extended version of \.{CWEB} acknowledges the \.{-o} option
+to suppress the extra space globally.}
+ at z
+
+ at x
 \section Hypertext and hyperdocumentation.
 @y
 \vfill\eject

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2022-06-04 23:42:51 UTC (rev 63487)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2022-06-05 11:14:20 UTC (rev 63488)
@@ -1133,7 +1133,7 @@
 `\X2:Argument declarations\X' on the same line as
 `$\\{main}(\\{argc},\39\\{argv}{}$)'.
 In this case you should help \.{CWEAVE} by putting `\.{@/}' after
-`\.{main(argc,argv)}'.
+`\.{main(argc,argv)}' (plus `\.{@t\\qquad@>}' for consistent indentation).
 
 \.{CWEAVE} automatically inserts a bit of extra space between declarations
 and the first apparent statement of a block. One way to defeat this



More information about the tex-live-commits mailing list.