%%%%%%%%%%%%%%%%%%%%%%%%%%% arabwin.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabwin.sty based on iso88596.sty from Prof. Klaus Lagally
% Scanner for windows with arabic support Code
% reuses the ASMO 449 scanner
% to install it, include it as a LaTeX style option "arabwin"
% with Plain TeX, say "\input arabwin.sty"
% to activate it, say "\setcode {arabwin}"
% 23.02.94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Isam G. Ishaq
%     (isam0732@mailszrz.zrz.TU-Berlin.DE) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version = {1.0}  \message {\the\version }

\iftest \message {scan the windows with arabic support input, as of 01.03.94}\fi

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

\input asmo449.sty % reuse asmo449 scanner

\chardef \awinatcode = \catcode`\@  \catcode`\@ = 11

\def \a@awin {arabwin}            \let \awin@setcode \setcode

\def \set@awin {% substitute windows with arabic support scanner

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

\is@m = 32   \is@n = 160
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 44 \repeat

\is@n = 161
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 59 \repeat

\is@n = 186
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 63 \repeat

\is@n = 191
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 87 \repeat

\is@n = 216 
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 91 \repeat

\is@m = 96   \is@n = 220
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 100 \repeat

\is@n = 225 		% lam
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 101 \repeat

\is@n = 227
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 105 \repeat

\is@n = 236
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 107 \repeat

\is@n = 240
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 111 \repeat

\is@n = 245
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 113 \repeat

\is@n = 248
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 114 \repeat

\is@n = 250
\loop \lccode \is@n = \is@m
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 115 \repeat



\catcode 192 = 10  \catcode 255 = 15  

\is@m = 193   \is@n = 225
\loop \catcode \is@n = 11 \catcode \is@m = 11
\advance \is@m 1 \advance \is@n 1     \ifnum \is@m < 224 \repeat


\set@asmo          \let \a@scan \is@scan
\message {input coding set to windows with arabic support conventions}}

\def \setcode #1{\def \next {#1}% switch input coding
\ifx \next \a@awin \set@awin \else
	\awin@setcode {#1}
\fi }

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

\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 }

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

\message {scanner for code `windows with arabic support' installed.}

\setcode {arabwin}

\catcode `\@ = \awinatcode

\endinput
%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

