%%%%%%%%%%%%%%%%%%%%%%%%%%% iso88596.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% iso88596.sty
% Scanner for ISO 8859-6 Code
% reuses the ASMO 449 scanner
% to install it, include it as a LaTeX style option "iso88596"
% with Plain TeX, say "\input iso88596.sty"
% to activate it, say "\setcode {iso8859-6}"
% 10.07.94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Klaus Lagally
%     Institut fuer Informatik
%     Universitaet Stuttgart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version = {3.02}  		\datum = {10.07.94}
\message {\the\version }	\message {(\the\datum )}

\edef \arabtexconfig {\arabtexconfig 
iso88596.sty \the\version \space (\the\datum) }

\input asmo449.sty % reuse asmo449 scanner

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def \is@scan #1>{% modified scanner call: token sequence -> \a@tokens
\iftest@scan \ifshow \else \a@verb #1>\fi
\tracingmacros = 1 \fi
\sc@next = {}\sc@rest = {}%
\global\def \a@rest {}\a@tokens = {}\lowercase {\sc@beg #1>>}% transform
\iftest@scan \tracingmacros = 0 %
\expandafter \a@verb \expandafter (\the\a@tokens )>\fi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def \a@iso {iso8859-6}            \let \iso@setcode \setcode

\newcount \is@n  \newcount \is@m      

\def \set@iso {% substitute ISO 8859-6 scanner
\is@m = 32   \is@n = 160
\loop \lccode \is@n = \is@m
\ifnum 127 > \is@m \advance \is@m 1 \advance \is@n 1     
\repeat
\is@m = 193   \is@n = 225
\loop \catcode \is@n = 11 \catcode \is@m = 11
\ifnum 218 > \is@m \advance \is@m 1 \advance \is@n 1     
\repeat
\catcode 192 = 10  \catcode 255 = 15  
\set@asmo          \let \a@scan \is@scan }

\def \setcode #1{\def \next {#1}% switch input coding
\ifx \next \a@iso \set@iso 
	\message {input coding set to ISO 8859-6 conventions}%
\else \iso@setcode {#1}%
\fi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\message {scanner for code `ISO 8859-6' installed.}

\catcode `\@ = \asmoatcode
\endinput
%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
