%% 
%% This is file `ltxcheck.tex', generated 
%% on <1994/1/30> with the docstrip utility (2.2c).
%% 
%% The original source files were:
%% 
%% dircheck.dtx  (with options: `ltxcheck')
%% 
%% Copyright (C) 1993 by LaTeX3 project. All rights reserved. 
%% For additional copyright information see further down in this file. 
%% 
%% This file is part of the LaTeX2e system. 
%% ---------------------------------------- 
%% 
%% 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 readme files. 
%% 
%% Please do not request updates from us directly. Distribution is 
%% done through Mail-Servers 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 00readme.l2e. 
%% 
%% If you receive only some of these files from someone, complain! 
%% 
%% You are NOT ALLOWED to distribute this file alone. You are NOT 
%% ALLOWED to take money for the distribution or use of either this 
%% file or a changed version, except for a nominal charge for copying 
%% etc. 
%%% ====================================================================
%%%  @LaTeX-file{
%%%     author_1        = "David Carlisle",
%%%     version         = "0.2c",
%%%     date            = "20 December 1993,
%%%     time            = "17:51:47 GMT,
%%%     filename        = "dircheck.dtx",
%%%     address_1       = "Computer Science Department
%%%                        Manchester University
%%%                        Oxford Road
%%%                        Manchester
%%%                        England
%%%                        M13 9PL",
%%%     checksum        = "46381 2485 8605 79037",
%%%     email_1         = "carlisle@cs.man.ac.uk (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX,initialisation
%%%     supported       = "yes",
%%%     docstring       = "
%%%     System dependent initialisations for LaTeX2e
%%%     This file controls the definitions of the macros
%%%     \@currdir \input@path and \filename@parse",
%%%  }
%%% ====================================================================
\makeatletter
\begingroup
\count@\time
\divide\count@ 60
\count2=-\count@
\multiply\count2 60
\advance\count2 \time
\edef\stamp{%
  \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
    \two@digits{\the\count@}:\two@digits{\the\count2}}
