%% %% This is file `mailing.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% mailing.dtx (with options: `package') %% %% %% This file is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. %% %% IMPORTANT NOTICE: %% %% Copyright (C) 1994,1995 Johannes Braams %% All rights reserved. %% For additional copyright information see further down in this file. %% %% Permission is granted to distributed verbatim copies of this file. %% %% No other permissions to copy or distribute this file in any form %% are granted and in particular no permission to modify its contents. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mailing} [1994/09/07 v1.0a Send letters to multiple addresses] \newcommand{\addressfile}[1]{% \def\M@filename{#1}} \long\def\mailingtext#1{\global\mailing@text={#1}} \def\makemailing{% \M@openadrfile \loop \read@info \if@notready \begin{letter}{\M@toname\\\M@toaddress}% \opening{\M@opening}% \vskip\baselineskip \the\mailing@text \end{letter} \fi \if@notready \repeat} \newread\M@adrfile \newtoks\mailing@text \newif\if@notready \newif\if@notemptyoreof \def\M@openadrfile{% \openin\M@adrfile\M@filename\relax \ifeof\M@adrfile \loop %\PackageWarning{mailing}{I can't find the file \M@filename} \typeout{I can't find the file \M@filename!} \closein\M@adrfile \typein[\M@filename]{Enter a new name} \openin\M@adrfile\M@filename \ifeof\M@adrfile \repeat \fi} \def\read@info{% \skip@empty@lines \if@notready \let\M@toname\M@line \read\M@adrfile to\M@toaddress \read\M@adrfile to\M@opening \test@eof \if@notready\read@defs\fi \fi } \def\read@defs{% \def\M@defns{}% {\loop \endlinechar=-1 \read\M@adrfile to\M@line \endlinechar=`\^^M \expandafter\toks@\expandafter\expandafter \expandafter{\expandafter\M@defns\M@line}% \xdef\M@defns{\the\toks@}% \test@emptyoreof \if@notemptyoreof \repeat}% \M@defns } \def\test@eof{% \ifeof\M@adrfile \@notreadyfalse \else \@notreadytrue \fi} \def\test@emptyoreof{% \@notemptyoreoftrue \ifx\M@line\@empty \global\@notemptyoreoffalse \fi \ifeof\M@adrfile \global\@notemptyoreoffalse \global\@notreadyfalse \fi} \def\skip@empty@lines{% {\loop \endlinechar=-1 \ifeof\M@adrfile \global\@notreadyfalse \@tempswafalse \else \global\@notreadytrue \global\read\M@adrfile to\M@line \ifx\M@line\@empty \@tempswatrue \else \@tempswafalse \fi \fi \if@tempswa \repeat}% } \endinput %% %% End of file `mailing.sty'.