summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3chk.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3chk.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3chk.sty81
1 files changed, 40 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3chk.sty b/Master/texmf-dist/tex/latex/expl3/l3chk.sty
index 7900e8409d0..b059aa3167e 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3chk.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3chk.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3chk.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3chk.dtx Copyright (C) 1990-2006,2009 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
@@ -33,7 +33,7 @@
%%
%% The development version of the bundle can be found at
%%
-%% http://www.latex-project.org/cgi-bin/cvsweb.cgi/
+%% http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
@@ -49,50 +49,49 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: l3chk.dtx 621 2007-09-01 20:14:19Z morten $
+\GetIdInfo$Id: l3chk.dtx 1362 2009-05-28 20:19:21Z joseph $
{L3 Experimental check module}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
-\RequirePackage{l3basics}
-\RequirePackage{l3int,l3prg}
-\def_new:Npn \chk_local:N #1{
- \exp_after:NN \chk_local_aux:w \token_to_string:N#1\q_stop}
+\package_check_loaded_expl:
+\cs_new_nopar:Npn \chk_local:N #1{
+ \exp_after:wN \chk_local_aux:w \token_to_str:N#1\q_stop}
-\def_new:Npn \chk_local_aux:w #1#2#3\q_stop{
+\cs_new_nopar:Npn \chk_local_aux:w #1#2#3\q_stop{
\if_num:w\tex_uccode:D`#2=`G\scan_stop:
- \err_latex_bug:x{Local~mismatch:~local~function~called~with~
+ \msg_kernel_bug:x {Local~mismatch:~local~function~called~with~
global~variable:^^J\text_put_four_sp: #1#2#3~
on~line~\tex_the:D\tex_inputlineno:D}
\else:
\if_num:w\tex_uccode:D`#2=`L\scan_stop:
\else:
- \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ \msg_kernel_bug:x {Variable~mismatch:~function~not~called~with~
proper~variable:^^J\text_put_four_sp: #1#2#3~
on~line~\tex_the:D\tex_inputlineno:D}\fi:
\fi:}
\tex_newlinechar:D=`\^^J
-\def_new:Npn \chk_global:N #1{\exp_after:NN
- \chk_global_aux:w \token_to_string:N#1\q_stop}
-\def_new:Npn \chk_global_aux:w #1#2#3\q_stop{
+\cs_new_nopar:Npn \chk_global:N #1{\exp_after:wN
+ \chk_global_aux:w \token_to_str:N#1\q_stop}
+\cs_new_nopar:Npn \chk_global_aux:w #1#2#3\q_stop{
\if_num:w\tex_uccode:D`#2=`L\scan_stop:
- \err_latex_bug:x{Global~mismatch:~global~function~called~with~
+ \msg_kernel_bug:x {Global~mismatch:~global~function~called~with~
local~variable:~#1#2#3~
on~line~\tex_the:D\tex_inputlineno:D}
\else:
\if_num:w\tex_uccode:D`#2=`G\scan_stop:
\else:
- \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ \msg_kernel_bug:x {Variable~mismatch:~function~not~called~with~
proper~variable:~#1#2#3~
on~line~\tex_the:D\tex_inputlineno:D}\fi:\fi:}
-\def_new:Npn \pref_global_chk: {
- \gdef:Npn \chk_local_or_pref_global:N ##1{
+\cs_new_nopar:Npn \pref_global_chk: {
+ \cs_gset_nopar:Npn \chk_local_or_pref_global:N ##1{
\chk_global:N ##1
- \glet:NN \chk_local_or_pref_global:N \chk_local:N}
+ \cs_gset_eq:NN \chk_local_or_pref_global:N \chk_local:N}
\pref_global:D}
-\let_new:NN \chk_local_or_pref_global:N \chk_local:N
-\def_new:Npn \chk_var_or_const:N #1{\exp_after:NN
- \chk_var_or_const_aux:w \token_to_string:N#1\q_stop }
-\def_new:Npn \chk_var_or_const_aux:w #1#2#3\q_stop {
+\cs_new_eq:NN \chk_local_or_pref_global:N \chk_local:N
+\cs_new_nopar:Npn \chk_var_or_const:N #1{\exp_after:wN
+ \chk_var_or_const_aux:w \token_to_str:N#1\q_stop }
+\cs_new_nopar:Npn \chk_var_or_const_aux:w #1#2#3\q_stop {
\if_num:w\tex_uccode:D`#2=`L\scan_stop:
\else:
\if_num:w\tex_uccode:D`#2=`G\scan_stop:
@@ -101,24 +100,24 @@
\else:
\if_charcode:w#2q\scan_stop:
\else:
- \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ \msg_kernel_bug:x {Variable~mismatch:~function~not~called~with~
proper~variable:^^J\text_put_four_sp: #1#2#3~
on~line~\tex_the:D\tex_inputlineno:D}\fi:\fi:\fi:
\fi:}
-\def_new:Npn\donotcheck{
- \let:NN \chk_global:N \use_none:n
- \let:NN \chk_local:N \use_none:n
- \let:NN \chk_local_or_pref_global:N \use_none:n
- \let:NN \pref_global_chk: \pref_global:D
- \let:NN \chk_new_cs:N \use_none:n
- \let:NN \chk_exist_cs:N \use_none:n
- \let:NN \chk_var_or_const:N \use_none:n
- \let:NN \cs_record_name:N \use_none:n
- \let:NN \cs_record_name:c \use_none:n
- \let:NN \cs_record_meaning:N \use_none:n
- \let:NN \register_record_name:N \use_none:n
+\cs_new_nopar:Npn\donotcheck{
+ \cs_set_eq:NN \chk_global:N \use_none:n
+ \cs_set_eq:NN \chk_local:N \use_none:n
+ \cs_set_eq:NN \chk_local_or_pref_global:N \use_none:n
+ \cs_set_eq:NN \pref_global_chk: \pref_global:D
+ \cs_set_eq:NN \chk_if_free_cs:N \use_none:n
+ \cs_set_eq:NN \chk_exist_cs:N \use_none:n
+ \cs_set_eq:NN \chk_var_or_const:N \use_none:n
+ \cs_set_eq:NN \cs_record_name:N \use_none:n
+ \cs_set_eq:NN \cs_record_name:c \use_none:n
+ \cs_set_eq:NN \cs_record_meaning:N \use_none:n
+ \cs_set_eq:NN \register_record_name:N \use_none:n
}
-\def_new:Npn\absolutelytracingall{
+\cs_new_nopar:Npn\absolutelytracingall{
\pref_global:D\g_trace_commands_status\c_two
\pref_global:D\g_trace_statistics_status\c_two
\pref_global:D\g_trace_pages_status\c_one
@@ -131,7 +130,7 @@
\pref_global:D\g_trace_box_depth_int\c_ten_thousand
\pref_global:D\g_trace_online_status\c_one
\tex_errorstopmode:D}
-\def_new:Npn\tracingoff{
+\cs_new_nopar:Npn\tracingoff{
\pref_global:D\g_trace_online_status\c_zero
\pref_global:D\g_trace_commands_status\c_zero
\pref_global:D\g_trace_statistics_status\c_zero
@@ -144,15 +143,15 @@
\pref_global:D\g_trace_box_breadth_int\c_zero
\pref_global:D\g_trace_box_depth_int\c_zero
}
-\def_new:Npn\traceon#1{
+\cs_new_nopar:Npn\traceon#1{
\clist_map_inline:nn {#1}{
- \cs_free:cF{g_trace_ ##1 _status}
+ \cs_if_free:cF{g_trace_ ##1 _status}
{\int_gincr:c{g_trace_ ##1 _status}}
}
}
-\def_new:Npn\traceoff#1{
+\cs_new_nopar:Npn\traceoff#1{
\clist_map_inline:nn {#1}{
- \cs_free:cF{g_trace_ ##1 _status}
+ \cs_if_free:cF{g_trace_ ##1 _status}
{\int_gdecr:c{g_trace_ ##1 _status}}
}
}