diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2022-05-28 10:31:03 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2022-05-28 10:31:03 +0000 |
commit | 4a37668c3f5eeaf3e41404606db647f8b8429748 (patch) | |
tree | dff5a3915ab9d0b0a2c05b6c0f0e3dbf3bf3d717 /Build/source/texk/web2c/cwebdir/cweave.w | |
parent | dd599f8b41324853f9a447cbd63041a13b7cd54f (diff) |
[CWEB] Improce productions 33, 118, and 153.
Rule 33: Comma-separated lists of variables like 'int x,y,z;' had a
full blank space (see, e.g., the SGB book), in stark contrast to the
resuts of rules 4 and 14.
Rule 118: Multiple type definitions were separated by _two_ spaces,
because the type after the comma brings its own space from rule 117.
This might look better with 'app(opt); app('9');' after the comma.
Rule 153: Long lines with multiple typename declarations now have the
chance to be broken after the comma.
git-svn-id: svn://tug.org/texlive/trunk@63419 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/cweave.w')
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweave.w | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w index 24926f61310..738f075e9f4 100644 --- a/Build/source/texk/web2c/cwebdir/cweave.w +++ b/Build/source/texk/web2c/cwebdir/cweave.w @@ -2748,7 +2748,7 @@ else if (cat1==colcol) squash(pp,2,colcol,-1,32); @ @<Cases for |decl_head|@>= if (cat1==comma) { - big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33); + big_app2(pp); app(opt); app('9'); reduce(pp,2,decl_head,-1,33); } else if (cat1==ubinop) { big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,decl_head,-1,34); @@ -3011,7 +3011,9 @@ else if ((cat1==struct_like) @| && (cat3==comma || cat3==prerangle)) { make_underlined(pp+2); if (reserve_typenames) make_reserved(pp+2); big_app2(pp); big_app(' '); big_app2(pp+2); - if (cat3==comma) reduce(pp,4,langle,0,153); + if (cat3==comma) { + app(opt); app('9'); reduce(pp,4,langle,0,153); + } else reduce(pp,4,cast,-1,154); } @@ -3098,9 +3100,7 @@ else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) { make_underlined(pp+1); make_reserved(pp+1); big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,117); } -else if (cat1==comma) { - big_app2(pp); big_app(' '); reduce(pp,2,typedef_like,0,118); -} +else if (cat1==comma) squash(pp,2,typedef_like,0,118); else if (cat1==semi) squash(pp,2,decl,-1,119); else if (cat1==ubinop && (cat2==ubinop || cat2==cast)) { big_app('{'); big_app1_insert(pp+1,'}'); reduce(pp+1,2,cat2,0,120); |