summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3seq.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-31 00:04:47 +0000
committerKarl Berry <karl@freefriends.org>2010-03-31 00:04:47 +0000
commit3ab55a61f6f8d2218a8f3175bc7481ce162b60d3 (patch)
treef606e0c2117a8058213441400e50ba25400ba94a /Master/texmf-dist/tex/latex/expl3/l3seq.sty
parent035ea73193af75f6ade46e306603e61d82b24950 (diff)
expl3 1881 (30mar10)
git-svn-id: svn://tug.org/texlive/trunk@17631 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3seq.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3seq.sty63
1 files changed, 31 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3seq.sty b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
index a14df7ccef1..8f6b8c95e01 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3seq.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3seq.dtx Copyright (C) 1990-2009 LaTeX3 project
+%% File: l3seq.dtx Copyright (C) 1990-2010 LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3seq.dtx 1692 2009-11-03 21:02:34Z joseph $
+\GetIdInfo$Id: l3seq.dtx 1857 2010-03-21 21:32:09Z joseph $
{L3 Experimental sequences and stacks}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -73,7 +73,7 @@
\cs_new_eq:NN \seq_gset_eq:cN \cs_gset_eq:cN
\cs_new_eq:NN \seq_gset_eq:Nc \cs_gset_eq:Nc
\cs_new_eq:NN \seq_gset_eq:cc \cs_gset_eq:cc
-\cs_new_nopar:Npn \seq_gconcat:NNN #1#2#3 {
+\cs_new_protected_nopar:Npn \seq_gconcat:NNN #1#2#3 {
\tl_gset:Nx #1 { \exp_not:V #2 \exp_not:V #3 }
}
\cs_generate_variant:Nn \seq_gconcat:NNN {ccc}
@@ -81,11 +81,11 @@
\prg_new_eq_conditional:NNn \seq_if_empty:c \tl_if_empty:c {p,TF,T,F}
\cs_new_nopar:Npn \seq_if_empty_err:N #1 {
\if_meaning:w #1 \c_empty_tl
- \tl_clear:N \l_testa_tl % catch prefixes
+ \tl_clear:N \l_kernel_testa_tl % catch prefixes
\msg_kernel_bug:x {Empty~sequence~`\token_to_str:N#1'}
\fi:
}
-\prg_new_conditional:Nnn \seq_if_in:Nn {TF,T,F} {
+\prg_new_protected_conditional:Nnn \seq_if_in:Nn {TF,T,F} {
\cs_set:Npn \seq_tmp:w ##1 \seq_elt:w #2 \seq_elt_end: ##2##3 \q_stop {
\if_meaning:w \q_no_value ##2
\prg_return_false: \else: \prg_return_true: \fi:
@@ -95,26 +95,26 @@
\cs_generate_variant:Nn \seq_if_in:NnTF { NV, cV, co, c, cx}
\cs_generate_variant:Nn \seq_if_in:NnT { NV, cV, co, c, cx}
\cs_generate_variant:Nn \seq_if_in:NnF { NV, cV, co, c, cx}
-\cs_new_nopar:Npn \seq_get:NN #1 {
+\cs_new_protected_nopar:Npn \seq_get:NN #1 {
\seq_if_empty_err:N #1
\exp_after:wN \seq_get_aux:w #1 \q_stop
}
-\cs_new:Npn \seq_get_aux:w \seq_elt:w #1 \seq_elt_end: #2 \q_stop #3 {
+\cs_new_protected:Npn \seq_get_aux:w \seq_elt:w #1 \seq_elt_end: #2 \q_stop #3 {
\tl_set:Nn #3 {#1}
}
\cs_generate_variant:Nn \seq_get:NN {c}
-\cs_new:Npn \seq_pop_aux:nnNN #1#2#3 {
+\cs_new_protected:Npn \seq_pop_aux:nnNN #1#2#3 {
\seq_if_empty_err:N #3
\exp_after:wN \seq_pop_aux:w #3 \q_stop #1#2#3
}
-\cs_new:Npn \seq_pop_aux:w
+\cs_new_protected:Npn \seq_pop_aux:w
\seq_elt:w #1 \seq_elt_end: #2\q_stop #3#4#5#6 {
#3 #5 {#2}
#4 #6 {#1}
}
\cs_new_eq:NN \seq_show:N \tl_show:N
\cs_new_eq:NN \seq_show:c \tl_show:c
-\cs_new_nopar:Npn \seq_display:N #1 {
+\cs_new_protected_nopar:Npn \seq_display:N #1 {
\iow_term:x { Sequence~\token_to_str:N #1~contains~
the~elements~(without~outer~braces): }
\toks_clear:N \l_tmpa_toks
@@ -123,85 +123,84 @@
\toks_put_right:Nx \l_tmpa_toks {^^J>~}
}
\toks_put_right:Nx \l_tmpa_toks {
- \iow_space: \iow_char:N \{ \exp_not:n {##1} \iow_char:N \}
+ \c_space_tl \iow_char:N \{ \exp_not:n {##1} \iow_char:N \}
}
}
\toks_show:N \l_tmpa_toks
}
\cs_generate_variant:Nn \seq_display:N {c}
-\cs_new:Npn \seq_put_aux:Nnn #1 {
+\cs_new_protected:Npn \seq_put_aux:Nnn #1 {
\exp_after:wN \seq_put_aux:w #1 \q_stop #1
}
-\cs_new:Npn \seq_put_aux:w #1\q_stop #2#3#4 { \tl_set:Nn #2 {#3#1#4} }
-\cs_new:Npn \seq_put_left:Nn #1#2 {
+\cs_new_protected:Npn \seq_put_aux:w #1\q_stop #2#3#4 { \tl_set:Nn #2 {#3#1#4} }
+\cs_new_protected:Npn \seq_put_left:Nn #1#2 {
\seq_put_aux:Nnn #1 {\seq_elt:w #2\seq_elt_end:} {}
}
\cs_generate_variant:Nn \seq_put_left:Nn {NV,No,Nx,c,cV,co}
-\cs_new:Npn \seq_put_right:Nn #1#2{
+\cs_new_protected:Npn \seq_put_right:Nn #1#2{
\seq_put_aux:Nnn #1{}{\seq_elt:w #2\seq_elt_end:}}
\cs_generate_variant:Nn \seq_put_right:Nn {NV,No,Nx,c,cV,co}
-\cs_new:Npn \seq_gput_left:Nn {
+\cs_new_protected:Npn \seq_gput_left:Nn {
\pref_global:D
\seq_put_left:Nn
}
-\cs_new:Npn \seq_gput_right:Nn {
+\cs_new_protected:Npn \seq_gput_right:Nn {
\pref_global:D
\seq_put_right:Nn
}
\cs_generate_variant:Nn \seq_gput_left:Nn {NV,No,Nx,c,cV,co}
\cs_generate_variant:Nn \seq_gput_right:Nn {NV,No,Nx,c,cV,co}
\cs_generate_variant:Nn \seq_gput_right:Nn {Nc}
-\cs_new:Npn \seq_map_variable_aux:Nnw #1#2 \seq_elt:w #3 \seq_elt_end: {
- \tl_set:Nx #1{\exp_not:n{#3}}
+\cs_new_protected:Npn \seq_map_variable_aux:Nnw #1#2 \seq_elt:w #3 \seq_elt_end: {
+ \tl_set:Nn #1 {#3}
\quark_if_nil:NT #1 \seq_map_break:
#2
\seq_map_variable_aux:Nnw #1{#2}
}
-\cs_new:Npn \seq_map_variable:NNn #1#2#3 {
- \tl_set:Nx #2 {\exp_not:n{\seq_map_variable_aux:Nnw #2{#3}}}
+\cs_new_protected:Npn \seq_map_variable:NNn #1#2#3 {
+ \tl_set:Nn #2 {\seq_map_variable_aux:Nnw #2{#3}}
\exp_after:wN #2 #1 \seq_elt:w \q_nil\seq_elt_end: \q_stop
}
\cs_generate_variant:Nn \seq_map_variable:NNn {c}
-
\cs_new_eq:NN \seq_map_break: \use_none_delimit_by_q_stop:w
\cs_new_eq:NN \seq_map_break:n \use_i_delimit_by_q_stop:nw
-\cs_new_nopar:Npn \seq_map_function:NN #1#2 {
+\cs_new_protected_nopar:Npn \seq_map_function:NN #1#2 {
\cs_set:Npn \seq_elt:w ##1 \seq_elt_end: {#2{##1}}
- #1
+ #1 \use_none:n \q_stop
\cs_set_eq:NN \seq_elt:w \ERROR
}
\cs_generate_variant:Nn \seq_map_function:NN {c}
-\cs_new_nopar:Npn \seq_map_inline:Nn #1#2 {
+\cs_new_protected_nopar:Npn \seq_map_inline:Nn #1#2 {
\cs_set:Npn \seq_elt:w ##1 \seq_elt_end: {#2}
- #1
+ #1 \use_none:n \q_stop
\cs_set_eq:NN \seq_elt:w \ERROR
}
\cs_generate_variant:Nn \seq_map_inline:Nn {c}
\seq_new:N \l_seq_remove_seq
-\cs_new:Npn \seq_remove_duplicates_aux:NN #1#2 {
+\cs_new_protected:Npn \seq_remove_duplicates_aux:NN #1#2 {
\seq_clear:N \l_seq_remove_seq
\seq_map_function:NN #2 \seq_remove_duplicates_aux:n
#1 #2 \l_seq_remove_seq
}
-\cs_new:Npn \seq_remove_duplicates_aux:n #1 {
+\cs_new_protected:Npn \seq_remove_duplicates_aux:n #1 {
\seq_if_in:NnF \l_seq_remove_seq {#1} {
\seq_put_right:Nn \l_seq_remove_seq {#1}
}
}
-\cs_new_nopar:Npn \seq_remove_duplicates:N {
+\cs_new_protected_nopar:Npn \seq_remove_duplicates:N {
\seq_remove_duplicates_aux:NN \seq_set_eq:NN
}
-\cs_new_nopar:Npn \seq_gremove_duplicates:N {
+\cs_new_protected_nopar:Npn \seq_gremove_duplicates:N {
\seq_remove_duplicates_aux:NN \seq_gset_eq:NN
}
\cs_new_eq:NN \seq_push:Nn \seq_put_left:Nn
\cs_new_eq:NN \seq_push:NV \seq_put_left:NV
\cs_new_eq:NN \seq_push:No \seq_put_left:No
\cs_new_eq:NN \seq_push:cn \seq_put_left:cn
-\cs_new_nopar:Npn \seq_pop:NN { \seq_pop_aux:nnNN \tl_set:Nn \tl_set:Nn }
+\cs_new_protected_nopar:Npn \seq_pop:NN { \seq_pop_aux:nnNN \tl_set:Nn \tl_set:Nn }
\cs_generate_variant:Nn \seq_pop:NN {c}
\cs_new_eq:NN \seq_gpush:Nn \seq_gput_left:Nn
-\cs_new_nopar:Npn \seq_gpop:NN { \seq_pop_aux:nnNN \tl_gset:Nn \tl_set:Nn }
+\cs_new_protected_nopar:Npn \seq_gpop:NN { \seq_pop_aux:nnNN \tl_gset:Nn \tl_set:Nn }
\cs_generate_variant:Nn \seq_gpush:Nn {NV,No,c,Nv}
\cs_generate_variant:Nn \seq_gpop:NN {c}
\cs_new_eq:NN \seq_top:NN \seq_get:NN