diff options
Diffstat (limited to 'Build/source/texk/web2c/euptexdir/tests/free_pena.tex')
-rw-r--r-- | Build/source/texk/web2c/euptexdir/tests/free_pena.tex | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/euptexdir/tests/free_pena.tex b/Build/source/texk/web2c/euptexdir/tests/free_pena.tex new file mode 100644 index 00000000000..f7d2b51bcad --- /dev/null +++ b/Build/source/texk/web2c/euptexdir/tests/free_pena.tex @@ -0,0 +1,60 @@ +%#!eptex -ini -etex +%\let\dump\relax +%\batchmode +%\input plain +\font\cmr=cmr10\cmr +\ifx\kanjiskip\undefined\else + \ifnum\jis"2121="3000 + \jfont\jpy=umin10 at 10pt\jpy + \else + \jfont\jpy=min10 at 10pt\jpy + \fi +\fi + +\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.} + \prebreakpenalty\CNTA=\numexpr\CNT+1\relax + \advance\CNT1\relax + \ifnum\CNT<\LIM +\repeat + +\newcount\CNTB + +\loop + \MYCHAR\CNTB + \global\prebreakpenalty\CNTA=0 +{% +\CNT=0 +\loop + \MYCHAR\CNT + \count@=\numexpr -\CNT-1+\prebreakpenalty\CNTA\relax + \ifnum\count@=0\else\ifnum\CNTB=\CNT\else\errmessage{<\the\CNTB, \the\CNT>}\fi\fi + \advance\CNT1\relax + \ifnum\CNT<\LIM +\repeat +} + \MYCHAR\CNTB + \global\prebreakpenalty\CNTA=\numexpr\CNTB+1\relax + \advance\CNTB1\relax + \ifnum\CNTB<\LIM +\repeat +\bye |