%% %% This is file `mailing.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% mailing.dtx (with options: `package') %% %% Copyright (C) 1999-2004 Johannes Braams. All rights reserved. %% %% This file was generated from file(s) of the mailing package. %% ------------------------------------------------------------ %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2003/12/01 or later. %% %% This work has the LPPL maintenance status "maintained". %% %% The Current Maintainer of this work is Johannes Braams. %% %% This file may only be distributed together with a copy of the %% mailing package. You may however distribute the mailing package %% without such generated files. %% %% The list of all files belonging to the mailing package is %% given in the file `manifest.txt. %% %% The list of derived (unpacked) files belonging to the distribution %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% Copyright (C) 1999-2004 Johannes L. Braams texniek at braams.cistron.nl %% %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mailing} [2004/02/20 v1.0b 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'.