[latex3-commits] [l3svn] r6776 - Change \c_minus_one to -\c_one in l3experimental (see issue #316)

noreply at latex-project.org noreply at latex-project.org
Mon Dec 5 06:10:10 CET 2016


Author: bruno
Date: 2016-12-05 06:10:10 +0100 (Mon, 05 Dec 2016)
New Revision: 6776

Added:
   trunk/l3experimental/l3str/testfiles/m3tl-analysis001.xetex.tlg
Modified:
   trunk/l3experimental/l3sort/l3sort.dtx
   trunk/l3experimental/l3str/l3regex.dtx
   trunk/l3experimental/l3str/l3str-convert.dtx
   trunk/l3experimental/l3str/l3tl-analysis.dtx
   trunk/l3experimental/l3str/testfiles/m3tl-analysis001.lvt
   trunk/l3experimental/l3str/testfiles/m3tl-analysis001.tlg
   trunk/l3experimental/xgalley/l3galley.dtx
Log:
Change \c_minus_one to -\c_one in l3experimental (see issue #316)


Modified: trunk/l3experimental/l3sort/l3sort.dtx
===================================================================
--- trunk/l3experimental/l3sort/l3sort.dtx	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3sort/l3sort.dtx	2016-12-05 05:10:10 UTC (rev 6776)
@@ -454,9 +454,9 @@
       \l_@@_B_int \l_@@_A_int
       \l_@@_C_int \l_@@_length_int
       \sort_copy_block:
-      \tex_advance:D \l_@@_A_int \c_minus_one
-      \tex_advance:D \l_@@_B_int \c_minus_one
-      \tex_advance:D \l_@@_C_int \c_minus_one
+      \tex_advance:D \l_@@_A_int - \c_one
+      \tex_advance:D \l_@@_B_int - \c_one
+      \tex_advance:D \l_@@_C_int - \c_one
       \@@_merge_blocks_aux:
       \exp_after:wN \@@_merge_blocks:
     \fi:
@@ -522,8 +522,8 @@
 \cs_new_protected:Npn \sort_ordered:
   {
     \tex_toks:D \l_@@_B_int \tex_toks:D \l_@@_C_int
-    \tex_advance:D \l_@@_B_int \c_minus_one
-    \tex_advance:D \l_@@_C_int \c_minus_one
+    \tex_advance:D \l_@@_B_int - \c_one
+    \tex_advance:D \l_@@_C_int - \c_one
     \if_int_compare:w \l_@@_C_int < \l_@@_length_int
       \use_i:nn
     \fi:
@@ -546,8 +546,8 @@
 \cs_new_protected:Npn \sort_reversed:
   {
     \tex_toks:D \l_@@_B_int \tex_toks:D \l_@@_A_int
-    \tex_advance:D \l_@@_B_int \c_minus_one
-    \tex_advance:D \l_@@_A_int \c_minus_one
+    \tex_advance:D \l_@@_B_int - \c_one
+    \tex_advance:D \l_@@_A_int - \c_one
     \if_int_compare:w \l_@@_A_int < \l_@@_begin_int
       \@@_merge_blocks_end: \use_i:nn
     \fi:
@@ -566,8 +566,8 @@
 \cs_new_protected:Npn \@@_merge_blocks_end:
   {
     \tex_toks:D \l_@@_B_int \tex_toks:D \l_@@_C_int
-    \tex_advance:D \l_@@_B_int \c_minus_one
-    \tex_advance:D \l_@@_C_int \c_minus_one
+    \tex_advance:D \l_@@_B_int - \c_one
+    \tex_advance:D \l_@@_C_int - \c_one
     \if_int_compare:w \l_@@_B_int < \l_@@_begin_int
       \use_i:nn
     \fi:

Modified: trunk/l3experimental/l3str/l3regex.dtx
===================================================================
--- trunk/l3experimental/l3str/l3regex.dtx	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3str/l3regex.dtx	2016-12-05 05:10:10 UTC (rev 6776)
@@ -3812,7 +3812,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_group_submatches:nNN #1#2#3
   {
-    \if_int_compare:w #1 > \c_minus_one
+    \if_int_compare:w #1 > - \c_one
       \@@_toks_put_left:Nx #2 { \@@_action_submatch:n { #1 < } }
       \@@_toks_put_left:Nx #3 { \@@_action_submatch:n { #1 > } }
     \fi:
@@ -5578,7 +5578,7 @@
         }
       \prop_map_inline:Nn \l_@@_success_submatches_prop
         {
-          \if_int_compare:w ##1 \c_minus_one
+          \if_int_compare:w ##1 - \c_one
             \exp_after:wN \@@_extract_e:wn \__int_value:w
           \else:
             \exp_after:wN \@@_extract_b:wn \__int_value:w

Modified: trunk/l3experimental/l3str/l3str-convert.dtx
===================================================================
--- trunk/l3experimental/l3str/l3str-convert.dtx	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3str/l3str-convert.dtx	2016-12-05 05:10:10 UTC (rev 6776)
@@ -1949,14 +1949,14 @@
 %   step: use the quotient of |#1| by $64$, and |#1| as arguments for
 %   the looping auxiliary, and output the continuation byte
 %   corresponding to the remainder $|#2|-64|#1|+128$. The bizarre
-%   construction |\c_minus_one + \c_zero *| removes the spurious initial
+%   construction |- \c_one + \c_zero *| removes the spurious initial
 %   continuation byte (better methods welcome).
 %    \begin{macrocode}
 \cs_new_protected:cpn { @@_convert_encode_utf8: }
   { \@@_convert_gmap_internal:N \@@_encode_utf_viii_char:n }
 \cs_new:Npn \@@_encode_utf_viii_char:n #1
   {
-    \@@_encode_utf_viii_loop:wwnnw #1 ; \c_minus_one + \c_zero * ;
+    \@@_encode_utf_viii_loop:wwnnw #1 ; - \c_one + \c_zero * ;
       { 128 } { \c_zero }
       {  32 } {     192 }
       {  16 } {     224 }

Modified: trunk/l3experimental/l3str/l3tl-analysis.dtx
===================================================================
--- trunk/l3experimental/l3str/l3tl-analysis.dtx	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3str/l3tl-analysis.dtx	2016-12-05 05:10:10 UTC (rev 6776)
@@ -412,7 +412,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_setup:n #1
   {
-    \int_set_eq:NN \tex_escapechar:D \c_minus_one
+    \int_set:Nn \tex_escapechar:D { - \c_one }
     \exp_after:wN \@@_disable_loop:N
       \tl_to_str:n {#1} { ~ } { ? ~ \__prg_break: }
     \__prg_break_point:
@@ -520,7 +520,7 @@
           \c_one
         \else:
           \if_catcode:w \exp_not:N \l_@@_token \c_group_end_token
-            \c_minus_one
+            - \c_one
           \else:
             \c_two
           \fi:
@@ -670,7 +670,7 @@
       = \l_@@_normal_int sp plus \l_@@_type_int sp \scan_stop:
     \int_incr:N \l_@@_index_int
     \int_zero:N \l_@@_normal_int
-    \if_int_compare:w \l_@@_nesting_int = \c_minus_one
+    \if_int_compare:w \l_@@_nesting_int = - \c_one
       \cs_set_eq:NN \@@_a_loop:w \scan_stop:
     \fi:
   }
@@ -815,7 +815,7 @@
     \exp_not:n { \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: }
     \exp_not:N \__int_value:w `#1 \s__tl
    \exp_not:N \exp_after:wN \exp_not:N \@@_b_normals:ww
-     \exp_not:N \__int_value:w \exp_not:N \__int_eval:w \c_minus_one +
+     \exp_not:N \__int_value:w \exp_not:N \__int_eval:w - \c_one +
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/l3experimental/l3str/testfiles/m3tl-analysis001.lvt
===================================================================
--- trunk/l3experimental/l3str/testfiles/m3tl-analysis001.lvt	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3str/testfiles/m3tl-analysis001.lvt	2016-12-05 05:10:10 UTC (rev 6776)
@@ -73,6 +73,7 @@
 \int_set:Nn \l_foo_int { 12 }
 \tex_toksdef:D \l_foo_toks 1234 \scan_stop:
 \l_foo_toks { abc }
+\int_const:Nn \c_test_int { -1 }
 \TIMO
 
 \TEST { Showing~the~values~of~registers }
@@ -80,7 +81,7 @@
     \tl_show_analysis:n
       {
         \l_foo_int \l_foo_toks
-        \c_minus_one \c_zero_skip \c_zero_muskip
+        \c_test_int \c_zero_skip \c_zero_muskip
         \tex_count:D \tex_dimendef:D
       }
   }

Modified: trunk/l3experimental/l3str/testfiles/m3tl-analysis001.tlg
===================================================================
--- trunk/l3experimental/l3str/testfiles/m3tl-analysis001.tlg	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/l3str/testfiles/m3tl-analysis001.tlg	2016-12-05 05:10:10 UTC (rev 6776)
@@ -99,7 +99,7 @@
 The token list contains the tokens:
 >  \l_foo_int (control sequence=\count1234=12)
 >  \l_foo_toks (control sequence=\toks1234=abc)
->  \c_minus_one (control sequence=\count22=-1)
+>  \c_test_int (control sequence=\count138=-1)
 >  \c_zero_skip (control sequence=\skip71=0.0pt)
 >  \c_zero_muskip (control sequence=\muskip40)
 >  \tex_count:D (control sequence=\count)

Added: trunk/l3experimental/l3str/testfiles/m3tl-analysis001.xetex.tlg
===================================================================
--- trunk/l3experimental/l3str/testfiles/m3tl-analysis001.xetex.tlg	                        (rev 0)
+++ trunk/l3experimental/l3str/testfiles/m3tl-analysis001.xetex.tlg	2016-12-05 05:10:10 UTC (rev 6776)
@@ -0,0 +1,109 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Bruno Le Floch
+============================================================
+TEST 1: tl_show_analysis basic
+============================================================
+The token list \c_empty_tl is empty
+> .
+<recently read> }
+l. ...  }
+The token list \c_catcode_other_space_tl contains the tokens:
+>    (the character  ).
+<recently read> }
+l. ...  }
+The token list is empty
+> .
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>    (blank space  ).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  \  (control sequence=\ ).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  & (alignment tab character &).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  { (begin-group character {)
+>  } (end-group character }).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  a (the letter a)
+>  b (the letter b)
+>  c (the letter c).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  a (the letter a)
+>  { (begin-group character {)
+>  \b (control sequence=macro:->\OT1-cmd \b \OT1\b )
+>  c (the letter c)
+>  ! (blank space !)
+>  } (end-group character })
+>  \  (control sequence=\ )
+>  ! (blank space !).
+<recently read> }
+l. ...  }
+============================================================
+============================================================
+TEST 2: tl_show_analysis in alignment
+============================================================
+The token list is empty
+> .
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  & (alignment tab character &).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  & (alignment tab character &)
+>  { (begin-group character {)
+>  & (alignment tab character &)
+>  } (end-group character })
+>  & (alignment tab character &)
+>  \tex_cr:D (control sequence=\cr).
+<recently read> }
+l. ...  }
+============================================================
+============================================================
+TEST 3: tl_show_analysis weird tokens
+============================================================
+The token list contains the tokens:
+>  \bgroup (control sequence=begin-group character {)
+>  \c_group_begin_token (control sequence=begin-group character {)
+>  { (active character=undefined)
+>    (begin-group character  )
+>  - (blank space -)
+>  \abc  def g  (control sequence=\relax)
+>  \abc (control sequence=\relax)
+>    (end-group character  )
+>  } (active character=undefined).
+<recently read> }
+l. ...  }
+The token list contains the tokens:
+>  \c_group_end_token (control sequence=end-group character })
+>  \egroup (control sequence=end-group character }).
+<recently read> }
+l. ...  }
+============================================================
+============================================================
+TEST 4: Showing the values of registers
+============================================================
+The token list contains the tokens:
+>  \l_foo_int (control sequence=\count1234=12)
+>  \l_foo_toks (control sequence=\toks1234=abc)
+>  \c_test_int (control sequence=\count137=-1)
+>  \c_zero_skip (control sequence=\skip71=0.0pt)
+>  \c_zero_muskip (control sequence=\muskip40)
+>  \tex_count:D (control sequence=\count)
+>  \tex_dimendef:D (control sequence=\dimendef).
+<recently read> }
+l. ...  }
+============================================================


Property changes on: trunk/l3experimental/l3str/testfiles/m3tl-analysis001.xetex.tlg
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/l3experimental/xgalley/l3galley.dtx
===================================================================
--- trunk/l3experimental/xgalley/l3galley.dtx	2016-12-05 04:55:45 UTC (rev 6775)
+++ trunk/l3experimental/xgalley/l3galley.dtx	2016-12-05 05:10:10 UTC (rev 6776)
@@ -2540,7 +2540,7 @@
   {
     \mode_if_vertical:T
       {
-        \int_compare:nNnT \@dbltopnum = \c_minus_one
+        \int_compare:nNnT \@dbltopnum = { - \c_one }
           {
             \dim_compare:nNnT \tex_pagetotal:D < \topskip
               { \tex_hbox:D { } }



More information about the latex3-commits mailing list