Will Robertson wspr81 at gmail.com
Wed Dec 3 03:29:37 CET 2008

On 03/12/2008, at 6:09 AM, Jonathan Kew wrote:
>
>>
>> That's why I would like it very much, if all charclasses are
>> allocated
>> in a better way.
>
> This is definitely true; I should have done that from the beginning.
>
> Will: I think a version of your \newcharclass (or perhaps
> \newXeTeXcharclass is better) macro should go into the format itself.

I agree. In that case, this version is probably okay to stick straight
in there (but no guarantees!)

\newcount\XeTeXcharclass at cnt
\XeTeXcharclass at cnt=\z@
\def\newXeTeXcharclass#1{%
\ifnum\XeTeXcharclass at cnt<255\else % is \@cclv defined yet?
\errmessage{No room for a new char class}%
\fi
\allocationnumber=\XeTeXcharclass at cnt
\global\chardef #1=\allocationnumber
\wlog{\string#1 = char class \the\allocationnumber}%
}

Hope this helps,
Will