\immediate\openout15=texsys.new
\immediate\write15{\stamp^^J}
\immediate\closeout15 %
\def\test#1#2#3{%
  \openin\@inputcheck#1 %
  \ifeof\@inputcheck
    \typeout{^^J#1 not found}%
     #3\relax
  \else
    \read\@inputcheck to \@tempa
    \ifx\@tempa\stamp
      \typeout{^^J#1 found}#2\relax
    \else
      \typeout{BAD: old file \@tempa (should be \stamp)}%
      #3\relax
    \fi
  \fi
  \closein\@inputcheck}

\typeout{^^J%
LaTeX2e installation check file^^J%
===============================}

\typeout{^^J%
Before running this file through LaTeX2e you should have installed^^J%
the Standard LaTeX2e files in their final `system' directories.^^J%
This file should *not* be run in a directory that contains article.cls}

\def\pause{%
\typeout{**}%
\message{** Hit return to continue: }%
\read -1  to \xxx}

\typeout{^^J%
After certain tests, LaTeX will pause so that you can read the^^J%
output without it scrolling off the screen.^^J%
When you are ready just hit <return> and LaTeX will continue.^^J%
While LaTeX is pausing, you will see a prompt like the one below.^^J^^J%
If a test fails, a message will be displayed followed by^^J%
an error message starting `! BAD'.^^J%
LaTeX will quit if you try to scroll past such an error.}
\pause

\typeout{^^J%
Checking the current directory syntax^^J%
=====================================}

\newif\iftest\testfalse

\ifx\@currdir\@undefined
  \typeout{^^J%
  \noexpand\@currdir is undefined !!^^J%
  Something is seriously wrong with the LaTeX2e initialisation.^^J%
  Either you have corrupted files or this is a LaTeX bug.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\@@end
\fi

\ifx\@currdir\@empty
  \typeout{^^J%
  \noexpand\@currdir is defined to be empty.^^J%
  This means that LaTeX can not distinguish between a file^^J%
  aaaaa.tex^^J%
  that exists in the current directory, and  a file aaaaa.tex^^J%
  in another directory.^^J%
  It may be that this Operating System has no concept of `directory'^^J%
  in which case the setting is correct. If however it is possible to^^J%
  uniquely refer to a file then a suitable definition of
    \noexpand\@currdir^^J%
  should be added to texsys.cfg, and the format remade.}
  \pause
\else
  \typeout{^^J%
\noexpand\@currdir is defined as
    \expandafter\strip@meaning\meaning\@currdir^^J%
  (Testing...)}
\begingroup
\endlinechar=-1
\count@\time
\divide\count@ 60
\count2=-\count@
\multiply\count2 60
\advance\count2 \time
\edef\stamp{%
  \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
    \two@digits{\the\count@}:\two@digits{\the\count2}}

  \immediate\openout15=ltxcheck.tmp
  \immediate\write15{\stamp^^J}
  \immediate\closeout15 %

  \openin\@inputcheck\@currdir ltxcheck.tmp %
  \ifeof\@inputcheck
    \typeout{\@currdir ltxcheck.tmp  not found}%
  \else
    \read\@inputcheck to \@tempa
    \ifx\@tempa\stamp
      \typeout{\@currdir ltxcheck.tmp found}
      \testtrue
    \else
      \typeout{BAD: old file \@tempa (should be \stamp)}%
      \testfalse
    \fi
  \fi
  \closein\@inputcheck

  \iftest
    \endgroup
    \typeout{\noexpand \@currdir OK!}
  \else
  \endgroup
  \typeout{^^J%
The LaTeX2e installation has definepd \noexpand\@currdir^^J%
to be \expandafter\strip@meaning\meaning\@currdir.^^J%
This appears to be incorrect.^^J%
You should add a correct definition to texsys.cfg^^J%
and rebuild the format.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\expandafter\expandafter\@@end
  \fi
\fi

\pause

\typeout{^^J%
Checking the input path^^J%
=======================}

\ifx\@currdir\@empty\else
  \IfFileExists{\@currdir article.cls}
   {\typeout{article.cls in current directory!}%
    \errmessage{This file should not be run in a `system directory'}}
    {\IfFileExists{article.cls}
      {\typeout{input path OK!}}
      {\typeout{^^J%
        LaTeX claims that article.cls is not on the system.^^J%
        Either LaTeX has been incorrectly installed, or the
        \noexpand\input@path^^J%
        is incorrect. A correct definition should be added to^^J%
        texsys.cfg, and the format remade.}
       \pause
       \typeout{^^J%
        Typical definitions of \noexpand\input@path include:^^J^^J%
        \string\let\string\input@path=\noexpand\@undefined
         (the default definition)^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {/usr/lib/tex/inputs/} {/usr/local/lib/tex/inputs/} }^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {c:/tex/inputs/} {a:/} }^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {tex_inputs:} {[SOMEWHERE.TEX.INPUTS]} }^^J}%
        \pause
        \typeout{^^J%
        Note that \noexpand\input@path should be undefined
            unless your^^J%
        TeX installation does not make
             \noexpand\openin and \noexpand\input^^J%
        search the same directories.^^J%
        If \noexpand\input@path is being defined, the first entry^^J%
        should be {}^^J%
        and later entries should be in the same syntax as
                  \noexpand\@currdir^^J%
       ie full directory names that may be concatenated with the^^J%
       basename (note the final / and ] in the above examples).^^J%
       Some systems may need more complicated settings.^^J%
       See texsys.cfg for more examples.}
       \errmessage{BAD \noexpand\input@path!!}
       \expandafter\@@end}}%
\fi

\pause

\typeout{^^J%
Checking the TeX version^^J%
========================}

\ifx\noboundary\@undefined
\typeout{^^J%
This is TeX 2. You will not be able to use all the new features^^J%
of LaTeX2e with such an old TeX. The current version (1994/12/16) is^^J%
TeX 3.1415^^J%
Consider upgrading your TeX}
\else
\typeout{^^J%
This is at least TeX3. Good!^^J%
If the following `lines' appear on the same line, separated by
\string^\string^J^^J%
 then consider upgrading to a TeX newer than 3.141.^^J%
The current version (1994/12/16) is^^J%
TeX 3.1415}
\message{line1^^Jline2^^Jline3}
\pause
\fi
\endgroup

\@@end

\endinput
%% 
%% End of file `ltxcheck.tex'.
