% cwebprog: Support for inclusion of CWEB programs in LaTeX documents % $Id: cwebprog.sty,v 0.2 1997/02/21 05:26:02 tjchol01 Exp $ % ------------------------------------------------------------------------- \begingroup \ProvidesPackage{cwebprog} \NeedsTeXFormat{LaTeX2e}[1994/12/01] % ------------------------------------------------------------------------- \newif\if@cwebprog@nonumbers@ \@cwebprog@nonumbers@false \DeclareOption{nonumbers}{\@cwebprog@nonumbers@true} \DeclareOption*{\typeout{Ignored unknown option \CurrentOption.}} \ProcessOptions % ------------------------------------------------------------------------- \ifx \CatEscape\undefined \chardef\CatEscape=0 \chardef\CatOpen=1 \chardef\CatClose=2 \chardef\CatIgnore=9 \chardef\CatLetter=11 \chardef\CatOther=12 \chardef\CatActive=13 % is defined in Plain already \chardef\CatUsCode=\catcode`\_ \fi \catcode`\_=\CatLetter % top level macro file \let\cweb_warning=\ClassWarningNoLine \newif\if@cweb@suppress@changehints@ \@cweb@suppress@changehints@true \newif\if@cweb@suppress@unchanged@ \@cweb@suppress@unchanged@false \newif\if@cweb@suppress@format@ \@cweb@suppress@format@false \def\cweb@structure{1} % flat \let\my_save_section=\section \input{cwebbase} \let\section=\my_save_section \catcode`\_=\CatUsCode \def\CwebRankNoEject{0} \if@cwebprog@nonumbers@ \let\thechunk=\relax \let\cwbb@refchunk=\relax \let\CwebRefNumber=\@gobble \def\CwebCrossRef#1#2.{}% \fi \ifx\cwebproghook\undefined \def\cwebproghook{} \fi \newcommand{\cwebprog}[1]{% {\let\addtocontents=\@gobbletwo \let\inx=\relax \let\fin=\relax \let\con=\relax \let\end=\endinput % ignore some extra commands to allow processing of CWEB examples \let\noinx=\relax \let\nosecs=\relax \let\nocon=\relax \let\datethis=\relax \let\datecontentspage=\relax % adapted from cwebmac \def\CEE/{\textsc{c}\@}% \def\UNIX/{\textsc{u\kern-.05emnix}\@}% \def\TEX/{\TeX}% \def\CPLUSPLUS/{\textsc{c\PP}\@}% \def\Cee{\CEE/} % for backward compatibility \def\9#1{}% % load cweaved file \cwebproghook \input{#1}}% } \endinput %------------------------------------------------------------------------- % $Log: cwebprog.sty,v $ % Revision 0.2 1997/02/21 05:26:02 tjchol01 % Let \end to \endinput. % % Revision 0.1 1997/02/17 00:34:25 tjchol01 % Initial revision %------------------------------------------------------------------------- % Local Variables: % TeX-master: "uofl-example.tex" % End: