%D \module
%D   [       file=syst-xtx,
%D        version=2004.09.11,
%D          title=\CONTEXT\ System Macros,
%D       subtitle=\XETEX\ specifics,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\ifx\XeTeXversion\undefined \endinput \fi

\unprotect

%D For the moment, the only thing needed is to load are the
%D mappings from lower to uppercase characters.

\ifx\scratchread\undefined \newread\scratchread \fi

\immediate\openin\scratchread=unicode-letters.tex \ifeof\scratchread
  \immediate\openin\scratchread=xplain.tex \ifeof\scratchread
    % no initialization file
  \else
    \input xplain.tex\relax
  \fi
\else
    \input unicode-letters.tex\relax
    % begin of patch (turkish patterns need this)
    \begingroup
        \catcode`\{=1 \catcode`\}=2 \catcode`\#=6
        \def\C #1 #2 #3 {\global\uccode"#1="#2 \global\lccode"#1="#3 } % case mappings (non-letter)
        \def\L #1 #2 #3 {\global\catcode"#1=11 \C #1 #2 #3 }           % letter with case mappings
        \L 201C 201C 201C
        \L 201D 201D 201D
    \endgroup
    % end of patch
\fi

\protect \endinput
