[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add c-type variants to fparray functions (e58dc4d75)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Sep 21 08:51:24 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/e58dc4d7556639701be9ccf51bc2ac43f1e299b4
>---------------------------------------------------------------
commit e58dc4d7556639701be9ccf51bc2ac43f1e299b4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Sep 21 07:51:24 2019 +0100
Add c-type variants to fparray functions
>---------------------------------------------------------------
e58dc4d7556639701be9ccf51bc2ac43f1e299b4
l3kernel/l3fparray.dtx | 23 +++++++++++++++++++----
l3kernel/testfiles/m3expl001.luatex.tlg | 6 ++++++
l3kernel/testfiles/m3expl001.ptex.tlg | 6 ++++++
l3kernel/testfiles/m3expl001.tlg | 6 ++++++
l3kernel/testfiles/m3expl001.uptex.tlg | 6 ++++++
l3kernel/testfiles/m3expl001.xetex.tlg | 6 ++++++
l3kernel/testfiles/m3expl003.luatex.tlg | 6 ++++++
l3kernel/testfiles/m3expl003.ptex.tlg | 6 ++++++
l3kernel/testfiles/m3expl003.tlg | 6 ++++++
l3kernel/testfiles/m3expl003.uptex.tlg | 6 ++++++
l3kernel/testfiles/m3expl003.xetex.tlg | 6 ++++++
11 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3fparray.dtx b/l3kernel/l3fparray.dtx
index 6238ad6dd..42b0a671e 100644
--- a/l3kernel/l3fparray.dtx
+++ b/l3kernel/l3fparray.dtx
@@ -102,7 +102,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\fparray_new:Nn, \@@_array_new:nNNN}
+% \begin{macro}{\fparray_new:Nn, \fparray_new:cn}
+% \begin{macro}{\@@_array_new:nNNN}
% Build a three token token list, then define all three tokens to be
% integer arrays of the same size. No need to initialize the data:
% the integer arrays start with zeros, and three zeros denote
@@ -120,6 +121,7 @@
\exp_last_unbraced:Nfo \@@_array_new:nNNNN
{ \int_eval:n {#2} } #1 #1
}
+\cs_generate_variant:Nn \fparray_new:Nn { c }
\cs_new_protected:Npn \@@_array_new:nNNNN #1#2#3#4#5
{
\int_compare:nNnTF {#1} < 0
@@ -136,8 +138,9 @@
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}[EXP]{\fparray_count:N}
+% \begin{macro}[EXP]{\fparray_count:N, \fparray_count:c}
% Size of any of the intarrays, here we pick the third.
% \begin{macrocode}
\cs_new:Npn \fparray_count:N #1
@@ -145,6 +148,7 @@
\exp_after:wN \use_i:nnn
\exp_after:wN \intarray_count:N #1
}
+\cs_generate_variant:Nn \fparray_count:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -178,9 +182,10 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\fparray_gset:Nnn, \fparray_gset:cnn}
% \begin{macro}
% {
-% \fparray_gset:Nnn, \@@_array_gset:NNNNww, \@@_array_gset:w,
+% \@@_array_gset:NNNNww, \@@_array_gset:w,
% \@@_array_gset_recover:Nw, \@@_array_gset_special:nnNNN,
% \@@_array_gset_normal:w
% }
@@ -196,6 +201,7 @@
\int_value:w \int_eval:n {#2} \exp_after:wN ;
\exp:w \exp_end_continue_f:w \@@_parse:n {#3}
}
+\cs_generate_variant:Nn \fparray_gset:Nnn { c }
\cs_new_protected:Npn \@@_array_gset:NNNNww #1#2#3#4#5 ; #6 ;
{
\@@_array_bounds:NNnTF \__kernel_msg_error:nnxxx #4 {#5}
@@ -240,7 +246,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fparray_gzero:N}
+% \begin{macro}{\fparray_gzero:N, \fparray_gzero:c}
% \begin{macrocode}
\cs_new_protected:Npn \fparray_gzero:N #1
{
@@ -254,13 +260,19 @@
#1
}
}
+\cs_generate_variant:Nn \fparray_gzero:N { c }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]
% {
% \fparray_item:Nn,
+% \fparray_item:cn,
% \fparray_item_to_tl:Nn,
+% \fparray_item_to_tl:cn,
+% }
+% \begin{macro}[EXP]
+% {
% \@@_array_item:NwN,
% \@@_array_item:NNNnN,
% \@@_array_item:N,
@@ -276,6 +288,7 @@
\int_value:w \int_eval:n {#2} ;
\@@_to_decimal:w
}
+\cs_generate_variant:Nn \fparray_item:Nn { c }
\cs_new:Npn \fparray_item_to_tl:Nn #1#2
{
\exp_after:wN \@@_array_item:NwN
@@ -283,6 +296,7 @@
\int_value:w \int_eval:n {#2} ;
\@@_to_tl:w
}
+\cs_generate_variant:Nn \fparray_item_to_tl:Nn { c }
\cs_new:Npn \@@_array_item:NwN #1#2 ; #3
{
\@@_array_bounds:NNnTF \__kernel_msg_expandable_error:nnfff #1 {#2}
@@ -323,6 +337,7 @@
{ #9 \s_@@ \@@_chk:w 1 #1 {#8} #7 {#2#3#4#5} {#6} ; }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</initex|package>
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 79ddc01ba..d9fae9bd7 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -4538,19 +4538,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index ac586b12f..9bcd822e1 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -4794,19 +4794,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 2444996cf..5c59ec34d 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -4794,19 +4794,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index e24637be9..917471e40 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -4793,19 +4793,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 15c1b92ff..434bbe7d6 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -4537,19 +4537,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 79ddc01ba..d9fae9bd7 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -4538,19 +4538,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index ac586b12f..9bcd822e1 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -4794,19 +4794,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 2444996cf..5c59ec34d 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -4794,19 +4794,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index e24637be9..917471e40 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -4793,19 +4793,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 15c1b92ff..434bbe7d6 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -4537,19 +4537,25 @@ Defining \g__fp_array_int on line ...
Defining \l__fp_array_loop_int on line ...
\l__fp_array_loop_int=\count...
Defining \fparray_new:Nn on line ...
+Defining \fparray_new:cn on line ...
Defining \__fp_array_new:nNNNN on line ...
Defining \fparray_count:N on line ...
+Defining \fparray_count:c on line ...
Defining \__fp_array_bounds:NNnTF on line ...
Defining \__fp_array_bounds_error:NNn on line ...
Defining \fparray_gset:Nnn on line ...
+Defining \fparray_gset:cnn on line ...
Defining \__fp_array_gset:NNNNww on line ...
Defining \__fp_array_gset_recover:Nw on line ...
Defining \__fp_array_gset:w on line ...
Defining \__fp_array_gset_normal:w on line ...
Defining \__fp_array_gset_special:nnNNN on line ...
Defining \fparray_gzero:N on line ...
+Defining \fparray_gzero:c on line ...
Defining \fparray_item:Nn on line ...
+Defining \fparray_item:cn on line ...
Defining \fparray_item_to_tl:Nn on line ...
+Defining \fparray_item_to_tl:cn on line ...
Defining \__fp_array_item:NwN on line ...
Defining \__fp_array_item:NNNnN on line ...
Defining \__fp_array_item:N on line ...
More information about the latex3-commits
mailing list