summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/cweb/ctproofmac.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/plain/cweb/ctproofmac.tex')
-rw-r--r--Master/texmf-dist/tex/plain/cweb/ctproofmac.tex22
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/plain/cweb/ctproofmac.tex b/Master/texmf-dist/tex/plain/cweb/ctproofmac.tex
index 29533b84b4d..c0b4fa65cf6 100644
--- a/Master/texmf-dist/tex/plain/cweb/ctproofmac.tex
+++ b/Master/texmf-dist/tex/plain/cweb/ctproofmac.tex
@@ -1,8 +1,8 @@
% standard macros for CWEB listings (in addition to plain.tex)
-% Version 3.6 --- May 2000
+% Version 4.5 --- October 2021
% Modified for proofs in CTWILL
\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CWEB3.6+PROOFS}
+\xdef\fmtversion{\fmtversion+CWEB4.5+PROOFS}
\let\:=\. % preserve a way to get the dot accent
% (all other accents will still work as usual)
@@ -17,6 +17,7 @@
\def\TEX/{\TeX}
\def\CPLUSPLUS/{{\mc C\PP\spacefactor1000}}
\def\Cee{\CEE/} % for backward compatibility
+\def\Cpp{\CPLUSPLUS/} % for backward compatibility
\def\9#1{}
\font\eightrm=cmr8
\let\sc=\eightrm % small caps (NOT a caps-and-small-caps font)
@@ -107,6 +108,7 @@
\newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
\let\yskip=\smallskip
\def\?{\mathrel?}
+\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
\def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}}
\def\lapstar{\rlap{*}}
\def\stsec{\rightskip=0pt % get out of C mode (cf. \B)
@@ -159,15 +161,16 @@
\let\R=\lnot % logical not
% \S is section sign
\def\T#1{\leavevmode % octal, hex or decimal constant
- \hbox{$\def\?{\kern.2em}%
- \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant
+ \hbox{$\def\?{\kern.2em}%$%
+ \let\ \, % C++ digit separator becomes a little white space
+ \def\$##1{\egroup_{\rm##1}\bgroup}% suffix to constant
\def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
- \let\~=\oct \let\^=\hex {#1}$}}
+ \let\~=\oct \let\^=\hex \let\\=\bin {#1}$}}%$%
\def\U{\note{This code is used in section}} % xref for use of a section
\def\Us{\note{This code is used in sections}} % xref for uses of a section
\let\V=\lor % logical or
\let\W=\land % logical and
-\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name
+\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name
\XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em#1}$\,\rangle$\XX}
\def\Y{\par\yskip}
\let\Z=\le
@@ -176,11 +179,13 @@
%\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
%\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
-\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style
+\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}} % CWEB style
\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
+\def\bin{\hbox{$^{\scriptscriptstyle b}$\tt\aftergroup}} % new in CWEB 4.3
\def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule
\hbox{\strut\kern2pt\.{#1}\kern2pt}}
\hrule}\vrule\kern2pt}} % verbatim string
+\def\p#1{\cdot 2^{#1}} % power of two (hex exponent)
\def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
\newif\ifon \newif\iftitle \newif\ifpagesaved
@@ -339,9 +344,6 @@
\def\printtwodigits{\advance\twodigits100
\expandafter\gobbleone\number\twodigits
\advance\twodigits-100 }
-\def\TeX{{\ifmmode\it\fi
- \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
\def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
\let\startsection=\stsec\stsec}}
% say `\datethis' in limbo, to get your listing timestamped before section 1