diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx index ccc13714253..87a59147606 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2017/07/15} +% \date{Released 2017/07/19} % % \maketitle % @@ -86,6 +86,7 @@ % \begin{macro}[aux, EXP] % { % \@@_parse_word_round:N, \@@_parse_round:Nw, +% \@@_parse_round_no_error:Nw, % \@@_parse_round_deprecation_error:Nw % } % \begin{macro}[aux, deprecated = 2017-12-31]{round+, round0, round-} @@ -95,9 +96,8 @@ % set up. When \pkg{l3doc} complains, remove the syntax by % removing everything until the last \cs{fi:} in % \cs{@@_parse_word_round:N} (and getting rid of the unused -% definitions of \cs{@@_parse_round:Nw} and -% \cs{@@_parse_round_deprecation_error:Nw} here and in -% \pkg{l3deprecation}, perhaps also of the |fp-deprecated| error). +% definitions of \cs{@@_parse_round:Nw} and so on, as well as the +% |fp-deprecated| error in \pkg{l3fp-parse}). % \begin{macrocode} \cs_new:Npn \@@_parse_word_round:N #1#2 { @@ -116,17 +116,35 @@ \@@_round_o:Nw \@@_round_to_nearest:NNN #1 #2 } -\cs_new:Npn \@@_parse_round:Nw - #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 } -\cs_new:Npn \@@_parse_round_deprecation_error:Nw - #1 #2 \@@_round_to_nearest:NNN #3#4 +\__debug:TF { - \@@_error:nnfn { fp-deprecated } { round#4() } + \tl_gput_right:Nn \g__debug_deprecation_on_tl { - \str_case:nn {#2} - { { + } { ceil } { 0 } { trunc } { - } { floor } } - } { } - #2 #1 #3 + \cs_set_eq:NN \@@_parse_round:Nw + \@@_parse_round_deprecation_error:Nw + } + \tl_gput_right:Nn \g__debug_deprecation_off_tl + { + \cs_set_eq:NN \@@_parse_round:Nw + \@@_parse_round_no_error:Nw + } + \cs_new:Npn \@@_parse_round_deprecation_error:Nw + #1 #2 \@@_round_to_nearest:NNN #3#4 + { + \@@_error:nnfn { fp-deprecated } { round#4() } + { + \str_case:nn {#2} + { { + } { ceil } { 0 } { trunc } { - } { floor } } + } { } + #2 #1 #3 + } + \cs_new:Npn \@@_parse_round_no_error:Nw + #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 } + \cs_new_eq:NN \@@_parse_round:Nw \@@_parse_round_no_error:Nw + } + { + \cs_new:Npn \@@_parse_round:Nw + #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 } } % \end{macrocode} % \end{macro} |