[latex3-commits] [git/LaTeX3-latex3-latex3] cctab: l3cctab minor code streamlining (7345f58a9)

Bruno Le Floch bruno at le-floch.fr
Fri Jun 26 21:59:29 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : cctab
Link       : https://github.com/latex3/latex3/commit/7345f58a91301e5672c816eb14fe0f0a743203ef

>---------------------------------------------------------------

commit 7345f58a91301e5672c816eb14fe0f0a743203ef
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Fri Jun 26 21:59:20 2020 +0200

    l3cctab minor code streamlining


>---------------------------------------------------------------

7345f58a91301e5672c816eb14fe0f0a743203ef
 l3kernel/l3cctab.dtx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/l3kernel/l3cctab.dtx b/l3kernel/l3cctab.dtx
index 251db71de..b42f6c414 100644
--- a/l3kernel/l3cctab.dtx
+++ b/l3kernel/l3cctab.dtx
@@ -226,15 +226,15 @@
 %<*initex>
         \int_gadd:Nn \g_@@_allocate_int { 2 }
         \int_compare:nNnTF
-          \g_@@_allocate_int < { \c_max_register_int + 1 }
-           {
-             \tex_global:D \tex_chardef:D #1 \g_@@_allocate_int
-             \tex_initcatcodetable:D #1
-           }
+          \g_@@_allocate_int > \c_max_register_int
            {
              \__kernel_msg_fatal:nnx
                { kernel } { out-of-registers } { cctab }
            }
+           {
+             \tex_global:D \tex_chardef:D #1 \g_@@_allocate_int
+             \tex_initcatcodetable:D #1
+           }
 %</initex>
 %<*package>
         \newcatcodetable #1
@@ -258,9 +258,8 @@
     \cs_new_protected:Npn \@@_end:
       {
         \int_gsub:Nn \g_@@_stack_int { 2 }
-        \seq_if_empty:NTF \g_@@_stack_seq
+        \seq_gpop:NNF \g_@@_stack_seq \l_@@_tmp_tl
           { \tl_set:Nn \l_@@_tmp_tl { 0 } }
-          { \seq_gpop:NN \g_@@_stack_seq \l_@@_tmp_tl }
         \tex_catcodetable:D \l_@@_tmp_tl \scan_stop:
       }
 %    \end{macrocode}





More information about the latex3-commits mailing list.