Skip to content

Commit 7ddbe33

Browse files
committed
cs_new:Nn replaced by cs_new:Npn
1 parent dcd356e commit 7ddbe33

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ file
88

99
https://www.latex-project.org/lppl.txt
1010

11-
Copyright (C) 2018 by Jonathan P. Spratte
11+
Copyright (C) 2018-2019 by Jonathan P. Spratte
1212

1313
This package provides means to create duckified dummy contents. The following
1414
macros are available:

duckuments.dtx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% \iffalse meta-comment
22
%
3-
% File: duckuments.dtx Copyright (C) 2018 Jonathan P. Spratte
3+
% File: duckuments.dtx Copyright (C) 2018-2019 Jonathan P. Spratte
44
%
55
% It may be distributed and/or modified under the conditions of the LaTeX
66
% Project Public License (LPPL), either version 1.3c of this license or (at your
@@ -26,7 +26,7 @@ Released under the LaTeX Project Public License v1.3c or later
2626
See http://www.latex-project.org/lppl.txt
2727
--------------------------------------------------------------
2828

29-
Copyright (C) 2018 Jonathan P. Spratte
29+
Copyright (C) 2018-2019 Jonathan P. Spratte
3030

3131
This work may be distributed and/or modified under the conditions of the
3232
LaTeX Project Public License (LPPL), either version 1.3c of this license or
@@ -60,13 +60,13 @@ and the derived files duckuments.pdf,
6060
%
6161
%<*driver|pkg>
6262
\RequirePackage{xparse,letltxmacro,l3keys2e}
63-
\def\duckuments@version{0.4b}
64-
\def\duckuments@date{2018/09/13}
63+
\def\duckuments@version{0.4c}
64+
\def\duckuments@date{2019/02/03}
6565
%</driver|pkg>
6666
%
6767
%<*driver>
6868
\ProvidesFile{duckuments.dtx}
69-
[\csname duckuments@date\endcsname\ minimal working duckuments]
69+
[\csname duckuments@date\endcsname\space minimal working duckuments]
7070
\documentclass{l3doc}
7171
\usepackage{duckuments}
7272
\usepackage{enumitem}
@@ -562,7 +562,7 @@ and the derived files duckuments.pdf,
562562
%
563563
% \begin{macro}{\duckuments_patch_see_duckumentation:}^^A>>>
564564
% \begin{macrocode}
565-
\cs_new:Nn \duckuments_patch_see_duckumentation:
565+
\cs_new:Npn \duckuments_patch_see_duckumentation:
566566
{%>>>
567567
\cs_set:Nn \msg_see_documentation_text:n
568568
{
@@ -822,7 +822,7 @@ and the derived files duckuments.pdf,
822822
%
823823
% \begin{macro}{\duckuments_list_example:n}^^A>>>
824824
% \begin{macrocode}
825-
\cs_new_protected_nopar:Nn \duckuments_list_example:n
825+
\cs_new_protected_nopar:Npn \duckuments_list_example:n #1
826826
{%>>>
827827
\subsection{Example\ for\ ducks\ (#1)}
828828
\ducklist { #1 }
@@ -890,7 +890,7 @@ and the derived files duckuments.pdf,
890890
%
891891
% \begin{macro}{\duckuments_patch_includegraphics:}^^A>>>
892892
% \begin{macrocode}
893-
\cs_new_protected_nopar:Nn \duckuments_patch_includegraphics:
893+
\cs_new_protected_nopar:Npn \duckuments_patch_includegraphics:
894894
{%>>>
895895
\@ifpackageloaded { graphicx }
896896
{
@@ -921,7 +921,7 @@ and the derived files duckuments.pdf,
921921
%
922922
% \begin{macro}{\duckuments_blindduck_range_test:n}^^A>>>
923923
% \begin{macrocode}
924-
\cs_new_protected:Nn \duckuments_blindduck_range_test:n
924+
\cs_new_protected:Npn \duckuments_blindduck_range_test:n #1
925925
{%>>>
926926
\regex_match:NnTF \c_duckuments_range_regex { #1 }
927927
{
@@ -969,7 +969,7 @@ and the derived files duckuments.pdf,
969969
%
970970
% \begin{macro}{\duckuments_blindduck_set_text:nn}^^A>>>
971971
% \begin{macrocode}
972-
\cs_new:Nn \duckuments_blindduck_set_text:nn
972+
\cs_new:Npn \duckuments_blindduck_set_text:nn #1 #2
973973
{%>>>
974974
\def \duckuments@blindduck@text
975975
{
@@ -984,7 +984,7 @@ and the derived files duckuments.pdf,
984984
%
985985
% \begin{macro}{\duckuments_blindduck_set_next_start:n}^^A>>>
986986
% \begin{macrocode}
987-
\cs_new:Nn \duckuments_blindduck_set_next_start:n
987+
\cs_new:Npn \duckuments_blindduck_set_next_start:n #1
988988
{%>>>
989989
\int_gset:Nn \g_duckuments_blindduck_start_int
990990
{ \int_mod:nn { #1 } { \c_duckuments_blindduck_pars_int } + \c_one }
@@ -994,7 +994,7 @@ and the derived files duckuments.pdf,
994994
%
995995
% \begin{macro}{\duckuments_blindduck_single_par:n}^^A>>>
996996
% \begin{macrocode}
997-
\cs_new:Nn \duckuments_blindduck_single_par:n
997+
\cs_new:Npn \duckuments_blindduck_single_par:n #1
998998
{%>>>
999999
\bool_if:nTF
10001000
{
@@ -1016,7 +1016,7 @@ and the derived files duckuments.pdf,
10161016
%
10171017
% \begin{macro}{\duckuments_blindduck_par_loop:n}^^A>>>
10181018
% \begin{macrocode}
1019-
\cs_new:Nn \duckuments_blindduck_par_loop:n
1019+
\cs_new:Npn \duckuments_blindduck_par_loop:n #1
10201020
{%>>>
10211021
\duckuments_blindduck_single_par:n { #1 }
10221022
\par
@@ -1026,7 +1026,7 @@ and the derived files duckuments.pdf,
10261026
%
10271027
% \begin{macro}{\duckuments_starred:n}^^A>>>
10281028
% \begin{macrocode}
1029-
\cs_new_protected:Nn \duckuments_starred:n
1029+
\cs_new_protected:Npn \duckuments_starred:n #1
10301030
{%>>>
10311031
\IfBooleanTF { #1 }
10321032
{ \def\ProcessedArgument{*} }
@@ -1053,17 +1053,17 @@ and the derived files duckuments.pdf,
10531053
% \end{macrocode}
10541054
% Initialize the S array:
10551055
% \begin{macrocode}
1056-
\cs_new_protected_nopar:Nn \duckuments_RCiv_S_new:n
1056+
\cs_new_protected_nopar:Npn \duckuments_RCiv_S_new:n #1
10571057
{ \int_new:c { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } }
1058-
\cs_new_protected_nopar:Nn \duckuments_RCiv_S_set:nn
1058+
\cs_new_protected_nopar:Npn \duckuments_RCiv_S_set:nn #1 #2
10591059
{ \int_gset:cn { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } { #2 } }
1060-
\cs_new_nopar:Nn \duckuments_RCiv_S_get:n
1060+
\cs_new_nopar:Npn \duckuments_RCiv_S_get:n #1
10611061
{ \int_use:c { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } }
1062-
\cs_new_protected_nopar:Nn \duckuments_RCiv_key_new:n
1062+
\cs_new_protected_nopar:Npn \duckuments_RCiv_key_new:n #1
10631063
{ \int_new:c { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } }
1064-
\cs_new_protected_nopar:Nn \duckuments_RCiv_key_set:nn
1064+
\cs_new_protected_nopar:Npn \duckuments_RCiv_key_set:nn #1 #2
10651065
{ \int_gset:cn { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } { #2 } }
1066-
\cs_new_nopar:Nn \duckuments_RCiv_key_get:n
1066+
\cs_new_nopar:Npn \duckuments_RCiv_key_get:n #1
10671067
{ \int_use:c { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } }
10681068
\int_step_inline:nnnn { 0 } { 1 } { 255 }
10691069
{
@@ -1087,7 +1087,7 @@ and the derived files duckuments.pdf,
10871087
{ \int_from_alph:n { #1 } }
10881088
\int_gincr:N \g_duckuments_RCiv_keylength_int
10891089
}
1090-
\cs_new_protected_nopar:Nn \duckuments_swap_S_entries:nn
1090+
\cs_new_protected_nopar:Npn \duckuments_swap_S_entries:nn #1 #2
10911091
{
10921092
\int_set_eq:Nc
10931093
\g_duckuments_tmpa_int
@@ -1100,9 +1100,9 @@ and the derived files duckuments.pdf,
11001100
\g_duckuments_tmpa_int
11011101
}
11021102
\int_gset:Nn \g_duckuments_RCiv_keylength_int { 5 }
1103-
\cs_new:Nn \duckuments_gadd_mod:Nnn
1103+
\cs_new:Npn \duckuments_gadd_mod:Nnn #1 #2 #3
11041104
{ \int_gset:Nn #1 { \int_mod:nn { #1 + ( #2 ) } { #3 } } }
1105-
\cs_new:Nn \duckuments_gadd_mod_Slength:Nn
1105+
\cs_new:Npn \duckuments_gadd_mod_Slength:Nn #1 #2
11061106
{
11071107
\duckuments_gadd_mod:Nnn #1
11081108
{ #2 } { \c_duckuments_RCiv_Slength_int }
@@ -1124,7 +1124,7 @@ and the derived files duckuments.pdf,
11241124
% Provide a function which gets the next random number and sets
11251125
% |\duckuments_random_page:| to it.
11261126
% \begin{macrocode}
1127-
\cs_new_protected_nopar:Nn \duckuments_get_random_page:
1127+
\cs_new_protected_nopar:Npn \duckuments_get_random_page:
11281128
{
11291129
\duckuments_gadd_mod_Slength:Nn \g_duckuments_RCiv_i_int { \c_one }
11301130
\duckuments_gadd_mod_Slength:Nn \g_duckuments_RCiv_j_int
@@ -1147,15 +1147,15 @@ and the derived files duckuments.pdf,
11471147
}
11481148
}
11491149
}
1150-
\cs_new:Nn \duckuments_random_page: { 1 }
1150+
\cs_new:Npn \duckuments_random_page: { 1 }
11511151
}
11521152
% \end{macrocode}
11531153
% Both \pdfTeX\ and \LuaTeX\ don't need the RC4 as there |\int_random:nn| is
11541154
% available.
11551155
% \begin{macrocode}
11561156
{
1157-
\cs_new:Nn \duckuments_get_random_page: {}
1158-
\cs_new:Nn \duckuments_random_page:
1157+
\cs_new:Npn \duckuments_get_random_page: {}
1158+
\cs_new:Npn \duckuments_random_page:
11591159
{ \int_rand:nn { 1 } { \c_duckuments_example_pages_int } }
11601160
}
11611161
% \end{macrocode}

0 commit comments

Comments
 (0)