diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3tlp.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3tlp.dtx | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx index ae3e72abe60..2d722a77624 100644 --- a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3tlp.dtx 740 2008-08-01 13:25:38Z morten $ +\GetIdInfo$Id: l3tlp.dtx 767 2008-08-05 19:44:21Z morten $ {L3 Experimental Token List Pointers} %\iffalse %<*driver> @@ -439,6 +439,7 @@ % % \begin{function}{% % \tlist_elt_count:n | +% \tlist_elt_count:o | % \tlp_elt_count:N | % } % \begin{syntax} @@ -1413,33 +1414,33 @@ % \begin{macro}{\tlp_map_inline:Nn} % \begin{macro}{\tlp_map_inline:cn} % \begin{macro}{\tlist_map_inline_aux:n} -% \begin{macro}{\l_tlp_inline_level_num} +% \begin{macro}{\g_tlp_inline_level_num} % The inline functions are straight forward by now. We use a little -% a trick with the fake counter |\l_tlp_inline_level_num| to make +% a trick with the fake counter |\g_tlp_inline_level_num| to make % them nestable.\footnote{This should be a proper integer, but I % don't want to mess with the dependencies right now\dots} We can % also make use of |\tlist_map_function:Nn| from before. % \begin{macrocode} \def_long_new:Npn \tlist_map_inline:nn #1#2{ - \num_incr:N \l_tlp_inline_level_num - \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n} + \num_gincr:N \g_tlp_inline_level_num + \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n} ##1{#2} \exp_args:Nc \tlist_map_function_aux:Nn - {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n} + {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n} #1 \q_recursion_tail\q_recursion_stop - \num_decr:N \l_tlp_inline_level_num + \num_gdecr:N \g_tlp_inline_level_num } \def_long_new:Npn \tlp_map_inline:Nn #1#2{ - \num_incr:N \l_tlp_inline_level_num - \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n} + \num_gincr:N \g_tlp_inline_level_num + \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n} ##1{#2} \exp_args:NcE \tlist_map_function_aux:Nn - {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n} + {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n} #1 \q_recursion_tail\q_recursion_stop - \num_decr:N \l_tlp_inline_level_num + \num_gdecr:N \g_tlp_inline_level_num } \def_new:Npn\tlp_map_inline:cN{\exp_args:Nc\tlp_map_inline:NN} -\tlp_new:Nn \l_tlp_inline_level_num{0} +\tlp_new:Nn \g_tlp_inline_level_num{0} % \end{macrocode} % \end{macro} % \end{macro} @@ -1489,6 +1490,7 @@ % % % \begin{macro}{\tlist_elt_count:n} +% \begin{macro}{\tlist_elt_count:o} % \begin{macro}{\tlp_elt_count:n} % Count number of elements within a token list or token list % pointer. Brace groups within the list are read as a single @@ -1501,6 +1503,7 @@ \tlist_map_function:nN {#1}\num_elt_count:n \num_eval_end: } +\def_new:Npn \tlist_elt_count:o {\exp_args:No\tlist_elt_count:n} \def_new:Npn \tlp_elt_count:N #1{ \num_value:w \num_eval:w 0 \tlp_map_function:NN #1 \num_elt_count:n @@ -1509,6 +1512,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % % @@ -1961,7 +1965,7 @@ % and putting it in front of the ones before it. % \begin{macrocode} \def_long_new:Npn \tlist_reverse:n #1{ - \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop + \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_recursion_stop } \def_long_new:Npn \tlist_reverse_aux:nN #1#2{ \quark_if_recursion_tail_stop_do:nn {#2}{ #1 } |