summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx40
1 files changed, 14 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
index 25becd59fd2..a8c063b944f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -169,7 +169,7 @@
% \section{\pkg{l3cctab} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -242,6 +242,8 @@
%
% First, the \LuaTeX{} case.
% Creating a new category code table is done like other registers.
+% In Con\TeX{}t, \tn{newcatcodetable} does not include the initialisation,
+% so that is added explicitly.
% \begin{macrocode}
\sys_if_engine_luatex:TF
{
@@ -250,25 +252,11 @@
\__kernel_chk_if_free_cs:N #1
\@@_new:N #1
}
-%<*initex>
\cs_new_protected:Npn \@@_new:N #1
{
- \int_gincr:N \g_@@_allocate_int
- \int_compare:nNnTF
- \g_@@_allocate_int > \c_max_register_int
- {
- \__kernel_msg_fatal:nnx
- { kernel } { out-of-registers } { cctab }
- }
- {
- \tex_global:D \tex_chardef:D #1 \g_@@_allocate_int
- \tex_initcatcodetable:D #1
- }
+ \newcatcodetable #1
+ \tex_initcatcodetable:D #1
}
-%</initex>
-%<*package>
- \cs_new_eq:NN \@@_new:N \newcatcodetable
-%</package>
}
% \end{macrocode}
% Now the case for other engines. Here, each table is an integer
@@ -716,14 +704,14 @@
{
\cs_new_protected:Npn \@@_chk_if_valid_aux:NTF #1
{
-%<*initex>
- \bool_lazy_and:nnTF
- { \int_if_odd_p:n {#1} }
- { \int_compare_p:nNn {#1-1} < { \g_@@_allocate_int } }
-%</initex>
-%<*package>
\int_compare:nNnTF {#1-1} < { \e@alloc@ccodetable@count }
-%</package>
+ }
+ \cs_if_exist:NT \c_syst_catcodes_n
+ {
+ \cs_gset_protected:Npn \@@_chk_if_valid_aux:NTF #1
+ {
+ \int_compare:nTF { #1 <= \c_syst_catcodes_n }
+ }
}
}
{
@@ -883,7 +871,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}