diff options
author | Karl Berry <karl@freefriends.org> | 2010-09-27 00:38:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-09-27 00:38:35 +0000 |
commit | 6f75f25fe8d374ef4209118bd8849d742410ccd1 (patch) | |
tree | c485a2517a4fba54346c4492d4b34f0c8d815962 /Master/texmf-dist/tex/latex/expl3/l3basics.sty | |
parent | 36e4bf755052bf5d5cef33cc2ffbad8f00b22163 (diff) |
expl3 2047 (26sep10)
git-svn-id: svn://tug.org/texlive/trunk@19904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3basics.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3basics.sty | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3basics.sty b/Master/texmf-dist/tex/latex/expl3/l3basics.sty index 785b120b2dc..d128e2fa1f3 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3basics.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3basics.sty @@ -15,7 +15,7 @@ %% Do not distribute a modified version of this file. %% %% -%% File: l3basics.dtx Copyright (C) 1990-2008 LaTeX3 project +%% File: l3basics.dtx Copyright (C) 1990-2008,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: l3basics.dtx 1992 2010-08-04 20:41:40Z joseph $ +\GetIdInfo$Id: l3basics.dtx 2037 2010-09-20 21:22:45Z joseph $ {L3 Experimental basic definitions} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -307,13 +307,13 @@ \tex_chardef:D \c_true_bool = 1~ \tex_chardef:D \c_false_bool = 0~ \cs_set_nopar:Npn \cs_to_str:N { - \if:w \exp_after:wN \cs_str_aux:w\token_to_str:N \a ax\q_nil + \if:w \exp_after:wN \cs_str_aux:w\token_to_str:N \a ax\q_stop \else: \exp_after:wN \exp_after:wN\exp_after:wN \use_ii:nn \fi: \exp_after:wN \use_none:n \token_to_str:N } -\cs_set:Npn \cs_str_aux:w #1#2#3#4\q_nil{#2#3} +\cs_set:Npn \cs_str_aux:w #1#2#3#4\q_stop{#2#3} \group_begin: \tex_lccode:D `\@ = `\: \scan_stop: \tex_catcode:D `\@ = 12~ @@ -321,18 +321,18 @@ \group_end: \cs_set:Npn \cs_split_function:NN #1#2{ \exp_after:wN \cs_split_function_aux:w - \tex_romannumeral:D -`\q \cs_to_str:N #1 @a \q_nil #2 + \tex_romannumeral:D -`\q \cs_to_str:N #1 @a \q_stop #2 } -\cs_set:Npn \cs_split_function_aux:w #1@#2#3\q_nil#4{ +\cs_set:Npn \cs_split_function_aux:w #1@#2#3\q_stop#4{ \if_meaning:w a#2 \exp_after:wN \use_i:nn \else: \exp_after:wN\use_ii:nn \fi: {#4{#1}{}\c_false_bool} - {\cs_split_function_auxii:w#2#3\q_nil #4{#1}} + {\cs_split_function_auxii:w#2#3\q_stop #4{#1}} } -\cs_set:Npn \cs_split_function_auxii:w #1@a\q_nil#2#3{ +\cs_set:Npn \cs_split_function_auxii:w #1@a\q_stop#2#3{ #2{#3}{#1}\c_true_bool } } @@ -372,7 +372,7 @@ \cs_split_function:NN #1 \cs_if_do_not_use_aux:nnN } \cs_set:Npn \cs_if_do_not_use_aux:nnN #1#2#3{ - \exp_after:wN\str_if_eq_p:nn \token_to_str:N D {#2} + \str_if_eq_p:nn { D } {#2} } \prg_set_conditional:Npnn \cs_if_free:N #1{p,TF,T,F}{ \tex_ifnum:D \cs_if_exist_p:N #1 =\c_zero @@ -445,32 +445,18 @@ \cs_set_protected_nopar:Npn \chk_if_exist_cs:c { \exp_args:Nc \chk_if_exist_cs:N } -\prg_set_conditional:Npnn \str_if_eq:nn #1#2{p}{ - \str_if_eq_p_aux:w #1\scan_stop:\\#2\scan_stop:\\ +\prg_set_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF } { + \tex_ifnum:D \pdf_strcmp:D + { \etex_unexpanded:D {#1} } { \etex_unexpanded:D {#2} } + = \c_zero + \prg_return_true: \else: \prg_return_false: \fi: +} +\prg_set_conditional:Npnn \str_if_eq:xx #1#2 { p , T , F , TF } { + \tex_ifnum:D \pdf_strcmp:D {#1} {#2} = \c_zero + \prg_return_true: \else: \prg_return_false: \fi: } -\cs_set_nopar:Npn \str_if_eq_p_aux:w #1#2\\#3#4\\{ - \if_meaning:w#1#3 - \if_meaning:w#1\scan_stop:\prg_return_true: \else: - \if_meaning:w#3\scan_stop:\prg_return_false: \else: - \str_if_eq_p_aux:w #2\\#4\\\fi:\fi: - \else:\prg_return_false: \fi:} \prg_set_conditional:Npnn \cs_if_eq_name:NN #1#2{p}{ - \exp_after:wN\exp_after:wN - \exp_after:wN\str_if_eq_p_aux:w - \exp_after:wN\token_to_str:N - \exp_after:wN#1 - \exp_after:wN\scan_stop: - \exp_after:wN\\ - \token_to_str:N#2\scan_stop:\\} -\prg_set_conditional:Npnn \str_if_eq_var:nf #1#2 {p} { - \if:w \tex_number:D\str_if_eq_var_start:nnN{}{}#1\scan_stop:{#2} -} -\cs_set_nopar:Npn\str_if_eq_var_start:nnN#1#2#3{ - \if:w#3\scan_stop:\exp_after:wN\str_if_eq_var_stop:w\fi: - \str_if_eq_var_start:nnN{\if:w#3#1}{#2\fi:} -} -\cs_set:Npn\str_if_eq_var_stop:w\str_if_eq_var_start:nnN#1#2#3{ - #1#3\scan_stop:'#213~\prg_return_true:\else:\prg_return_false:\fi: + \str_if_eq_p:nn {#1} {#2} } \cs_set:Npn \cs_tmp:w #1#2 { \cs_set_protected_nopar:Npn #1 ##1 @@ -613,11 +599,11 @@ \fi: { \exp_after:wN \cs_get_arg_count_from_signature_auxii:w - \use_none:nnnnnnnnn #2 9876543210\q_nil + \use_none:nnnnnnnnn #2 9876543210\q_stop } {-1} } -\cs_set:Npn \cs_get_arg_count_from_signature_auxii:w #1#2\q_nil{#1} +\cs_set:Npn \cs_get_arg_count_from_signature_auxii:w #1#2\q_stop{#1} \cs_set_nopar:Npn \cs_get_arg_count_from_signature:c { \exp_args:Nc \cs_get_arg_count_from_signature:N } |