summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/tests/free_ixsp.tex
blob: 9a3b27664156096d67385a10929a01a5259b1416 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%#!eptex -ini -etex
\let\dump\relax
\batchmode
\input plain

\errorstopmode
\catcode`@=11
\newcount\@tempcnta
\newcount\@tempcntb
\newcount\@tempcntc
\mathchardef\LIM=256

\def\MYCHAR#1{%
  \@tempcntc=\numexpr7*#1+"101\relax
  \@tempcnta=\@tempcntc\divide\@tempcnta 94
  \@tempcntb=\numexpr\@tempcntc-94*\@tempcnta+1\relax
  \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi
  \advance\@tempcnta18 % 18区以降
  \CNTA=\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax
}

\newcount\CNT\newcount\CNTA
\CNT=0
\loop
  \MYCHAR\CNT
  \message{\the\CNT.}
  \inhibitxspcode\CNTA=1\relax
  \advance\CNT1\relax
  \ifnum\CNT<\LIM
\repeat

\newcount\CNTB

\loop
  \MYCHAR\CNTB
  \global\inhibitxspcode\CNTA=3
{%
\CNT=0
\loop
  \MYCHAR\CNT
  \count@=\numexpr 1-\inhibitxspcode\CNTA\relax
  \ifnum\count@=0\else\ifnum\CNTB=\CNT\else
    \errmessage{<\the\CNTB, \the\CNT, \the\inhibitxspcode\CNTA>}\fi\fi
  \advance\CNT1\relax
  \ifnum\CNT<\LIM
\repeat
}
  \MYCHAR\CNTB
  \global\inhibitxspcode\CNTA=1\relax
  \advance\CNTB1\relax
  \ifnum\CNTB<\LIM
\repeat
\bye