summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx64
1 files changed, 53 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 599957933fe..3613101e0b6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prg.dtx 4642 2014-01-04 17:28:32Z joseph $
+\GetIdInfo$Id: l3prg.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Control structures}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -694,14 +695,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Primitive conditionals}
%
% \begin{macro}{\if_bool:N}
@@ -823,6 +816,55 @@
% \end{macro}
% \end{macro}
%
+% Booleans are not based on token lists but do need checking: this
+% code complements similar material in \pkg{l3tl}.
+% \begin{macrocode}
+%<*package>
+\tex_ifodd:D \l@expl@check@declarations@bool
+ \cs_set_protected:Npn \bool_set_true:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_set_false:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_gset_true:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_gset_false:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_set_eq:NN #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1
+ }
+ \cs_set_protected:Npn \bool_gset_eq:NN #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1
+ }
+ \cs_set_protected:Npn \bool_set:Nn #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+ \cs_set_protected:Npn \bool_gset:Nn #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+\tex_fi:D
+%</package>
+% \end{macrocode}
+%
% \begin{macro}[pTF]{\bool_if:N, \bool_if:c}
% \UnitTested
% Straight forward here. We could optimize here if we wanted to as