[latex3-commits] [l3svn] r6810 - Go back to \sort_ordered/reversed: (essentially reverts r6794)

noreply at latex-project.org noreply at latex-project.org
Sun Jan 1 07:41:20 CET 2017


Author: bruno
Date: 2017-01-01 07:41:19 +0100 (Sun, 01 Jan 2017)
New Revision: 6810

Modified:
   trunk/l3experimental/l3sort/l3sort.dtx
   trunk/l3experimental/l3sort/testfiles/m3sort001.luatex.tlg
   trunk/l3experimental/l3sort/testfiles/m3sort001.lvt
   trunk/l3experimental/l3sort/testfiles/m3sort001.tlg
Log:
Go back to \sort_ordered/reversed: (essentially reverts r6794)

Since there is currently no consensus on names, keep former names
to avoid having many different versions "in the wild" in case of
CTAN release.


Modified: trunk/l3experimental/l3sort/l3sort.dtx
===================================================================
--- trunk/l3experimental/l3sort/l3sort.dtx	2017-01-01 06:33:13 UTC (rev 6809)
+++ trunk/l3experimental/l3sort/l3sort.dtx	2017-01-01 06:41:19 UTC (rev 6810)
@@ -80,24 +80,24 @@
 %   \clist_sort:Nn \l_foo_clist
 %     {
 %       \int_compare:nNnTF { #1 } > { #2 }
-%         { \sort_return_reversed: }
-%         { \sort_return_unchanged: }
+%         { \sort_reversed: }
+%         { \sort_ordered: }
 %     }
 % \end{verbatim}
 % will result in \cs{l_foo_clist} holding the values
 % |{ -2 , 01 , +1 , 3 , 5 }| sorted in non-decreasing order.
 %
 % The code defining the comparison should perform
-% \cs{sort_return_reversed:} if the two items given as |#1|
+% \cs{sort_reversed:} if the two items given as |#1|
 % and |#2| are not in the correct order, and otherwise it
-% should call \cs{sort_return_unchanged:} to indicate that
+% should call \cs{sort_ordered:} to indicate that
 % the order of this pair of items should not be changed.
 %
 % For instance, a \meta{comparison code} consisting only
-% of \cs{sort_return_unchanged:} with no test will yield a trivial
+% of \cs{sort_ordered:} with no test will yield a trivial
 % sort: the final order is identical to the original order.
 % Conversely, using a \meta{comparison code} consisting only
-% of \cs{sort_return_reversed:} will reverse the list (in a fairly
+% of \cs{sort_reversed:} will reverse the list (in a fairly
 % inefficient way).
 %
 % \begin{texnote}
@@ -302,9 +302,9 @@
 %   for \tn{loctoks} every time a sorting function is called, as
 %   \pkg{etex} or \pkg{elocalloc} could be loaded.
 %
-%   In Con\TeX{}t mkiv the range is from
+%   In Con\TeX{}t MkIV the range is from
 %   $|\c_syst_last_allocated_toks|+1$ to \cs{c_max_register_int}, and in
-%   mkii it is from $|\lastallocatedtoks|+1$ to \cs{c_max_register_int}.
+%   MkII it is from $|\lastallocatedtoks|+1$ to \cs{c_max_register_int}.
 %   In all these cases, call \cs{@@_shrink_range:}.  The \LaTeX3 format
 %   mode is easiest: no \tn{toks} are ever allocated so available
 %   \tn{toks} range from $0$ to \cs{c_max_register_int} and we
@@ -635,16 +635,16 @@
 % \end{macro}
 %
 %
-% \begin{macro}{\sort_return_unchanged:, \sort_return_reversed:}
+% \begin{macro}{\sort_ordered:, \sort_reversed:}
 % \begin{macro}[aux]{\@@_return_mark:N}
 % \begin{macro}[aux]{\@@_return_none_error:, \@@_return_two_error:w}
 %   The marker removes one token.  Each comparison should call
-%   \cs{sort_return_unchanged:} or \cs{sort_return_reversed:} exactly
+%   \cs{sort_ordered:} or \cs{sort_reversed:} exactly
 %   once.  If neither is called, \cs{@@_return_none_error:} is called.
 %    \begin{macrocode}
-\cs_new_protected:Npn \sort_return_unchanged: #1 \@@_return_mark:N
-  { #1 \@@_return_mark:N \@@_return_two_error:w \@@_return_unchanged: }
-\cs_new_protected:Npn \sort_return_reversed: #1 \@@_return_mark:N
+\cs_new_protected:Npn \sort_ordered: #1 \@@_return_mark:N
+  { #1 \@@_return_mark:N \@@_return_two_error:w \@@_ordered: }
+\cs_new_protected:Npn \sort_reversed: #1 \@@_return_mark:N
   { #1 \@@_return_mark:N \@@_return_two_error:w \@@_return_reversed: }
 \cs_new_protected:Npn \@@_return_mark:N #1 { }
 \cs_new_protected:Npn \@@_return_none_error:
@@ -652,7 +652,7 @@
     \__msg_kernel_error:nnxx { sort } { return-none }
       { \tex_the:D \tex_toks:D \l_@@_A_int }
       { \tex_the:D \tex_toks:D \l_@@_C_int }
-    \@@_return_unchanged:
+    \@@_ordered:
   }
 \cs_new_protected:Npn \@@_return_two_error:w
     #1 \@@_return_none_error:
@@ -662,7 +662,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[aux]{\@@_return_unchanged:}
+% \begin{macro}[aux]{\@@_ordered:}
 %   If the comparison function returns \texttt{ordered},
 %   then the second argument fed to \cs{@@_compare:nn}
 %   should remain to the right of the other one. Since
@@ -674,7 +674,7 @@
 %   is already in the correct registers and we are done
 %   with merging those two blocks.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_return_unchanged:
+\cs_new_protected:Npn \@@_ordered:
   {
     \tex_toks:D \l_@@_B_int \tex_toks:D \l_@@_C_int
     \tex_advance:D \l_@@_B_int - \c_one
@@ -1124,31 +1124,21 @@
   {
     When~sorting~a~list,~the~code~to~compare~items~#1~and~#2~
     did~not~call~
-    \iow_char:N\\sort_return_unchanged: ~nor~
-    \iow_char:N\\sort_return_reversed: .~
+    \iow_char:N\\sort_ordered: ~nor~
+    \iow_char:N\\sort_reversed: .~
     Exactly~one~of~these~should~be~called.
   }
 \__msg_kernel_new:nnnn { sort } { return-two }
   { The~comparison~code~returned~multiple~times. }
   {
     When~sorting~a~list,~the~code~to~compare~items~called~
-    \iow_char:N\\sort_return_unchanged: ~or~
-    \iow_char:N\\sort_return_reversed: ~multiple~times.~
+    \iow_char:N\\sort_ordered: ~or~
+    \iow_char:N\\sort_reversed: ~multiple~times.~
     Exactly~one~of~these~should~be~called.
   }
 %    \end{macrocode}
 %
-% \subsection{Deprecated}
-%
-% \begin{macro}[deprecated=2017-12-31]{\sort_ordered:, \sort_reversed:}
-%   For removal after 2017-12-31.
 %    \begin{macrocode}
-\cs_new_eq:NN \sort_ordered: \sort_return_unchanged:
-\cs_new_eq:NN \sort_reversed: \sort_return_reversed:
-%    \end{macrocode}
-% \end{macro}
-%
-%    \begin{macrocode}
 %</initex|package>
 %    \end{macrocode}
 %

Modified: trunk/l3experimental/l3sort/testfiles/m3sort001.luatex.tlg
===================================================================
--- trunk/l3experimental/l3sort/testfiles/m3sort001.luatex.tlg	2017-01-01 06:33:13 UTC (rev 6809)
+++ trunk/l3experimental/l3sort/testfiles/m3sort001.luatex.tlg	2017-01-01 06:41:19 UTC (rev 6810)
@@ -112,9 +112,8 @@
 !...............................................  
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
-| When sorting a list, the code to compare items called
-| \sort_return_unchanged: or \sort_return_reversed: multiple times. Exactly
-| one of these should be called.
+| When sorting a list, the code to compare items called \sort_ordered: or
+| \sort_reversed: multiple times. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -129,8 +128,7 @@
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | When sorting a list, the code to compare items c and b did not call
-| \sort_return_unchanged: nor \sort_return_reversed:. Exactly one of these
-| should be called.
+| \sort_ordered: nor \sort_reversed:. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -145,8 +143,7 @@
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | When sorting a list, the code to compare items c and a did not call
-| \sort_return_unchanged: nor \sort_return_reversed:. Exactly one of these
-| should be called.
+| \sort_ordered: nor \sort_reversed:. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -160,9 +157,8 @@
 !...............................................  
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
-| When sorting a list, the code to compare items called
-| \sort_return_unchanged: or \sort_return_reversed: multiple times. Exactly
-| one of these should be called.
+| When sorting a list, the code to compare items called \sort_ordered: or
+| \sort_reversed: multiple times. Exactly one of these should be called.
 |...............................................
 {c}{a}{b}{d}
 ============================================================

Modified: trunk/l3experimental/l3sort/testfiles/m3sort001.lvt
===================================================================
--- trunk/l3experimental/l3sort/testfiles/m3sort001.lvt	2017-01-01 06:33:13 UTC (rev 6809)
+++ trunk/l3experimental/l3sort/testfiles/m3sort001.lvt	2017-01-01 06:41:19 UTC (rev 6810)
@@ -23,14 +23,14 @@
   \tl_set:Nn \l_tmpa_tl { 8234610203748 }
   {
     \tl_sort:Nn \l_tmpa_tl
-      { \int_compare:nTF { #1 > #2 } \sort_return_reversed: \sort_return_unchanged: }
+      { \int_compare:nTF { #1 > #2 } \sort_reversed: \sort_ordered: }
     \TYPE { \l_tmpa_tl }
   }
   \TYPE { \l_tmpa_tl }
   \tl_gset:Nx \g_tmpa_tl { \prg_replicate:nn { 10 } { 8234610203748 } }
   {
     \tl_gsort:Nn \g_tmpa_tl
-      { \int_compare:nTF { #1 > #2 } \sort_return_reversed: \sort_return_unchanged: }
+      { \int_compare:nTF { #1 > #2 } \sort_reversed: \sort_ordered: }
   }
   \TYPE { \g_tmpa_tl }
 }
@@ -46,7 +46,7 @@
   \clist_set:Nn \l_tmpa_clist { 8,23,4,61,02,--3,03,7,3,48, }
   {
     \clist_sort:Nn \l_tmpa_clist
-      { \int_compare:nTF { #1 > #2 } \sort_return_reversed: \sort_return_unchanged: }
+      { \int_compare:nTF { #1 > #2 } \sort_reversed: \sort_ordered: }
     \TYPE { \l_tmpa_clist }
   }
   \TYPE { \l_tmpa_clist }
@@ -54,7 +54,7 @@
     { \prg_replicate:nn { 10 } { 8,23,4,61,02,--3,03,7,3,48, } }
   {
     \clist_gsort:Nn \g_tmpa_clist
-      { \int_compare:nTF { #1 > #2 } \sort_return_reversed: \sort_return_unchanged: }
+      { \int_compare:nTF { #1 > #2 } \sort_reversed: \sort_ordered: }
   }
   \TYPE { \g_tmpa_clist }
 }
@@ -74,7 +74,7 @@
   \seq_gset_split:Nnn \g_tmpa_seq { , } { 8,23,4,61,02,--3,03,7,3,48 }
   {
     \seq_gsort:Nn \g_tmpa_seq
-      { \int_compare:nTF { #1 > #2 } \sort_return_reversed: \sort_return_unchanged: }
+      { \int_compare:nTF { #1 > #2 } \sort_reversed: \sort_ordered: }
   }
   \TYPE { \tl_to_str:N \g_tmpa_seq }
 }
@@ -102,21 +102,21 @@
 
 \TEST { sort~too~long }
   {
-    \tl_sort:Nn \l_tmpa_tl { \sort_return_unchanged: }
+    \tl_sort:Nn \l_tmpa_tl { \sort_ordered: }
     \int_compare:nF
       { \tl_count:N \l_tmpa_tl = 50000 }
       { \ERROR }
     \OMIT
     \use:c { newtoks } \l_test_toks
     \TIMO
-    \clist_sort:Nn \l_tmpa_clist { \sort_return_unchanged: }
+    \clist_sort:Nn \l_tmpa_clist { \sort_ordered: }
     \int_compare:nF
       { \clist_count:N \l_tmpa_clist = 50000 }
       { \ERROR }
     \OMIT
     \use:c { newtoks } \l_test_toks
     \TIMO
-    \seq_sort:Nn \l_tmpa_seq { \sort_return_unchanged: }
+    \seq_sort:Nn \l_tmpa_seq { \sort_ordered: }
     \int_compare:nF
       { \seq_count:N \l_tmpa_seq = 50000 }
       { \ERROR }
@@ -132,15 +132,15 @@
         \TYPE { #1 #2 }
         \str_if_eq:nnT { #1 #2 } { c a }
           { \use:c { newtoks } \l_test_toks }
-        \sort_return_unchanged:
+        \sort_ordered:
       }
     \TYPE { \l_tmpa_tl }
     \tl_sort:Nn \l_tmpa_tl
       {
         \str_case:nn {#1}
           {
-            { b }  { \sort_return_reversed: }
-            { d }  { \sort_return_reversed: \sort_return_reversed: }
+            { b }  { \sort_reversed: }
+            { d }  { \sort_reversed: \sort_reversed: }
           }
       }
     \TYPE { \l_tmpa_tl }

Modified: trunk/l3experimental/l3sort/testfiles/m3sort001.tlg
===================================================================
--- trunk/l3experimental/l3sort/testfiles/m3sort001.tlg	2017-01-01 06:33:13 UTC (rev 6809)
+++ trunk/l3experimental/l3sort/testfiles/m3sort001.tlg	2017-01-01 06:41:19 UTC (rev 6810)
@@ -112,9 +112,8 @@
 !...............................................  
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
-| When sorting a list, the code to compare items called
-| \sort_return_unchanged: or \sort_return_reversed: multiple times. Exactly
-| one of these should be called.
+| When sorting a list, the code to compare items called \sort_ordered: or
+| \sort_reversed: multiple times. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -129,8 +128,7 @@
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | When sorting a list, the code to compare items c and b did not call
-| \sort_return_unchanged: nor \sort_return_reversed:. Exactly one of these
-| should be called.
+| \sort_ordered: nor \sort_reversed:. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -145,8 +143,7 @@
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | When sorting a list, the code to compare items c and a did not call
-| \sort_return_unchanged: nor \sort_return_reversed:. Exactly one of these
-| should be called.
+| \sort_ordered: nor \sort_reversed:. Exactly one of these should be called.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -160,9 +157,8 @@
 !...............................................  
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
-| When sorting a list, the code to compare items called
-| \sort_return_unchanged: or \sort_return_reversed: multiple times. Exactly
-| one of these should be called.
+| When sorting a list, the code to compare items called \sort_ordered: or
+| \sort_reversed: multiple times. Exactly one of these should be called.
 |...............................................
 {c}{a}{b}{d}
 ============================================================



More information about the latex3-commits mailing list