[latex3-commits] [git/LaTeX3-latex3-latex3] master: Give names to uses of \fontdimen and \hyphenchar in l3intarray (82eac39)
Bruno Le Floch
bruno at le-floch.fr
Fri May 4 23:21:01 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/82eac395b501b3f1f9566622a1a798a2807e145a
>---------------------------------------------------------------
commit 82eac395b501b3f1f9566622a1a798a2807e145a
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Fri May 4 23:18:26 2018 +0200
Give names to uses of \fontdimen and \hyphenchar in l3intarray
>---------------------------------------------------------------
82eac395b501b3f1f9566622a1a798a2807e145a
l3kernel/l3intarray.dtx | 18 +++++++++++++-----
l3kernel/testfiles/m3expl001.luatex.tlg | 2 ++
l3kernel/testfiles/m3expl001.ptex.tlg | 2 ++
l3kernel/testfiles/m3expl001.tlg | 2 ++
l3kernel/testfiles/m3expl001.uptex.tlg | 2 ++
l3kernel/testfiles/m3expl001.xetex.tlg | 2 ++
l3kernel/testfiles/m3expl003.luatex.tlg | 2 ++
l3kernel/testfiles/m3expl003.ptex.tlg | 2 ++
l3kernel/testfiles/m3expl003.tlg | 2 ++
l3kernel/testfiles/m3expl003.uptex.tlg | 2 ++
l3kernel/testfiles/m3expl003.xetex.tlg | 2 ++
11 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index 1943c0f..e1e9353 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -143,6 +143,14 @@
%
% \subsection{Allocating arrays}
%
+% \begin{macro}{\@@_entry:w, \@@_count:w}
+% We use these primitives quite a lot in this module.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_entry:w \tex_fontdimen:D
+\cs_new_eq:NN \@@_count:w \tex_hyphenchar:D
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\c_@@_sp_dim}
% Used to convert integers to dimensions fast.
% \begin{macrocode}
@@ -180,7 +188,7 @@
\int_gincr:N \g_@@_font_int
\tex_global:D \tex_font:D #1
= cmr10~at~ \g_@@_font_int \c_@@_sp_dim \scan_stop:
- \tex_hyphenchar:D #1 = \int_eval:n {#2} \scan_stop:
+ \@@_count:w #1 = \int_eval:n {#2} \scan_stop:
\int_compare:nNnT { \intarray_count:N #1 } < 0
{
\__kernel_msg_error:nnx { kernel } { negative-intarray-size }
@@ -197,7 +205,7 @@
% \begin{macro}[EXP]{\intarray_count:N}
% Size of an array.
% \begin{macrocode}
-\cs_new:Npn \intarray_count:N #1 { \tex_the:D \tex_hyphenchar:D #1 }
+\cs_new:Npn \intarray_count:N #1 { \int_value:w \@@_count:w #1 }
% \end{macrocode}
% \end{macro}
%
@@ -239,7 +247,7 @@
% are within bounds.
% \begin{macrocode}
\cs_new_protected:Npn \__kernel_intarray_gset:Nnn #1#2#3
- { \tex_fontdimen:D #2 #1 #3 \c_@@_sp_dim }
+ { \@@_entry:w #2 #1 #3 \c_@@_sp_dim }
\cs_new_protected:Npn \intarray_gset:Nnn #1#2#3
{
\exp_after:wN \@@_gset:Nww
@@ -293,7 +301,7 @@
\cs_new_protected:Npn \intarray_gzero:N #1
{
\int_step_inline:nn { \intarray_count:N #1 }
- { \tex_fontdimen:D ##1 #1 \c_zero_dim }
+ { \@@_entry:w ##1 #1 \c_zero_dim }
}
% \end{macrocode}
% \end{macro}
@@ -306,7 +314,7 @@
% suitable for \cs{int_value:w}.
% \begin{macrocode}
\cs_new:Npn \__kernel_intarray_item:Nn #1#2
- { \int_value:w \tex_fontdimen:D #2 #1 }
+ { \int_value:w \@@_entry:w #2 #1 }
\cs_new:Npn \intarray_item:Nn #1#2
{
\exp_after:wN \@@_item:Nw
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 73e2967..fe9d7b4 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -4219,6 +4219,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index cd15f31..c7c211b 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index cee6080..9f51fe5 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 0951cb8..6a8c640 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 5aeb4cb..9c64dfb 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -4193,6 +4193,8 @@ Defining message LaTeX/kernel/fp-no-random on line ...
Defining \__fp_rand_o:Nw on line ...
Defining \__fp_randint_o:Nw on line ...
Defining \int_rand:nn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 73e2967..fe9d7b4 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -4219,6 +4219,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index cd15f31..c7c211b 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index cee6080..9f51fe5 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 0951cb8..6a8c640 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -4473,6 +4473,8 @@ Defining \__fp_randint:ww on line ...
Defining \__fp_randint_narrow:n on line ...
Defining \__fp_randint_narrow:nn on line ...
Defining \__fp_randint_narrow:nnn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 5aeb4cb..9c64dfb 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -4193,6 +4193,8 @@ Defining message LaTeX/kernel/fp-no-random on line ...
Defining \__fp_rand_o:Nw on line ...
Defining \__fp_randint_o:Nw on line ...
Defining \int_rand:nn on line ...
+Defining \__intarray_entry:w on line ...
+Defining \__intarray_count:w on line ...
Defining \c__intarray_sp_dim on line ...
\c__intarray_sp_dim=\dimen...
Defining \g__intarray_font_int on line ...
More information about the latex3-commits
mailing list