%                ********************************
%                *        PICTURE MACROS        *
%                ********************************
%
%  This file contains the \LaTeX picture commands, adapted for use in
%  plain \TeX.
%
%  Hacked by Peter Cameron, 70 Godstow Road, Wolvercote, Oxford OX2 8NY,
%  U.K., on 26 April 1990. (If you report problems to me, I will try
%  to help; but I'm no expert, so nothing is guaranteed.)
%  
%  This file may be freely distributed, but no warranty of any kind,
%  explicit or implicit, is given as to its performance.
%
%  \unitlength = value of dimension argument; set with \setlength
%  
%  enclose pictures with \picture and \endpicture
%
%  The \LaTeX commands \put, \multiput, \circle, \oval, \thinlines,
%  \thicklines, \vector, and the frame and box commands, all work
%  as in the \LaTeX book. (I hope!)
%
%  NOTE WELL: the \LaTeX command \line has been replaced by \Line
%  to avoid conflict with plain \TeX's very different use of \line.
%
%  If converting a \LaTeX file, change \line to \Line everywhere, and
%  change \begin{picture} to \picture, \end{picture} to \endpicture.
%
%  For program documentation, see LATEX.TEX!
%
%          FONTS
%         *******
%  You need these, in whatever sizes you scale your document to.

\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=circle10
\font\tencircw=circlew10

%          CONTROL MACROS FROM LATEX.TEX
%         *******************************

\catcode`\@=11

\newdimen\@wholewidth
\newdimen\@halfwidth
\newdimen\unitlength \unitlength =1pt
\newbox\@picbox
\newdimen\@picht

\newwrite\@unused
\newcount\@tempcnta
\newcount\@tempcntb
\newif\if@tempswa\@tempswatrue

\newdimen\@tempdima
\newdimen\@tempdimb

\newbox\@tempboxa

\newskip\@flushglue \@flushglue = 0pt plus 1fil
\newskip\@tempskipa
\newskip\@tempskipb
\newtoks\@temptokena

\def\setlength#1#2{#1#2\relax}

\def\@height{height}
\def\@depth{depth}
\def\@width{width}

\def\@ifnextchar#1#2#3{\let\@tempe #1\def\@tempa{#2}\def\@tempb{#3}\futurelet
    \@tempc\@ifnch}
\def\@ifnch{\ifx \@tempc \@sptoken \let\@tempd\@xifnch
      \else \ifx \@tempc \@tempe\let\@tempd\@tempa\else\let\@tempd\@tempb\fi
      \fi \@tempd}

\def\@whilenoop#1{}
\def\@whilenum#1\do #2{\ifnum #1\relax #2\relax\@iwhilenum{#1\relax 
     #2\relax}\fi}
\def\@iwhilenum#1{\ifnum #1\let\@nextwhile=\@iwhilenum 
         \else\let\@nextwhile=\@whilenoop\fi\@nextwhile{#1}}

\def\@whiledim#1\do #2{\ifdim #1\relax#2\@iwhiledim{#1\relax#2}\fi}
\def\@iwhiledim#1{\ifdim #1\let\@nextwhile=\@iwhiledim 
        \else\let\@nextwhile=\@whilenoop\fi\@nextwhile{#1}}

\def\@whileswnoop#1\fi{}
\def\@whilesw#1\fi#2{#1#2\@iwhilesw{#1#2}\fi\fi}
\def\@iwhilesw#1\fi{#1\let\@nextwhile=\@iwhilesw 
         \else\let\@nextwhile=\@whileswnoop\fi\@nextwhile{#1}\fi}

\def\@nnil{\@nil}
\def\@empty{}
\def\@fornoop#1\@@#2#3{}

\def\@for#1:=#2\do#3{\edef\@fortmp{#2}\ifx\@fortmp\@empty \else
    \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi}

\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
       #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi}

\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@fornoop \else
      #4\relax\let\@nextwhile=\@iforloop\fi\@nextwhile#2\@@#3{#4}}

\def\@tfor#1:=#2\do#3{\xdef\@fortmp{#2}\ifx\@fortmp\@empty \else
    \@tforloop#2\@nil\@nil\@@#1{#3}\fi}
\def\@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@fornoop \else
      #4\relax\let\@nextwhile=\@tforloop\fi\@nextwhile#2\@@#3{#4}}

\def\@ifstar#1#2{\@ifnextchar *{\def\@tempa*{#1}\@tempa}{#2}}

%         PICTURE MACROS
%        ****************
%
%         Put and Multiput
%        ------------------

\def\picture(#1,#2){\@ifnextchar({\@picture(#1,#2)}{\@picture(#1,#2)(0,0)}}

\def\@picture(#1,#2)(#3,#4){\@picht #2\unitlength
\setbox\@picbox\hbox to #1\unitlength\bgroup 
\hskip -#3\unitlength \lower #4\unitlength \hbox\bgroup\ignorespaces}

\def\endpicture{\egroup\hss\egroup\ht\@picbox\@picht
\dp\@picbox\z@\leavevmode\box\@picbox}

% In the definitions of \put and \multiput, \hskip was replaced by \kern
% just in case arg #3 = ``plus''.  (Bug detected by Don Knuth.
% changed 20 Jul 87).
%
\long\def\put(#1,#2)#3{\@killglue\raise#2\unitlength\hbox to \z@{\kern
#1\unitlength #3\hss}\ignorespaces}

\long\def\multiput(#1,#2)(#3,#4)#5#6{\@killglue\@multicnt=#5\relax
\@xdim=#1\unitlength
\@ydim=#2\unitlength
\@whilenum \@multicnt > 0\do
{\raise\@ydim\hbox to \z@{\kern
\@xdim #6\hss}\advance\@multicnt \m@ne\advance\@xdim
#3\unitlength\advance\@ydim #4\unitlength}\ignorespaces}

\def\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}

\def\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
  \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
\def\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
  \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}

\def\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth}

\def\shortstack{\@ifnextchar[{\@shortstack}{\@shortstack[c]}}

\def\@shortstack[#1]{\leavevmode
\vbox\bgroup\baselineskip-1pt\lineskip 3pt\let\mb@l\hss
\let\mb@r\hss \expandafter\let\csname mb@#1\endcsname\relax
\let\\\@stackcr\@ishortstack}

\def\@ishortstack#1{\halign{\mb@l ##\unskip\mb@r\cr #1\crcr}\egroup}


\def\@stackcr{\@ifstar{\@ixstackcr}{\@ixstackcr}}
\def\@ixstackcr{\@ifnextchar[{\@istackcr}{\cr\ignorespaces}}

\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}

%          Lines
%         -------

\newif\if@negarg

\def\Line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
\@linelen=#3\unitlength
\ifnum\@xarg =0 \@vline 
  \else \ifnum\@yarg =0 \@hline \else \@sline\fi
\fi}

\def\@sline{\ifnum\@xarg< 0 \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg
  \else \@negargfalse \@yyarg \@yarg \fi
\ifnum \@yyarg >0 \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi
\ifnum\@tempcnta>6 \@badlinearg\@tempcnta0 \fi
\ifnum\@xarg>6 \@badlinearg\@xarg 1 \fi
\setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
\ifnum \@yarg >0 \let\@upordown\raise \@clnht\z@
   \else\let\@upordown\lower \@clnht \ht\@linechar\fi
\@clnwd=\wd\@linechar
\if@negarg \hskip -\wd\@linechar \def\@tempa{\hskip -2\wd\@linechar}\else
     \let\@tempa\relax \fi
\@whiledim \@clnwd <\@linelen \do
  {\@upordown\@clnht\copy\@linechar
   \@tempa
   \advance\@clnht \ht\@linechar
   \advance\@clnwd \wd\@linechar}%
\advance\@clnht -\ht\@linechar
\advance\@clnwd -\wd\@linechar
\@tempdima\@linelen\advance\@tempdima -\@clnwd
\@tempdimb\@tempdima\advance\@tempdimb -\wd\@linechar
\if@negarg \hskip -\@tempdimb \else \hskip \@tempdimb \fi
\multiply\@tempdima \@m
\@tempcnta \@tempdima \@tempdima \wd\@linechar \divide\@tempcnta \@tempdima
\@tempdima \ht\@linechar \multiply\@tempdima \@tempcnta
\divide\@tempdima \@m
\advance\@clnht \@tempdima
\ifdim \@linelen <\wd\@linechar
   \hskip \wd\@linechar
  \else\@upordown\@clnht\copy\@linechar\fi}

\def\@hline{\ifnum \@xarg <0 \hskip -\@linelen \fi
\vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen
\ifnum \@xarg <0 \hskip -\@linelen \fi}

\def\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8
\advance\@tempcnta -9 \ifnum #2>0 \advance\@tempcnta #2\relax\else
\advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi
\char\@tempcnta}

\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
\@tempcnta \ifnum\@xarg<0 -\@xarg\else\@xarg\fi
\ifnum\@tempcnta<5\relax
\@linelen=#3\unitlength
\ifnum\@xarg =0 \@vvector 
  \else \ifnum\@yarg =0 \@hvector \else \@svector\fi
\fi
\else\@badlinearg\fi}

\def\@hvector{\@hline\hbox to 0pt{\@linefnt 
\ifnum \@xarg <0 \@getlarrow(1,0)\hss\else
    \hss\@getrarrow(1,0)\fi}}

\def\@vvector{\ifnum \@yarg <0 \@downvector \else \@upvector \fi}

\def\@svector{\@sline
\@tempcnta\@yarg \ifnum\@tempcnta <0 \@tempcnta=-\@tempcnta\fi
\ifnum\@tempcnta <5
  \hskip -\wd\@linechar
  \@upordown\@clnht \hbox{\@linefnt  \if@negarg 
  \@getlarrow(\@xarg,\@yyarg) \else \@getrarrow(\@xarg,\@yyarg) \fi}%
\else\@badlinearg\fi}

\def\@getlarrow(#1,#2){\ifnum #2 =\z@ \@tempcnta='33\else
\@tempcnta=#1\relax\multiply\@tempcnta \sixt@@n \advance\@tempcnta
-9 \@tempcntb=#2\relax\multiply\@tempcntb \tw@
\ifnum \@tempcntb >0 \advance\@tempcnta \@tempcntb\relax
\else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64
\fi\fi\char\@tempcnta}

\def\@getrarrow(#1,#2){\@tempcntb=#2\relax
\ifnum\@tempcntb < 0 \@tempcntb=-\@tempcntb\relax\fi
\ifcase \@tempcntb\relax \@tempcnta='55 \or 
\ifnum #1<3 \@tempcnta=#1\relax\multiply\@tempcnta
24 \advance\@tempcnta -6 \else \ifnum #1=3 \@tempcnta=49
\else\@tempcnta=58 \fi\fi\or 
\ifnum #1<3 \@tempcnta=#1\relax\multiply\@tempcnta
24 \advance\@tempcnta -3 \else \@tempcnta=51\fi\or 
\@tempcnta=#1\relax\multiply\@tempcnta
\sixt@@n \advance\@tempcnta -\tw@ \else
\@tempcnta=#1\relax\multiply\@tempcnta
\sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<0 \advance\@tempcnta 64 \fi
\char\@tempcnta}

\def\@vline{\ifnum \@yarg <0 \@downline \else \@upline\fi}

\def\@upline{\hbox to \z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
   \@height \@linelen \@depth \z@\hss}}

\def\@downline{\hbox to \z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
   \@height \z@ \@depth \@linelen \hss}}

\def\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char'66}\raise 
     \@linelen \hbox to\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}}

\def\@downvector{\@downline\lower \@linelen
      \hbox to \z@{\@linefnt\char'77\hss}}

%          Frames and boxes
%         ------------------

\def\makebox{\@ifnextchar ({\@makepicbox}{\@ifnextchar
     [{\@makebox}{\mbox}}}

\def\mbox#1{\leavevmode\hbox{#1}}

\def\@makebox[#1]{\leavevmode\@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][x]}}

\long\def\@imakebox[#1][#2]#3{\hbox to#1{\let\mb@l\hss
\let\mb@r\hss \expandafter\let\csname mb@#2\endcsname\relax
\mb@l #3\mb@r}}

\def\@makepicbox(#1,#2){\leavevmode\@ifnextchar 
   [{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}

\long\def\@imakepicbox(#1,#2)[#3]#4{\vbox to#2\unitlength
   {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
    \let\mb@t\vss
    \@tfor\@tempa :=#3\do{\expandafter\let
        \csname mb@\@tempa\endcsname\relax}%
\mb@t\hbox to #1\unitlength{\mb@l #4\mb@r}\mb@b}}

\def\savebox#1{\@ifnextchar ({\@savepicbox#1}{\@ifnextchar
     [{\@savebox#1}{\sbox#1}}}

\def\sbox#1#2{\setbox#1\hbox{#2}}

\def\@savebox#1[#2]{\@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][x]}}

\long\def\@isavebox#1[#2][#3]#4{\setbox#1 \hbox{\@imakebox[#2][#3]{#4}}}

\def\@savepicbox#1(#2,#3){\@ifnextchar 
   [{\@isavepicbox#1(#2,#3)}{\@isavepicbox#1(#2,#3)[]}}

\long\def\@isavepicbox#1(#2,#3)[#4]#5{\setbox#1 \hbox{\@imakepicbox
     (#2,#3)[#4]{#5}}}

\def\usebox#1{\leavevmode\copy #1\relax}

%% The following definition of \frame was written by Pavel Curtis
%% (Extra space removed 14 Jan 88)
\long\def\frame#1{\leavevmode
    \hbox{\hskip-\@wholewidth
     \vbox{\vskip-\@wholewidth
            \hrule \@height\@wholewidth
          \hbox{\vrule \@width\@wholewidth #1\vrule \@width\@wholewidth}\hrule
           \@height \@wholewidth\vskip -\@halfwidth}\hskip-\@wholewidth}}

\newdimen\fboxrule
\newdimen\fboxsep

\long\def\fbox#1{\leavevmode\setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule
    \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{\hrule \@height \fboxrule
          \hbox{\vrule \@width \fboxrule \hskip\fboxsep
          \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip 
                 \fboxsep\vrule \@width \fboxrule}
                 \hrule \@height \fboxrule}}}}

\def\framebox{\@ifnextchar ({\@framepicbox}{\@ifnextchar
     [{\@framebox}{\fbox}}}

\def\@framebox[#1]{\@ifnextchar [{\@iframebox[#1]}{\@iframebox[#1][x]}}

\long\def\@iframebox[#1][#2]#3{\leavevmode
  \savebox\@tempboxa[#1][#2]{\kern\fboxsep #3\kern\fboxsep}\@tempdima\fboxrule
    \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{\hrule \@height \fboxrule
          \hbox{\vrule \@width \fboxrule \hskip-\fboxrule
              \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip 
                  -\fboxrule\vrule \@width \fboxrule}
                  \hrule \@height \fboxrule}}}}

\def\@framepicbox(#1,#2){\@ifnextchar 
   [{\@iframepicbox(#1,#2)}{\@iframepicbox(#1,#2)[]}}

\long\def\@iframepicbox(#1,#2)[#3]#4{\frame{\@imakepicbox(#1,#2)[#3]{#4}}}

\def\parbox{\@ifnextchar [{\@iparbox}{\@iparbox[c]}}

\long\def\@iparbox[#1]#2#3{\leavevmode \@pboxswfalse
   \if #1b\vbox 
     \else \if #1t\vtop 
              \else \ifmmode \vcenter 
                        \else \@pboxswtrue $\vcenter
                     \fi
           \fi
    \fi{\hsize #2\@parboxrestore #3}\if@pboxsw $\fi}

\def\dashbox#1(#2,#3){\leavevmode\hbox to \z@{\baselineskip \z@%
\lineskip \z@%
\@dashdim=#2\unitlength%
\@dashcnt=\@dashdim \advance\@dashcnt 200
\@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
\ifodd\@dashcnt\@dashdim=\z@%
\advance\@dashcnt \@ne \divide\@dashcnt \tw@ 
\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
\advance\@dashcnt \m@ne
\setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
\@width \@dashdim}\put(0,0){\copy\@dashbox}%
\put(0,#3){\copy\@dashbox}%
\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
\multiply\@dashdim 3 
\fi
\setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
\@width #1\unitlength\hskip #1\unitlength}\@tempcnta=0
\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta=0
\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
\@dashdim=#3\unitlength%
\@dashcnt=\@dashdim \advance\@dashcnt 200
\@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
\ifodd\@dashcnt \@dashdim=\z@%
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else
\divide\@dashdim \tw@ \divide\@dashcnt \tw@
\advance\@dashcnt \m@ne
\setbox\@dashbox\hbox{\hskip -\@halfwidth
\vrule \@width \@wholewidth 
\@height \@dashdim}\put(0,0){\copy\@dashbox}%
\put(#2,0){\copy\@dashbox}%
\put(0,#3){\lower\@dashdim\copy\@dashbox}%
\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
\multiply\@dashdim 3
\fi
\setbox\@dashbox\hbox{\vrule \@width \@wholewidth 
\@height #1\unitlength}\@tempcnta0
\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta < \@dashcnt
\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}\@tempcnta0
\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta< \@dashcnt
\relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}}\@makepicbox(#2,#3)}

%          Circles and ovals
%         -------------------

\newif\if@ovt 
\newif\if@ovb 
\newif\if@ovl 
\newif\if@ovr 
\newdimen\@ovxx
\newdimen\@ovyy
\newdimen\@ovdx
\newdimen\@ovdy
\newdimen\@ovro
\newdimen\@ovri

%% \advance\@tempdima 2pt\relax added 1 Nov 88 to fix bug in which
%% size of drawn circle not monotonic function of argument of \circle,
%% caused by different rounding for dimensions of large and small circles.
%
\def\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2pt\relax
  \@tempcnta\@tempdima
  \@tempdima 4pt\relax \divide\@tempcnta\@tempdima
  \ifnum \@tempcnta > 10\relax \@tempcnta 10\relax\fi
  \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne
    \else \@warning{Oval too small}\fi
  \multiply\@tempcnta 4\relax
  \setbox \@tempboxa \hbox{\@circlefnt
  \char \@tempcnta}\@tempdima \wd \@tempboxa}

\def\@put#1#2#3{\raise #2\hbox to \z@{\hskip #1#3\hss}}

\def\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}

\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
  \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  #1\unitlength \@ovyy #2\unitlength
  \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  \@getcirc \@tempdimb
  \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
  \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
  \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
  \@circlefnt \setbox\@tempboxa
  \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
  \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
  \if@ovt \@ovhorz \kern -\@ovxx \fi
  \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
  \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
  \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  \endgroup}

\def\@ovvert#1#2{\vbox to \@ovyy{%
    \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb by #1\relax
      \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
    \else \kern \@ovri \kern \@ovdy \fi
    \leaders\vrule width \@wholewidth\vfil \nointerlineskip
    \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb by #2\relax
      \hbox{\char \@tempcntb}%
    \else \kern \@ovdy \kern \@ovro \fi}}

\def\@ovhorz{\hbox to \@ovxx{\kern \@ovro
    \if@ovr \else \kern \@ovdx \fi
    \leaders \hrule height \@wholewidth \hfil
    \if@ovl \else \kern \@ovdx \fi
    \kern \@ovri}}

\def\circle{\@ifstar{\@dot}{\@circle}}
\def\@circle#1{\begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
   \ifdim \@tempdimb >15.5pt\relax \@getcirc\@tempdimb
      \@ovro\ht\@tempboxa 
     \setbox\@tempboxa\hbox{\@circlefnt
      \advance\@tempcnta\tw@ \char \@tempcnta
      \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
      \advance\@tempcnta\tw@
      \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
        \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
      \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
   \else  \@circ\@tempdimb{96}\fi\endgroup}

\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}

\def\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5pt\relax
   \@tempcnta\@tempdima \@tempdima 1pt\relax
   \divide\@tempcnta\@tempdima 
   \ifnum\@tempcnta > 15\relax \@tempcnta 15\relax \fi    
   \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne\fi
   \advance\@tempcnta #2\relax
   \@circlefnt \char\@tempcnta}


%          INITIALIZATION
%         ****************

\thinlines   

\newcount\@xarg
\newcount\@yarg
\newcount\@yyarg
\newcount\@multicnt 
\newdimen\@xdim
\newdimen\@ydim
\newbox\@linechar
\newdimen\@linelen
\newdimen\@clnwd
\newdimen\@clnht
\newdimen\@dashdim
\newbox\@dashbox
\newcount\@dashcnt

\catcode`\@=12
