diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2024-03-10 17:04:36 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2024-03-10 17:04:36 +0000 |
commit | 619fff43574d0e7edd7dd2f514562f1f5003d565 (patch) | |
tree | 3290ba8be1989662317d30d42bd73b659bc77cd8 /Build/source/texk | |
parent | 8e0cf31817486d0d0f63e381a3a9758c86a0bec3 (diff) |
[CWEB] Add option '-F' for CWEAVE/CTWILL.
This alternative layout places the first line of a 'compound statement',
a.k.a. 'block', next to the opening curly brace.
Control statements like 'if', 'for', 'while', or 'switch' still appear
on a new line, in order to preserve visual control flow.
git-svn-id: svn://tug.org/texlive/trunk@70550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ChangeLog | 16 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctwill-hint.ch | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctwill-mini.ch | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweave.w | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweb.1 | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cwebman-w2c.ch | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cwebman.tex | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/po/de/web2c-help.po | 86 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/po/web2c-help.pot | 82 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/prod-cweave.w | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/prod-twill.w | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/prod.w | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/help.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/man/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/man/ctwill.man | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/man/cweb.man | 8 |
17 files changed, 177 insertions, 95 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 33fe6d3a32f..10c087bbe18 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,7 @@ +2024-03-10 Andreas Scherer <https://ascherer.github.io> + + * help.h: Add new option '-F' for CWEAVE/CTWILL. + 2024-02-28 Akira Kakuto <kakuto@jcom.zaq.ne.jp> * eptexdir/unbalanced-braces-eptex.ch: avoid crashing with devious diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 08852ec890a..1cab1269526 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,6 +1,20 @@ +2024-03-10 Andreas Scherer <https://ascherer.github.io> + + * ctwill-hint.ch, + * ctwill-mini.ch, + * cweave.w, + * cweb.1, + * cwebman-w2c.ch, + * cwebman.tex, + * po/de/web2c-help.po, + * po/web2c-help.pot, + * prod-cweave.w, + * prod-twill.w, + * prod.w: Add new option '-F' for CWEAVE/CTWILL. + 2024-02-14 Andreas Scherer <https://ascherer.github.io> - * cwtwill-proofsort: In-place invocation. + * ctwill-proofsort: In-place invocation. 2024-01-24 Andreas Scherer <https://ascherer.github.io> diff --git a/Build/source/texk/web2c/cwebdir/ctwill-hint.ch b/Build/source/texk/web2c/cwebdir/ctwill-hint.ch index f78891cd858..1fcf2fcaf23 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-hint.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-hint.ch @@ -533,10 +533,12 @@ Section 155. @x @d force_lines flags['f'] /* should each statement be on its own line? */ +@d force_first flags['F'] /* should compound statement start on new line? */ @y @d force_lines flags['f'] /* should each statement be on its own line? */ -@-force_lines@> -@$force_lines {CTWILL}155 =\\{flags}[\.{'f'}]@> +@-force_lines@> @$force_lines {CTWILL}155 =\\{flags}[\.{'f'}]@> +@d force_first flags['F'] /* should compound statement start on new line? */ +@-force_first@> @$force_first {CTWILL}155 =\\{flags}[\.{'F'}]@> @z Section 185. diff --git a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch index 69eb9623427..b6412975911 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch @@ -1352,10 +1352,17 @@ Section 170. @x @d force_lines flags['f'] /* should each statement be on its own line? */ +@d force_first flags['F'] /* should compound statement start on new line? */ + +@<Set init...@>= +force_lines=force_first=true; @y @d force_lines flags['f'] /* should each statement be on its own line? */ -@-force_lines@> -@$force_lines {CTWILL}170 =\\{flags}[\.{'f'}]@> +@-force_lines@> @$force_lines {CTWILL}170 =\\{flags}[\.{'f'}]@> +@d force_first flags['F'] /* should compound statement start on new line? */ +@-force_first@> @$force_first {CTWILL}170 =\\{flags}[\.{'F'}]@> + +@<Set init...@>=@+force_lines=force_first=true; @z Section 173. diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w index 9b07cf791fe..808d46cc7eb 100644 --- a/Build/source/texk/web2c/cwebdir/cweave.w +++ b/Build/source/texk/web2c/cwebdir/cweave.w @@ -2855,7 +2855,8 @@ if (cat1==rbrace) { reduce(pp,2,stmt,-1,54); } else if ((cat1==stmt||cat1==decl||cat1==function) && cat2==rbrace) { - big_app(force); big_app1(pp); big_app(indent); big_app(force); + big_app(force); big_app1(pp); big_app(indent); + big_app(force_first ? force : break_space); big_app1(pp+1); big_app(force); big_app(backup); big_app1(pp+2); big_app(outdent); big_app(force); reduce(pp,3,stmt,-1,55); } @@ -2948,12 +2949,15 @@ else if (cat1==stmt||cat1==decl||cat1==function) { else if (cat1==rbrace) reduce(pp,0,decl,-1,156); @ The user can decide at run-time whether short statements should be -grouped together on the same line. +grouped together on the same line. Another form of compaction places +the first line of a `compound statement', a.k.a.\ `block', next to +the opening curly brace. @d force_lines flags['f'] /* should each statement be on its own line? */ +@d force_first flags['F'] /* should compound statement start on new line? */ @<Set init...@>= -force_lines=true; +force_lines=force_first=true; @ @<Cases for |stmt|@>= if (cat1==stmt || cat1==decl || cat1==function) { diff --git a/Build/source/texk/web2c/cwebdir/cweb.1 b/Build/source/texk/web2c/cwebdir/cweb.1 index 192c7c9597e..70ed7ad0305 100644 --- a/Build/source/texk/web2c/cwebdir/cweb.1 +++ b/Build/source/texk/web2c/cwebdir/cweb.1 @@ -1,4 +1,4 @@ -.TH CWEB 1 2023-Aug-20 +.TH CWEB 1 2024-Mar-09 . .SH NAME ctangle, cweave \- translate CWEB to C and/or TeX @@ -14,7 +14,7 @@ ctangle, cweave \- translate CWEB to C and/or TeX .br .B cweave [ -.B \-befhpx +.B \-befFhpx ] [ .B +st ] webfile[.w] [{changefile[.ch]|-} [outputfile[.tex]]] @@ -86,11 +86,14 @@ only: .B +k means keep '-separators in numeric literals in the C/C++\ output. .PP -There are four other options applicable to +There are five other options applicable to .I cweave only: .B \-f means do not force a newline after every statement in the formatted output. +.B \-F +means do not force a compound statement to start on a new line in the +formatted output. .B \-e inhibits the enclosure of C\ material formatted by .I cweave diff --git a/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch b/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch index 78d1e66f33a..1dc3b30b340 100644 --- a/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch @@ -185,7 +185,7 @@ argument to switch between different user languages and macro packages. (Off by default.) (Has no effect on \.{CTANGLE}.) \hfil\vskip\normallineskip \option o Separate declarations and the first statement in a function block. -(On by default.) (Has no effect on \.{CTANGLE}.) +(On by default.) (\.{CWEAVE} only.) \hfil\vskip\normallineskip \option u Transliteration of UTF-8 multi-byte characters. (Off by default.) (Has no effect on \.{CWEAVE}.)} @@ -194,6 +194,14 @@ argument to switch between different user languages and macro packages. @z @x +\option x Include indexes and a table of contents in the \TEX/ file +output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.) +@y +\option x Include indexes and a table of contents in the \TEX/ file +output by \.{CWEAVE}. (On by default.) (\.{CWEAVE} only.) +@z + +@x Sometimes things don't work as smoothly, and you get a bunch of @y \pdffalse\acrohintfalse diff --git a/Build/source/texk/web2c/cwebdir/cwebman.tex b/Build/source/texk/web2c/cwebdir/cwebman.tex index 7a906cc954a..c75177e83a7 100644 --- a/Build/source/texk/web2c/cwebdir/cwebman.tex +++ b/Build/source/texk/web2c/cwebdir/cwebman.tex @@ -1048,6 +1048,10 @@ brackets \.{\\PB\{...\}}, so that special hooks can be used. by \.{CWEAVE}. (On by default; \.{-f} saves paper but looks less \CEE/-like to some people.) (Has no effect on \.{CTANGLE}.) +\option F Force the first statement in a `compound statement' (a.k.a.\ +`block') on a line of its own. (On by default; some people prefer the +\.{-F} layout.) (Has no effect on \.{CTANGLE}.) + \option h Print a happy message at the conclusion of a successful run. (On by default.) diff --git a/Build/source/texk/web2c/cwebdir/po/de/web2c-help.po b/Build/source/texk/web2c/cwebdir/po/de/web2c-help.po index 2b230af81e3..139d3369499 100644 --- a/Build/source/texk/web2c/cwebdir/po/de/web2c-help.po +++ b/Build/source/texk/web2c/cwebdir/po/de/web2c-help.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2021\n" +"Project-Id-Version: CWEBbin 2024\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-27 09:00+0200\n" -"PO-Revision-Date: 2021-07-27 09:00+0200\n" +"POT-Creation-Date: 2024-03-10 16:35+0100\n" +"PO-Revision-Date: 2024-03-10 16:35+0100\n" "Last-Translator: Andreas Scherer <andreas_github@freenet.de>\n" "Language-Team: German\n" "Language: de\n" @@ -27,7 +27,7 @@ msgstr "" msgid " Tangle WEBFILE with CHANGEFILE into a C/C++ program." msgstr " Verknüpfe WEBFILE mit CHANGEFILE in ein C/C++ Programm." -#: help.h:54 help.h:74 help.h:100 +#: help.h:54 help.h:77 help.h:106 msgid " Default CHANGEFILE is /dev/null;" msgstr " Vorgabe für CHANGEFILE ist /dev/null;" @@ -35,114 +35,122 @@ msgstr " Vorgabe für CHANGEFILE ist /dev/null;" msgid " C output goes to the basename of WEBFILE extended with `.c'" msgstr " C Ausgabe geht in den Hauptnamen des WEBFILE erweitert um `.c'," -#: help.h:56 help.h:76 help.h:102 +#: help.h:56 help.h:79 help.h:108 msgid " unless otherwise specified by OUTFILE; in this case, '-' specifies" msgstr " sofern nicht ein anderes OUTFILE angegeben ist; in diesem Fall" -#: help.h:57 help.h:77 help.h:103 +#: help.h:57 help.h:80 help.h:109 msgid " a null CHANGEFILE." msgstr " bezeichnet '-' ein leeres CHANGEFILE." -#: help.h:59 help.h:79 help.h:105 +#: help.h:59 help.h:82 help.h:111 msgid "+b print banner line on terminal" msgstr "+b schreibe die Startmeldung" -#: help.h:64 help.h:85 help.h:112 -msgid "-dN set 'kpathsea_debug' to N (0..127)" -msgstr "-dN setze 'kpathsea_debug' auf N (0..127)" - -#: help.h:60 help.h:80 help.h:106 +#: help.h:60 help.h:83 help.h:112 msgid "+h print success message on completion" msgstr "+h schreibe die Erfolgsmeldung am Ende" -#: help.h:66 -msgid "+k keep separators in numeric literals in the output" -msgstr "+k konserviere '-Trenner in Zahlen in der Ausgabe" - -#: help.h:61 help.h:81 help.h:107 +#: help.h:61 help.h:84 help.h:113 msgid "+p print progress report messages" msgstr "+p schreibe die Fortschrittsmeldungen" -#: help.h:62 help.h:82 help.h:108 +#: help.h:62 help.h:85 help.h:114 msgid "+/-q shortcut for '-bhp'; also '--quiet' (default)" msgstr "+/-q Kurzform für '-bhp'; auch '--quiet' (Vorgabe)" -#: help.h:63 help.h:83 help.h:109 +#: help.h:63 help.h:86 help.h:115 msgid "+/-v shortcut for '+bhp'; also '--verbose'" msgstr "+/-v Kurzform für '+bhp'; auch '--verbose'" -#: help.h:64 help.h:85 help.h:112 +#: help.h:64 help.h:87 help.h:116 msgid "+c check temporary output for changes" msgstr "+c prüfe temporäre Ausgabe auf Änderungen" -#: help.h:66 help.h:93 help.h:121 +#: help.h:65 help.h:88 help.h:117 +msgid "-dN set 'kpathsea_debug' to N (0..127)" +msgstr "-dN setze 'kpathsea_debug' auf N (0..127)" + +#: help.h:66 +msgid "+k keep separators in numeric literals in the output" +msgstr "+k konserviere '-Trenner in Zahlen in der Ausgabe" + +#: help.h:67 help.h:96 help.h:126 msgid "+s print usage statistics" msgstr "+s melde die Verbrauchsstatistik" -#: help.h:95 help.h:124 -msgid "+t treat 'typename' in a template like 'typedef'" -msgstr "+t behandle 'typename' in Templates wie 'typedef'" +#: help.h:68 +msgid "+u transliterate UTF-8 characters in C code" +msgstr "+u ersetze UTF-8 Zeichen in C-Code" -#: help.h:66 help.h:92 help.h:119 +#: help.h:69 help.h:98 help.h:128 msgid "--help display this help and exit" msgstr "--help zeige diesen Hilfetext und ende" -#: help.h:67 help.h:93 help.h:120 +#: help.h:70 help.h:99 help.h:129 msgid "--version output version information and exit" msgstr "--version zeige die Versionsinformation und ende" -#: help.h:72 +#: help.h:75 msgid "" "Usage: cweave [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" msgstr "" "Aufruf: cweave [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" -#: help.h:73 +#: help.h:76 help.h:638 msgid " Weave WEBFILE with CHANGEFILE into a TeX document." msgstr " Verwebe WEBFILE mit CHANGEFILE in ein TeX Dokument." -#: help.h:75 help.h:101 +#: help.h:78 help.h:107 msgid " TeX output goes to the basename of WEBFILE extended with `.tex'" msgstr " TeX Ausgabe geht in den Hauptnamen des WEBFILE erweitert um `.tex'," -#: help.h:84 help.h:110 +#: help.h:89 help.h:118 msgid "-e do not enclose C material in \\PB{...}" msgstr "-e schließe C Material nicht in \\PB{...} ein" -#: help.h:85 help.h:111 +#: help.h:90 help.h:119 msgid "-f do not force a newline after every C statement in output" msgstr "-f erzwinge keinen Zeilenumbruch nach jedem C Statement" -#: help.h:86 help.h:112 +#: help.h:91 help.h:120 +msgid "-F do not force a compound statement to start on a new line" +msgstr "-F erzwinge keine neue Zeile am Beginn eines Code-Blocks" + +#: help.h:92 help.h:121 msgid "-i suppress indentation of parameter declarations" msgstr "-i unterdrücke die Einrückung von Parameterdeklarationen" -#: help.h:87 help.h:113 +#: help.h:93 help.h:122 msgid "-o suppress separation of declarations and statements" msgstr "-o unterdrücke die Trennung von Deklarationen und Statements" -#: help.h:88 help.h:114 +#: help.h:94 help.h:123 msgid "-x omit indices, section names, table of contents" msgstr "-x verzichte auf Indexe, Abschnittnamen und Inhaltsverzeichnis" -#: help.h:89 +#: help.h:95 msgid "+lX use macros for language X as of Xcwebmac.tex" msgstr "+lX benutze Macros für Sprache X aus Xcwebmac.tex" -#: help.h:98 +#: help.h:97 help.h:127 +msgid "+t treat 'typename' in a template like 'typedef'" +msgstr "+t behandle 'typename' in Templates wie 'typedef'" + +#: help.h:104 msgid "" "Usage: ctwill [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" msgstr "" "Aufruf: ctwill [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" -#: help.h:99 +#: help.h:105 help.h:655 msgid " Weave WEBFILE with CHANGEFILE into a TeX document with mini-indexes." msgstr " Verwebe WEBFILE mit CHANGEFILE in ein TeX Dokument mit Miniindexen." -#: help.h:115 +#: help.h:124 msgid "+P \\input ctproofmac.tex instead of ctwimac.tex" msgstr "+P \\input ctproofmac.tex an Stelle von ctwimac.tex" -#: help.h:116 +#: help.h:125 msgid "+/-lX use macros for language X as of Xct{wi|proof}mac.tex" msgstr "+/-lX benutze Macros für Sprache X aus Xct{wi|proof}mac.tex" diff --git a/Build/source/texk/web2c/cwebdir/po/web2c-help.pot b/Build/source/texk/web2c/cwebdir/po/web2c-help.pot index 03e347c38ee..ba493504a29 100644 --- a/Build/source/texk/web2c/cwebdir/po/web2c-help.pot +++ b/Build/source/texk/web2c/cwebdir/po/web2c-help.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: CWEBbin 2021\n" +"Project-Id-Version: CWEBbin 2024\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-27 09:00+0200\n" +"POT-Creation-Date: 2024-03-10 16:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -26,7 +26,7 @@ msgstr "" msgid " Tangle WEBFILE with CHANGEFILE into a C/C++ program." msgstr "" -#: help.h:54 help.h:74 help.h:100 +#: help.h:54 help.h:77 help.h:106 msgid " Default CHANGEFILE is /dev/null;" msgstr "" @@ -34,112 +34,120 @@ msgstr "" msgid " C output goes to the basename of WEBFILE extended with `.c'" msgstr "" -#: help.h:56 help.h:76 help.h:102 +#: help.h:56 help.h:79 help.h:108 msgid " unless otherwise specified by OUTFILE; in this case, '-' specifies" msgstr "" -#: help.h:57 help.h:77 help.h:103 +#: help.h:57 help.h:80 help.h:109 msgid " a null CHANGEFILE." msgstr "" -#: help.h:59 help.h:79 help.h:105 +#: help.h:59 help.h:82 help.h:111 msgid "+b print banner line on terminal" msgstr "" -#: help.h:64 help.h:85 help.h:112 -msgid "-dN set 'kpathsea_debug' to N (0..127)" -msgstr "" - -#: help.h:60 help.h:80 help.h:106 +#: help.h:60 help.h:83 help.h:112 msgid "+h print success message on completion" msgstr "" -#: help.h:66 -msgid "+k keep separators in numeric literals in the output" -msgstr "" - -#: help.h:61 help.h:81 help.h:107 +#: help.h:61 help.h:84 help.h:113 msgid "+p print progress report messages" msgstr "" -#: help.h:62 help.h:82 help.h:108 +#: help.h:62 help.h:85 help.h:114 msgid "+/-q shortcut for '-bhp'; also '--quiet' (default)" msgstr "" -#: help.h:63 help.h:83 help.h:109 +#: help.h:63 help.h:86 help.h:115 msgid "+/-v shortcut for '+bhp'; also '--verbose'" msgstr "" -#: help.h:64 help.h:85 help.h:112 +#: help.h:64 help.h:87 help.h:116 msgid "+c check temporary output for changes" msgstr "" -#: help.h:66 help.h:93 help.h:121 +#: help.h:65 help.h:88 help.h:117 +msgid "-dN set 'kpathsea_debug' to N (0..127)" +msgstr "" + +#: help.h:66 +msgid "+k keep separators in numeric literals in the output" +msgstr "" + +#: help.h:67 help.h:96 help.h:126 msgid "+s print usage statistics" msgstr "" -#: help.h:95 help.h:124 -msgid "+t treat 'typename' in a template like 'typedef'" +#: help.h:68 +msgid "+u transliterate UTF-8 characters in C code" msgstr "" -#: help.h:66 help.h:92 help.h:119 +#: help.h:69 help.h:98 help.h:128 msgid "--help display this help and exit" msgstr "" -#: help.h:67 help.h:93 help.h:120 +#: help.h:70 help.h:99 help.h:129 msgid "--version output version information and exit" msgstr "" -#: help.h:72 +#: help.h:75 msgid "" "Usage: cweave [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" msgstr "" -#: help.h:73 +#: help.h:76 help.h:638 msgid " Weave WEBFILE with CHANGEFILE into a TeX document." msgstr "" -#: help.h:75 help.h:101 +#: help.h:78 help.h:107 msgid " TeX output goes to the basename of WEBFILE extended with `.tex'" msgstr "" -#: help.h:84 help.h:110 +#: help.h:89 help.h:118 msgid "-e do not enclose C material in \\PB{...}" msgstr "" -#: help.h:85 help.h:111 +#: help.h:90 help.h:119 msgid "-f do not force a newline after every C statement in output" msgstr "" -#: help.h:86 help.h:112 +#: help.h:91 help.h:120 +msgid "-F do not force a compound statement to start on a new line" +msgstr "" + +#: help.h:92 help.h:121 msgid "-i suppress indentation of parameter declarations" msgstr "" -#: help.h:87 help.h:113 +#: help.h:93 help.h:122 msgid "-o suppress separation of declarations and statements" msgstr "" -#: help.h:88 help.h:114 +#: help.h:94 help.h:123 msgid "-x omit indices, section names, table of contents" msgstr "" -#: help.h:89 +#: help.h:95 msgid "+lX use macros for language X as of Xcwebmac.tex" msgstr "" -#: help.h:98 +#: help.h:97 help.h:127 +msgid "+t treat 'typename' in a template like 'typedef'" +msgstr "" + +#: help.h:104 msgid "" "Usage: ctwill [OPTIONS] WEBFILE[.w] [{CHANGEFILE[.ch]|-} [OUTFILE[.tex]]]" msgstr "" -#: help.h:99 +#: help.h:105 help.h:655 msgid " Weave WEBFILE with CHANGEFILE into a TeX document with mini-indexes." msgstr "" -#: help.h:115 +#: help.h:124 msgid "+P \\input ctproofmac.tex instead of ctwimac.tex" msgstr "" -#: help.h:116 +#: help.h:125 msgid "+/-lX use macros for language X as of Xct{wi|proof}mac.tex" msgstr "" diff --git a/Build/source/texk/web2c/cwebdir/prod-cweave.w b/Build/source/texk/web2c/cwebdir/prod-cweave.w index 9690a468d9b..6c75760fa2f 100644 --- a/Build/source/texk/web2c/cwebdir/prod-cweave.w +++ b/Build/source/texk/web2c/cwebdir/prod-cweave.w @@ -154,7 +154,7 @@ We use \\{in}, \\{out}, \\{back}, \\{bsp}, and \\{din} as shorthands for \hfill $F\,|big_force|\,$\altt $S$ $D$ $F$ \unskip & outer block\cr \+& |lbrace| |rbrace| & |stmt| \hfill $L\.{\\,}R$ & empty statement\cr \advance\midcol35pt -\+& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill +\+\dagit& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill $|force|\,L\,\\{in}\,|force|\,S\, |force|\,\\{back}\,R\,\\{out}\,|force|$ & compound statement\cr \advance\midcol-20pt @@ -341,6 +341,9 @@ Rule 41: The |big_force| becomes |force| if \.{CWEAVE} has been invoked with the Rule 48: The |exp| or |int_like| must not be immediately followed by |base|. +Rule 55: The second |force| becomes \\{bsp} if \.{CWEAVE} has been invoked +with the \.{-F} option. + Rule 69: The $|do|\ldots|while|$ loop is wrapped in |force| if \.{CWEAVE} is invoked with the \.{-f} option. Rule 76: The |force| in the |stmt| line becomes \\{bsp} if \.{CWEAVE} has diff --git a/Build/source/texk/web2c/cwebdir/prod-twill.w b/Build/source/texk/web2c/cwebdir/prod-twill.w index 1805e52a3ab..63ebdb4893d 100644 --- a/Build/source/texk/web2c/cwebdir/prod-twill.w +++ b/Build/source/texk/web2c/cwebdir/prod-twill.w @@ -154,7 +154,7 @@ We use \\{in}, \\{out}, \\{back}, \\{bsp}, and \\{din} as shorthands for \hfill $F\,|big_force|\,$\altt $S$ $D$ $F$ \unskip & outer block\cr \+& |lbrace| |rbrace| & |stmt| \hfill $L\.{\\,}R$ & empty statement\cr \advance\midcol35pt -\+& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill +\+\dagit& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill $|force|\,L\,\\{in}\,|force|\,S\, |force|\,\\{back}\,R\,\\{out}\,|force|$ & compound statement\cr \advance\midcol-20pt @@ -336,6 +336,9 @@ Rule 41: The |big_force| becomes |force| if \.{CWEAVE} has been invoked with the Rule 48: The |exp| or |int_like| must not be immediately followed by |base|. +Rule 55: The second |force| becomes \\{bsp} if \.{CWEAVE} has been invoked +with the \.{-F} option. + Rule 69: The $|do|\ldots|while|$ loop is wrapped in |force| if \.{CWEAVE} is invoked with the \.{-f} option. Rule 76: The |force| in the |stmt| line becomes \\{bsp} if \.{CWEAVE} has diff --git a/Build/source/texk/web2c/cwebdir/prod.w b/Build/source/texk/web2c/cwebdir/prod.w index 7612ca6e8eb..b0da3ddce5f 100644 --- a/Build/source/texk/web2c/cwebdir/prod.w +++ b/Build/source/texk/web2c/cwebdir/prod.w @@ -154,7 +154,7 @@ We use \\{in}, \\{out}, \\{back}, \\{bsp}, and \\{din} as shorthands for \hfill $F\,|big_force|\,$\altt $S$ $D$ $F$ \unskip & outer block\cr \+& |lbrace| |rbrace| & |stmt| \hfill $L\.{\\,}R$ & empty statement\cr \advance\midcol35pt -\+& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill +\+\dagit& |lbrace| \altt|stmt| |decl| |function| |rbrace| & |stmt| \hfill $|force|\,L\,\\{in}\,|force|\,S\, |force|\,\\{back}\,R\,\\{out}\,|force|$ & compound statement\cr \advance\midcol-20pt @@ -334,6 +334,9 @@ Rules 35, 117: The |exp| must not be immediately followed by |lpar|, |lbrack|, Rule 48: The |exp| or |int_like| must not be immediately followed by |base|. +Rule 55: The second |force| becomes \\{bsp} if \.{CWEAVE} has been invoked +with the \.{-F} option. + Rule 69: The $|do|\ldots|while|$ loop is wrapped in |force| if \.{CWEAVE} is invoked with the \.{-f} option. Rule 76: The |force| in the |stmt| line becomes \\{bsp} if \.{CWEAVE} has diff --git a/Build/source/texk/web2c/help.h b/Build/source/texk/web2c/help.h index d402b363a9b..37f64b4e249 100644 --- a/Build/source/texk/web2c/help.h +++ b/Build/source/texk/web2c/help.h @@ -88,6 +88,7 @@ const_string CWEAVEHELP[] = { "-dN set 'kpathsea_debug' to N (0..127)", "-e do not enclose C material in \\PB{...}", "-f do not force a newline after every C statement in output", + "-F do not force a compound statement to start on a new line", "-i suppress indentation of parameter declarations", "-o suppress separation of declarations and statements", "-x omit indices, section names, table of contents", @@ -116,6 +117,7 @@ const_string CTWILLHELP[] = { "-dN set 'kpathsea_debug' to N (0..127)", "-e do not enclose C material in \\PB{...}", "-f do not force a newline after every C statement in output", + "-F do not force a compound statement to start on a new line", "-i suppress indentation of parameter declarations", "-o suppress separation of declarations and statements", "-x omit indices, section names, table of contents", diff --git a/Build/source/texk/web2c/man/ChangeLog b/Build/source/texk/web2c/man/ChangeLog index 4b1f6a1d88d..58de3f90d29 100644 --- a/Build/source/texk/web2c/man/ChangeLog +++ b/Build/source/texk/web2c/man/ChangeLog @@ -1,3 +1,8 @@ +2024-03-10 Andreas Scherer <https://ascherer.github.io> + + * ctwill.man, + * cweb.man: Add new option '-F' for CWEAVE/CTWILL. + 2024-03-02 Bjarni Ingi Gislason <bjarniig@simnet.is> * pdftex.man: whitespace, \-, etc. updates. diff --git a/Build/source/texk/web2c/man/ctwill.man b/Build/source/texk/web2c/man/ctwill.man index f1826cf561b..50437193073 100644 --- a/Build/source/texk/web2c/man/ctwill.man +++ b/Build/source/texk/web2c/man/ctwill.man @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc .\" -.TH "CTWILL" "1" "February 16, 2024" "Web2c @VERSION@" "General Commands Manual" +.TH "CTWILL" "1" "March 10, 2024" "Web2c @VERSION@" "General Commands Manual" .SH NAME ctwill, ctwill-proofsort, ctwill-refsort, ctwill-twinx \- translate CWEB to TeX with mini-indexes @@ -176,6 +176,8 @@ leave out the \f[B]happy message\f[R] (\f[B]\-h\f[R]). \f[B]\-f\f[R]: do not force a newline after every C/C++\ statement in output .IP \[bu] 2 +\f[B]\-F\f[R]: do not force a compound statement to start on a new line +.IP \[bu] 2 \f[B]\-i\f[R]: suppress indentation of parameter declarations .IP \[bu] 2 \f[B]\-o\f[R]: suppress separation of declarations and statements diff --git a/Build/source/texk/web2c/man/cweb.man b/Build/source/texk/web2c/man/cweb.man index ab0b286e25f..a028912b99e 100644 --- a/Build/source/texk/web2c/man/cweb.man +++ b/Build/source/texk/web2c/man/cweb.man @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc .\" -.TH "CWEB" "1" "February 21, 2024" "Web2c @VERSION@" "General Commands Manual" +.TH "CWEB" "1" "Marxch 10, 2024" "Web2c @VERSION@" "General Commands Manual" .SH NAME ctangle, cweave \- translate CWEB to C/C++ and/or TeX .SH SYNOPSIS @@ -97,13 +97,13 @@ The first batch of options are common to both \f[B]ctangle\f[R] and .IP \[bu] 2 \f[B]\-\-version\f[R]: output version information and exit .PP -There is one other option applicable to \f[B]ctangle\f[R] only: +There are two other options applicable to \f[B]ctangle\f[R] only: .IP \[bu] 2 \f[B]+k\f[R]: keep separators in numeric literals in the output .IP \[bu] 2 \f[B]+u\f[R]: transliterate UTF-8 characters in C code .PP -There are seven other options applicable to \f[B]cweave\f[R] only: +There are eight other options applicable to \f[B]cweave\f[R] only: .IP \[bu] 2 \f[B]\-e\f[R]: do not enclose C/C++\ material in \f[B]\[rs]PB{\&...}\f[R] @@ -111,6 +111,8 @@ There are seven other options applicable to \f[B]cweave\f[R] only: \f[B]\-f\f[R]: do not force a newline after every C/C++\ statement in output .IP \[bu] 2 +\f[B]\-F\f[R]: do not force a compound statement to start on a new line +.IP \[bu] 2 \f[B]\-i\f[R]: suppress indentation of parameter declarations .IP \[bu] 2 \f[B]\-o\f[R]: suppress separation of declarations and statements |