From fabbcd2656be5dca3e1986ddcc8c827a23e9aedf Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 29 Jan 2017 22:34:57 +0000
Subject: l3 (29jan17)

git-svn-id: svn://tug.org/texlive/trunk@43088 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/l3kernel/l3clist.dtx   | 76 +++++++++-------------
 1 file changed, 32 insertions(+), 44 deletions(-)

(limited to 'Master/texmf-dist/source/latex/l3kernel/l3clist.dtx')

diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index b9987de422b..b7364894e39 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -3,43 +3,30 @@
 %% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach,
 %%                                 The LaTeX3 project
 %%                             (C) 2012-2016 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
-%% license or (at your option) any later version.  The latest version
-%% of this license is in the file
-%%
-%%    http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%%    http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%%   Snapshots taken from the repository represent work in progress and may
-%%   not work or may contain conflicting material!  We therefore ask
-%%   people _not_ to put them into distributions, archives, etc. without
-%%   prior consultation with 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
+% license or (at your option) any later version.  The latest version
+% of this license is in the file
+%
+%    http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+%    https://github.com/latex3/latex3
+%
+% for those people who are interested.
 %
 %<*driver>
 \documentclass[full]{l3doc}
 %</driver>
 %<*driver|package>
-\GetIdInfo$Id: l3clist.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3clist.dtx 6805 2016-12-28 22:15:52Z joseph $
   {L3 Comma separated lists}
 %</driver|package>
 %<*driver>
@@ -1720,7 +1707,7 @@
 % \subsection{Using a single item}
 %
 % \begin{macro}{\clist_item:Nn, \clist_item:cn}
-% \begin{macro}[aux]{\@@_item:nnNn}
+% \begin{macro}[aux]{\@@_item:nnnN, \@@_item:ffoN, \@@_item:ffnN}
 % \begin{macro}[aux]{\@@_item_N_loop:nw}
 %   To avoid needing to test the end of the list at each step,
 %   we first compute the \meta{length} of the list. If the item number
@@ -1732,27 +1719,28 @@
 %    \begin{macrocode}
 \cs_new:Npn \clist_item:Nn #1#2
   {
-    \exp_args:Nfo \@@_item:nnNn
+    \@@_item:ffoN
       { \clist_count:N #1 }
+      { \int_eval:n {#2} }
       #1
       \@@_item_N_loop:nw
-      {#2}
   }
-\cs_new:Npn \@@_item:nnNn #1#2#3#4
+\cs_new:Npn \@@_item:nnnN #1#2#3#4
   {
-    \int_compare:nNnTF {#4} < \c_zero
+    \int_compare:nNnTF {#2} < \c_zero
       {
-        \int_compare:nNnTF {#4} < { - #1 }
+        \int_compare:nNnTF {#2} < { - #1 }
           { \use_none_delimit_by_q_stop:w }
-          { \exp_args:Nf #3 { \int_eval:n { #4 + \c_one + #1 } } }
+          { \exp_args:Nf #4 { \int_eval:n { #2 + \c_one + #1 } } }
       }
       {
-        \int_compare:nNnTF {#4} > {#1}
+        \int_compare:nNnTF {#2} > {#1}
           { \use_none_delimit_by_q_stop:w }
-          { #3 {#4} }
+          { #4 {#2} }
       }
-    { } , #2 , \q_stop
+    { } , #3 , \q_stop
   }
+\cs_generate_variant:Nn \@@_item:nnnN { ffo, ff }
 \cs_new:Npn \@@_item_N_loop:nw #1 #2,
   {
     \int_compare:nNnTF {#1} = \c_zero
@@ -1778,11 +1766,11 @@
 %    \begin{macrocode}
 \cs_new:Npn \clist_item:nn #1#2
   {
-    \exp_args:Nf \@@_item:nnNn
+    \@@_item:ffnN
       { \clist_count:n {#1} }
+      { \int_eval:n {#2} }
       {#1}
       \@@_item_n:nw
-      {#2}
   }
 \cs_new:Npn \@@_item_n:nw #1
   { \@@_item_n_loop:nw {#1} \prg_do_nothing: }
-- 
cgit v1.2.3

