summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3int.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3int.sty73
1 files changed, 39 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
index cd2ab964888..b104958c41f 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
@@ -13,7 +13,7 @@
%%
%% Do not distribute a modified version of this file.
%%
-%% File: l3int.dtx Copyright (C) 1990-2012 The LaTeX3 Project
+%% File: l3int.dtx Copyright (C) 1990-2013 The 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
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3int.dtx 4237 2012-09-26 10:18:58Z bruno $
+\GetIdInfo$Id: l3int.dtx 4444 2013-01-13 20:27:20Z bruno $
{L3 Integers}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -173,14 +173,8 @@
\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \int_gset_eq:NN { c }
\cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc }
-\cs_new_eq:NN \int_if_exist:NTF \cs_if_exist:NTF
-\cs_new_eq:NN \int_if_exist:NT \cs_if_exist:NT
-\cs_new_eq:NN \int_if_exist:NF \cs_if_exist:NF
-\cs_new_eq:NN \int_if_exist_p:N \cs_if_exist_p:N
-\cs_new_eq:NN \int_if_exist:cTF \cs_if_exist:cTF
-\cs_new_eq:NN \int_if_exist:cT \cs_if_exist:cT
-\cs_new_eq:NN \int_if_exist:cF \cs_if_exist:cF
-\cs_new_eq:NN \int_if_exist_p:c \cs_if_exist_p:c
+\prg_new_eq_conditional:NNn \int_if_exist:N \cs_if_exist:N { TF , T , F , p }
+\prg_new_eq_conditional:NNn \int_if_exist:c \cs_if_exist:c { TF , T , F , p }
\cs_new_protected:Npn \int_add:Nn #1#2
{ \tex_advance:D #1 by \__int_eval:w #2 \__int_eval_end: }
\cs_new_protected:Npn \int_sub:Nn #1#2
@@ -219,46 +213,62 @@
\__prg_compare_error:
}
\cs_new:Npn \__prg_compare_error:Nw
- #1#2 \prg_return_true: \else: \prg_return_false: \fi:
+ #1#2 \q_stop
{
+ { }
+ \c_zero \fi:
\__msg_kernel_expandable_error:nnn
{ kernel } { unknown-comparison } {#1}
\prg_return_false:
}
\prg_new_conditional:Npnn \int_compare:n #1 { p , T , F , TF }
{
- \exp_after:wN \__int_compare_aux:Nw \int_use:N \__int_eval:w #1
- \__prg_compare_error: \__int_eval_end:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
+ \exp_after:wN \__int_compare:w
+ \int_use:N \__int_eval:w #1 \__prg_compare_error:
+ }
+\cs_new:Npn \__int_compare:w #1 \__prg_compare_error:
+ {
+ \exp_after:wN \if_false: \__int_value:w
+ \__int_compare:Nw #1 e { = nd_ } \q_stop
}
-\cs_new:Npn \__int_compare_aux:Nw #1#2 \__prg_compare_error:
+\cs_new:Npn \__int_compare:Nw #1#2 \q_stop
{
- \exp_after:wN \__int_compare_aux:NNw
- \__int_to_roman:w - 0 #2 ?? \q_mark
- #1#2
+ \exp_after:wN \__int_compare:NNw
+ \__int_to_roman:w - 0 #2 \q_mark
+ #1#2 \q_stop
}
-\cs_new:Npn \__int_compare_aux:NNw #1#2#3 \q_mark
+\cs_new:Npn \__int_compare:NNw #1#2#3 \q_mark
{
+ \etex_unexpanded:D
\use:c { __int_compare_ #1 \if_meaning:w = #2 = \fi: :NNw }
\__prg_compare_error:Nw #1
}
+\cs_new:cpn { __int_compare_end_=:NNw } #1#2#3 e #4 \q_stop
+ {
+ {#3} \exp_stop_f:
+ \prg_return_false: \else: \prg_return_true: \fi:
+ }
+\cs_new:Npn \__int_compare:nnN #1#2#3
+ {
+ {#2} \exp_stop_f:
+ \prg_return_false: \exp_after:wN \use_none_delimit_by_q_stop:w
+ \fi:
+ #1 #2 #3 \exp_after:wN \__int_compare:Nw \__int_value:w \__int_eval:w
+ }
\cs_new:cpn { __int_compare_=:NNw } #1#2#3 =
- { \if_int_compare:w #3 = \__int_eval:w }
+ { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} = }
\cs_new:cpn { __int_compare_<:NNw } #1#2#3 <
- { \if_int_compare:w #3 < \__int_eval:w }
+ { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} < }
\cs_new:cpn { __int_compare_>:NNw } #1#2#3 >
- { \if_int_compare:w #3 > \__int_eval:w }
+ { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} > }
\cs_new:cpn { __int_compare_==:NNw } #1#2#3 ==
- { \if_int_compare:w #3 = \__int_eval:w }
+ { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} = }
\cs_new:cpn { __int_compare_!=:NNw } #1#2#3 !=
- { \reverse_if:N \if_int_compare:w #3 = \__int_eval:w }
+ { \__int_compare:nnN { \if_int_compare:w } {#3} = }
\cs_new:cpn { __int_compare_<=:NNw } #1#2#3 <=
- { \reverse_if:N \if_int_compare:w #3 > \__int_eval:w }
+ { \__int_compare:nnN { \if_int_compare:w } {#3} > }
\cs_new:cpn { __int_compare_>=:NNw } #1#2#3 >=
- { \reverse_if:N \if_int_compare:w #3 < \__int_eval:w }
+ { \__int_compare:nnN { \if_int_compare:w } {#3} < }
\prg_new_conditional:Npnn \int_compare:nNn #1#2#3 { p , T , F , TF }
{
\if_int_compare:w \__int_eval:w #1 #2 \__int_eval:w #3 \__int_eval_end:
@@ -767,11 +777,6 @@
\int_new:N \l_tmpb_int
\int_new:N \g_tmpa_int
\int_new:N \g_tmpb_int
-\cs_new_eq:NN \if_num:w \if_int_compare:w
-\int_new:N \l_tmpc_int
-\cs_new_eq:NN \int_eval:w \__int_eval:w
-\cs_new_eq:NN \int_eval_end: \__int_eval_end:
-\cs_new_eq:NN \int_value:w \__int_value:w
%%
%%
%% End of file `l3int.sty'.