% This macro source file is from the four volume series % "TeX in Practice" by Stephan von Bechtolsheim, published % 1993 by Springer-Verlag, New York. % Copyright 1993 Stephan von Bechtolsheim. % No warranty or liability is assumed. % This macro may be copied freely if no fees other than % media cost or shipping charges are charged and as long % as this copyright and the following source code itself % is not changed. Please see the series for further information. % % Version: 1.0 % Date: May 1, 1993 % % % This source code is documented in 29.3.3.1, p. III-511. % Original source in file "io2.TEX", starting line 1192. \wlog{L: "vwrt-mac.tip" ["io2.TEX," l. 1192, p. III-511]}% % This file DOES belong to format "texip." \InputD{verbwr.tip} \InputD{defauarg.tip} \InputD{verb-mac.tip} \catcode`\@ = 11 \newwrite\@VStream \newif\if@VStreamOpen \@VStreamOpenfalse \newcount\@VerbWriteCount \@VerbWriteCount = 0 \def\BeginVerbWrite #1#2{% \global\advance\@VerbWriteCount by 1 \wlog{\string\BeginVerbWrite: [\the\@VerbWriteCount]}% \DefaultArg{\@VerbWriteBaseName}{#1}{\jobname}% \DefaultArg{\@VerbWriteFileExt}{#2}{ver}% \xdef\@VerbWriteFileName{\@VerbWriteBaseName.\@VerbWriteFileExt}% \if@VStreamOpen \errmessage{\string\BeginVerbWrite: ERROR, file still open.}% \fi \OpenVerbWrFile{\@VerbWriteBaseName}{\@VerbWriteFileExt}% {\@VStream}% \global\@VStreamOpentrue \BeginVerbWr{\@VStream}{\EndVerbWrite}% } \def\CloseVerbWriteFile{% \if@VStreamOpen \CloseVerbWrFile{\@VStream}% \global\@VStreamOpenfalse \fi } \def\AppendVerbWrite{% \wlog{\string\AppendVerbWrite: [\the\@VerbWriteCount]}% \if@VStreamOpen \else \errmessage{\string\AppendVerbWrite: no file open.}% \fi \xdef\@VerbWriteFileName{\@VerbWriteBaseName.\@VerbWriteFileExt}% \BeginVerbWr{\@VStream}{\EndVerbWrite}% } \def\VerbAsVerb{% \CloseVerbWriteFile {% \CaretTabtrue \ListVerb{\@VerbWriteFileName}% }% } \def\VerbAsSource{% \CloseVerbWriteFile \input \@VerbWriteFileName \relax } \catcode`\@ = 12