From 7a50f35d6fd3bd705c78298b1ccc085991638f87 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 29 Dec 2011 23:03:42 +0000 Subject: l3kernel 3109 (29dec11) git-svn-id: svn://tug.org/texlive/trunk@24971 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/l3kernel/l3luatex.dtx | 75 ++++++++++++---------- 1 file changed, 40 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx') diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index 430a018ca85..baf21f14990 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3luatex.dtx 2995 2011-11-23 16:15:19Z bruno $ +\GetIdInfo$Id: l3luatex.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental LuaTeX-specific functions} % %<*driver> @@ -205,7 +205,7 @@ % (other). % \end{variable} % -% \begin{variable}{\c_string_cctab} +% \begin{variable}{\c_str_cctab} % Category code table where all characters have category code $12$ % (other) with the exception of spaces, which have category code % $10$ (space). @@ -235,8 +235,8 @@ \msg_kernel_new:nnnn { luatex } { bad-engine } { LuaTeX~engine~not~in~use!~Ignoring~#1. } { - The~feature~you~are~using~is~only~available\ - with~the~luaTeX~engine.~LaTeX3~ignored~`#1#2'. + The~feature~you~are~using~is~only~available~ + with~the~LuaTeX~engine.~LaTeX3~ignored~`#1#2'. } % \end{macrocode} % @@ -287,7 +287,7 @@ % dynamic tables themselves. % \begin{macrocode} \int_new:N \g_cctab_allocate_int -\int_set:Nn \g_cctab_allocate_int { -1 } +\int_set:Nn \g_cctab_allocate_int { \c_minus_one } \int_new:N \g_cctab_stack_int \seq_new:N \g_cctab_stack_seq % \end{macrocode} @@ -304,27 +304,21 @@ % tables, and even ones for the stack. Here, therefore, the odd numbers % are allocated. % \begin{macrocode} -\cs_new_protected_nopar:Npn \cctab_new:N #1 +\cs_new_protected:Npn \cctab_new:N #1 { - \cs_if_free:NTF #1 - { - \int_gadd:Nn \g_cctab_allocate_int { 2 } - \int_compare:nNnTF - { \g_cctab_allocate_int } < { \c_max_register_int + 1 } - { - \tex_global:D \tex_mathchardef:D #1 \g_cctab_allocate_int - \luatex_initcatcodetable:D #1 - } - { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } - } + \chk_if_free_cs:N #1 + \int_gadd:Nn \g_cctab_allocate_int { \c_two } + \int_compare:nNnTF + \g_cctab_allocate_int < { \c_max_register_int + \c_one } { - \msg_kernel_error:nnx { code } { variable-already-defined } - { \token_to_str:N #1 } + \tex_global:D \tex_chardef:D #1 \g_cctab_allocate_int + \luatex_initcatcodetable:D #1 } + { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { \msg_kernel_error:nnx { luatex } { bad-engine } { \exp_not:N \cctab_new:N } @@ -333,8 +327,9 @@ %<*package> \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { + \chk_if_free_cs:N #1 \newcatcodetable #1 \luatex_initcatcodetable:D #1 } @@ -350,27 +345,27 @@ % done by using a stack of tables which are not read only, and actually % having them as \enquote{in use} copies. % \begin{macrocode} -\cs_new_protected_nopar:Npn \cctab_begin:N #1 +\cs_new_protected:Npn \cctab_begin:N #1 { \seq_gpush:Nx \g_cctab_stack_seq { \tex_the:D \luatex_catcodetable:D } \luatex_catcodetable:D #1 - \int_gadd:Nn \g_cctab_stack_int { 2 } - \int_compare:nNnT { \g_cctab_stack_int } > { 268 435 453 } - { \msg_kernel_error:nn { code } { cctab-stack-full } } + \int_gadd:Nn \g_cctab_stack_int { \c_two } + \int_compare:nNnT \g_cctab_stack_int > \c_max_register_int + { \msg_kernel_fatal:nn { code } { cctab-stack-full } } \luatex_savecatcodetable:D \g_cctab_stack_int \luatex_catcodetable:D \g_cctab_stack_int } \cs_new_protected_nopar:Npn \cctab_end: { - \int_gsub:Nn \g_cctab_stack_int { 2 } - \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl - \quark_if_no_value:NT \l_cctab_tmp_tl + \int_gsub:Nn \g_cctab_stack_int { \c_two } + \seq_if_empty:NTF \g_cctab_stack_seq { \tl_set:Nn \l_cctab_tmp_tl { 0 } } + { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl } \luatex_catcodetable:D \l_cctab_tmp_tl \scan_stop: } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 + \cs_set_protected:Npn \cctab_begin:N #1 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_begin:N } {#1} @@ -384,7 +379,7 @@ %<*package> \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } + \cs_set_protected:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } \cs_set_protected_nopar:Npn \cctab_end: { \EndCatcodeRegime } } % @@ -408,7 +403,7 @@ } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_gset:Nn #1#2 + \cs_set_protected:Npn \cctab_gset:Nn #1#2 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_gset:Nn } { #1 {#2} } @@ -421,7 +416,7 @@ % \begin{variable}{\c_document_cctab} % \begin{variable}{\c_initex_cctab} % \begin{variable}{\c_other_cctab} -% \begin{variable}{\c_string_cctab} +% \begin{variable}{\c_str_cctab} % Creating category code tables is easy using the function above. % The \texttt{other} and \texttt{string} ones are done by completely % ignoring the existing codes as this makes life a lot less complex. The @@ -440,7 +435,7 @@ \cs_new_eq:NN \c_document_cctab \CatcodeTableLaTeX \cs_new_eq:NN \c_initex_cctab \CatcodeTableIniTeX \cs_new_eq:NN \c_other_cctab \CatcodeTableOther - \cs_new_eq:NN \c_string_cctab \CatcodeTableString + \cs_new_eq:NN \c_str_cctab \CatcodeTableString } % %<*initex> @@ -448,7 +443,7 @@ { \cctab_new:N \c_document_cctab \cctab_new:N \c_other_cctab - \cctab_new:N \c_string_cctab + \cctab_new:N \c_str_cctab \cctab_gset:Nn \c_document_cctab { \char_set_catcode_space:n { 9 } @@ -462,7 +457,7 @@ \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 } { \char_set_catcode_other:n {#1} } } - \cctab_gset:Nn \c_string_cctab + \cctab_gset:Nn \c_str_cctab { \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 } { \char_set_catcode_other:n {#1} } @@ -477,6 +472,16 @@ % \end{variable} % \end{variable} % +% \subsection{Deprecated functions} +% +% Deprecated 2011-12-21, for removal by 2012-03-31. +% +% \begin{variable}{\c_string_cctab} +% \begin{macrocode} +\cs_new_eq:NN \c_string_cctab \c_str_cctab +% \end{macrocode} +% \end{variable} +% % \begin{macrocode} % % \end{macrocode} -- cgit v1.2.3