%%
%% This is file `phone.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scrlettr.dtx  (with options: `phone')
%% 
%% Copyright (C) 1994-1999 Axel Kielhorn, Markus Kohm and Frank Neukam.
%% 
%% All rights reserved. For further copyright information see the file
%% LEGAL.TXT or LEGALDE.TXT.
%% 
%% This file is part of the LaTeX2e KOMA-Script bundle.
%% ----------------------------------------------------
%% 
%% The KOMA-Script bundle bases on the Script-family created by
%% Frank Neukam 1993 and the standard documents classes created
%% by the LaTeX3-Team 1994-1996.
%% ------------------------------------------------------------------------
%% 
%%  This system 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:
%% 
%% For error reports in case of UNCHANGED versions see documentation.
%% 
%% Please do not request updates from us directly. Distribution is
%% done through Mail-Servers, Mailboxes and TeX organizations.
%% 
%% You are not allowed to change this file.
%% 
%% You are allowed to distribute this file under the condition that
%% it is distributed together with all files mentioned in readme.txt
%% and liesmich.txt. See LEGAL.TXT or LEGALDE.TXT for further
%% information.
%% 
%% If you receive only some of these files from someone, complain!
%% 
%% You are NOT ALLOWED to distribute this file alone.
%% 
\ProvidesFile{phone.tex}
              [2000/01/20 v2.5c LaTeX2e KOMA
              interactive phone-number-directory generation]
\documentclass[12pt]{scrartcl}
\newcommand*\jj {j}
\newcommand*\ja {ja}
\newcommand*\y  {y}
\newcommand*\yes{yes}
\newread\ttyin
\newcommand*{\gobble}[1]{}
\def\iden#1{#1}
\def\strip#1#2 \gobble{\def #1{#2}}
\def\defpar{\par}
\def\Ask#1#2{%
    \message{#2}\read\ttyin to #1\ifx#1\defpar\def#1{}\else
    \iden{\expandafter\strip\expandafter#1#1\gobble\gobble} \gobble\fi}
\newif\ifDecision
\newcommand*\adrfile{}
\newcommand*\adrtitle{}
\typeout{^^J%
 *** phone.tex v2.0 by Frank Neukam <01 Dec 1993>^^J%
         *** LaTeX2e-changes by Markus Kohm 1994-1999^^J%
         ^^J%
 To create a phone-number-list just answer the questions:^^J%
         ^^J}
\Ask\answer{Use german? [y/n]^^J%
            Mit deutscher Sprachanpassung? [j/n]}
\ifx\jj \answer \Decisiontrue\else
\ifx\ja \answer \Decisiontrue\else
\ifx\y  \answer \Decisiontrue\else
\ifx\yes\answer \Decisiontrue\else
                \Decisionfalse\fi\fi\fi\fi
\ifDecision
  \Ask\answer{Use new german? [y/n]^^J%
              Mit neuer deutscher Rechtschreibung? [j/n]}
  \ifx\jj \answer \Decisiontrue\else
  \ifx\ja \answer \Decisiontrue\else
  \ifx\y  \answer \Decisiontrue\else
  \ifx\yes\answer \Decisiontrue\else
                  \Decisionfalse\fi\fi\fi\fi
  \ifDecision
     \usepackage{ngerman}
  \else
     \usepackage{german}
  \fi
\fi
\InputIfFileExists{phone.cfg}{%
     \typeout{Load local configuration-file.}}{%
     \typeout{No local configuration-file found.}}
\Ask\adrfile{^^J%
             Name of address-file (without .adr)?^^J%
             Name der Adressdatei (ohne .adr)?}
\Ask\adrtitle{^^J%
              Title of directory/list?^^J%
              Titel des Verzeichnisses?}
\parindent 0in
\pagestyle{empty}
\begin{document}
\def\adrchar#1{\vspace{1ex}}
\def\adrentry#1#2#3#4#5#6#7#8{\setbox0\hbox{#4}
 {\sc #1}%
 \def\tempa{#2}\ifx \tempa\empty \else , #2\fi%
 \def\tempa{#7}\ifx \tempa\empty \else \ (#7)\fi%
 \ \dotfill\ \unhbox0\par}
\ifx\adrfile\empty \else
     \InputIfFileExists{\adrfile.adr}{%
{\LARGE \sfb \null\hfill\adrtitle\hfill\null\\[3ex]}
     }{%
     \typeout{^^J%
              *** File \adrfile.adr not found!^^J%
              *** Datei \adrfile.adr nicht gefunden!^^J%
              ^^J}
     }
\fi
\end{document}
\endinput
%%
%% End of file `phone.tex'.
