% \iffalse meta-comment
%
%% File: l3deprecation.dtx (C) Copyright 2017 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
% license or (at your option) any later version.  The latest version
% of this license is in the file
%
%    http://www.latex-project.org/lppl.txt
%
% This file is part of the "l3kernel bundle" (The Work in LPPL)
% and all files in that bundle must be distributed together.
%
% -----------------------------------------------------------------------
%
% The development version of the bundle can be found at
%
%    https://github.com/latex3/latex3
%
% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{^^A
%   The \pkg{l3deprecation} package\\ Deprecation errors^^A
% }
%
% \author{^^A
%  The \LaTeX3 Project\thanks
%    {^^A
%      E-mail:
%        \href{mailto:latex-team@latex-project.org}
%          {latex-team@latex-project.org}^^A
%    }^^A
% }
%
% \date{Released 2017/05/29}
%
% \maketitle
%
% \begin{documentation}
%
% \section{\pkg{l3deprecation} documentation}
%
% A few commands have had to be deprecated over the years.  This module
% defines deprecated and deleted commands to produce an error.
%
% \begin{macro}{\deprecation_error:}
%   \begin{syntax}
%     \cs{deprecation_error:}
%   \end{syntax}
%   Defines commands that will soon become deprecated to produce errors.
% \end{macro}
%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3deprecation} implementation}
%
%    \begin{macrocode}
%<*initex|package>
%    \end{macrocode}
%
%    \begin{macrocode}
%<@@=deprecation>
%    \end{macrocode}
%
% \begin{macro}[aux]{\@@_error:Nnn}
%   The \tn{outer} definition here ensures the command will not appear
%   in an argument.  Use this auxiliary on all commands that have been
%   removed since 2015.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_error:Nnn #1#2#3
  {
    \etex_protected:D \tex_outer:D \tex_edef:D #1
      {
        \exp_not:N \__msg_kernel_expandable_error:nnnnn
          { kernel } { deprecated-command }
          { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} }
        \exp_not:N \__msg_kernel_error:nnxxx
          { kernel } { deprecated-command }
          { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} }
      }
  }
\@@_error:Nnn \c_job_name_tl { \c_sys_jobname_str } { 2017-01-01 }
\@@_error:Nnn \dim_case:nnn { \dim_case:nnF } { 2015-07-14 }
\@@_error:Nnn \int_case:nnn { \int_case:nnF } { 2015-07-14 }
\@@_error:Nnn \int_from_binary:n { \int_from_bin:n } { 2016-01-05 }
\@@_error:Nnn \int_from_hexadecimal:n { \int_from_hex:n } { 2016-01-05 }
\@@_error:Nnn \int_from_octal:n { \int_from_oct:n } { 2016-01-05 }
\@@_error:Nnn \int_to_binary:n { \int_to_bin:n } { 2016-01-05 }
\@@_error:Nnn \int_to_hexadecimal:n { \int_to_hex:n } { 2016-01-05 }
\@@_error:Nnn \int_to_octal:n { \int_to_oct:n } { 2016-01-05 }
\@@_error:Nnn \luatex_if_engine_p: { \sys_if_engine_luatex_p: } { 2017-01-01 }
\@@_error:Nnn \luatex_if_engine:F { \sys_if_engine_luatex:F } { 2017-01-01 }
\@@_error:Nnn \luatex_if_engine:T { \sys_if_engine_luatex:T } { 2017-01-01 }
\@@_error:Nnn \luatex_if_engine:TF { \sys_if_engine_luatex:TF } { 2017-01-01 }
\@@_error:Nnn \pdftex_if_engine_p: { \sys_if_engine_pdftex_p: } { 2017-01-01 }
\@@_error:Nnn \pdftex_if_engine:F { \sys_if_engine_pdftex:F } { 2017-01-01 }
\@@_error:Nnn \pdftex_if_engine:T { \sys_if_engine_pdftex:T } { 2017-01-01 }
\@@_error:Nnn \pdftex_if_engine:TF { \sys_if_engine_pdftex:TF } { 2017-01-01 }
\@@_error:Nnn \prop_get:cn { \prop_item:cn } { 2016-01-05 }
\@@_error:Nnn \prop_get:Nn { \prop_item:Nn } { 2016-01-05 }
\@@_error:Nnn \quark_if_recursion_tail_break:N { } { 2015-07-14 }
\@@_error:Nnn \quark_if_recursion_tail_break:n { }{ 2015-07-14 }
\@@_error:Nnn \scan_align_safe_stop: { protected~commands } { 2017-01-01 }
\@@_error:Nnn \str_case:nnn { \str_case:nnF } { 2015-07-14 }
\@@_error:Nnn \str_case:onn { \str_case:onF } { 2015-07-14 }
\@@_error:Nnn \str_case_x:nnn { \str_case_x:nnF } { 2015-07-14 }
\@@_error:Nnn \tl_case:cnn { \tl_case:cnF } { 2015-07-14 }
\@@_error:Nnn \tl_case:Nnn { \tl_case:NnF } { 2015-07-14 }
\@@_error:Nnn \xetex_if_engine_p: { \sys_if_engine_xetex_p: } { 2017-01-01 }
\@@_error:Nnn \xetex_if_engine:F { \sys_if_engine_xetex:F } { 2017-01-01 }
\@@_error:Nnn \xetex_if_engine:T { \sys_if_engine_xetex:T } { 2017-01-01 }
\@@_error:Nnn \xetex_if_engine:TF { \sys_if_engine_xetex:TF } { 2017-01-01 }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\deprecation_error:}
%   Some commands were more recently deprecated and not yet removed;
%   only make these into errors if the user requests it.  This allows
%   testing code even if it relies on other packages: load all other
%   packages, call \cs{deprecation_error:}, and load the code that one is
%   interested in testing.
%
%   One of the deprecated syntaxes is within floating point expressions;
%   to keep related code in the same place we define in \pkg{l3fp-parse}
%   a version of \cs{__fp_parse_round:Nw} producing an error.
%    \begin{macrocode}
\cs_new_protected:Npn \deprecation_error:
  {
    \@@_error:Nnn \tl_to_lowercase:n { } { 2017-12-31 }
    \@@_error:Nnn \tl_to_uppercase:n { } { 2017-12-31 }
    \@@_error:Nnn \ior_get_str:NN { \ior_str_get:NN } { 2017-12-31 }
    \@@_error:Nnn \box_resize:Nnn { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2018-12-31 }
    \@@_error:Nnn \box_resize:cnn { \box_resize_to_wd_and_ht_plus_dp:cnn } { 2018-12-31 }
    \@@_error:Nnn \c_minus_one { - 1 } { 2018-12-31 }
    \@@_error:Nnn \sort_ordered: { \sort_return_same: } { 2018-12-31 }
    \@@_error:Nnn \sort_reversed: { \sort_return_swapped: } { 2018-12-31 }
    \cs_set_eq:NN \__fp_parse_round:Nw \__fp_parse_round_deprecation_error:Nw
    \cs_set_eq:NN \deprecation_error: \scan_stop:
  }
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</initex|package>
%    \end{macrocode}
%
% \end{implementation}
%
% \PrintIndex
