From 11eb9a3891b7dd3261bf06e2421e6ae87aba4153 Mon Sep 17 00:00:00 2001
From: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Date: Sat, 6 Oct 2012 09:34:54 +0000
Subject: l3kernel update

git-svn-id: svn://tug.org/texlive/trunk@27898 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/l3kernel/l3int.sty | 60 ++++++++++++++------------
 1 file changed, 33 insertions(+), 27 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/l3kernel/l3int.sty')

diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
index 25667fc8c75..cd2ab964888 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
@@ -46,7 +46,7 @@
 %%
 %% -----------------------------------------------------------------------
 \RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3int.dtx 4121 2012-08-17 01:36:30Z bruno $
+\GetIdInfo$Id: l3int.dtx 4237 2012-09-26 10:18:58Z bruno $
   {L3 Integers}
 \ProvidesExplPackage
   {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -59,33 +59,35 @@
 \cs_new:Npn \int_eval:n #1 { \__int_value:w \__int_eval:w #1 \__int_eval_end: }
 \cs_new:Npn \int_abs:n #1
   {
-    \__int_value:w
-      \if_int_compare:w \__int_eval:w #1 < \c_zero
-        -
-      \fi:
-    \__int_eval:w #1 \__int_eval_end:
+    \__int_value:w \exp_after:wN \__int_abs:N
+      \int_use:N \__int_eval:w #1 \__int_eval_end:
+    \exp_stop_f:
   }
-\cs_new:Npn \int_max:nn #1#2
+\cs_new:Npn \__int_abs:N #1
+  { \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: }
+\cs_set:Npn \int_max:nn #1#2
   {
-    \__int_value:w \__int_eval:w
-      \if_int_compare:w
-        \__int_eval:w #1 > \__int_eval:w #2 \__int_eval_end:
-        #1
-      \else:
-        #2
-      \fi:
-    \__int_eval_end:
+    \__int_value:w \exp_after:wN \__int_maxmin:wwN
+      \int_use:N \__int_eval:w #1 \exp_after:wN ;
+      \int_use:N \__int_eval:w #2 ;
+      >
+    \exp_stop_f:
   }
-\cs_new:Npn \int_min:nn #1#2
+\cs_set:Npn \int_min:nn #1#2
   {
-    \__int_value:w \__int_eval:w
-      \if_int_compare:w
-        \__int_eval:w #1 < \__int_eval:w #2 \__int_eval_end:
-        #1
-      \else:
-        #2
-      \fi:
-    \__int_eval_end:
+    \__int_value:w \exp_after:wN \__int_maxmin:wwN
+      \int_use:N \__int_eval:w #1 \exp_after:wN ;
+      \int_use:N \__int_eval:w #2 ;
+      <
+    \exp_stop_f:
+  }
+\cs_new:Npn \__int_maxmin:wwN #1 ; #2 ; #3
+  {
+    \if_int_compare:w #1 #3 #2 ~
+      #1
+    \else:
+      #2
+    \fi:
   }
 \cs_new:Npn \int_div_truncate:nn #1#2
   {
@@ -108,13 +110,17 @@
     \fi:
     / #3#4
   }
-\cs_new:Npn \int_div_round:nn #1#2 { \int_eval:n { ( #1 ) / ( #2 ) } }
+\cs_new:Npn \int_div_round:nn #1#2
+  { \__int_value:w \__int_eval:w ( #1 ) / ( #2 ) \__int_eval_end: }
 \cs_new:Npn \int_mod:nn #1#2
   {
-    \__int_value:w \__int_eval:w
-      #1 - \int_div_truncate:nn {#1} {#2} * ( #2 )
+    \__int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww
+      \__int_value:w \__int_eval:w #1 \exp_after:wN ;
+      \__int_value:w \__int_eval:w #2 ;
     \__int_eval_end:
   }
+\cs_new:Npn \__int_mod:ww #1; #2;
+  { #1 - ( \__int_div_truncate:NwNw #1 ; #2 ; ) * #2 }
 \cs_new_protected:Npn \int_new:N #1
   {
     \__chk_if_free_cs:N #1
-- 
cgit v1.2.3

