summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/m-timing.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-timing.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/m-timing.mkiv22
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-timing.mkiv b/Master/texmf-dist/tex/context/base/m-timing.mkiv
index e5413ddb110..5502768f697 100644
--- a/Master/texmf-dist/tex/context/base/m-timing.mkiv
+++ b/Master/texmf-dist/tex/context/base/m-timing.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\ifx\ShowNamedUsage\undefined \else \endinput \fi
+\ifdefined\ShowNamedUsage \endinput \fi
%D Written at the end of 2007, this module is dedicated to Taco. Reaching this
%D point in \LUATEX\ was a non trivial effort. By visualizing a bit what happens
@@ -37,7 +37,7 @@
local progress = moduledata.progress
function progress.show(filename,parameters,nodes,other)
- for n, name in pairs(parameters or progress.parameters(filename)) do
+ for n, name in pairs(parameters or progress.parameters()) do
context.ShowNamedUsage(filename or progress.defaultfilename,name,other or "")
end
for n, name in pairs(nodes or progress.nodes(filename)) do
@@ -54,13 +54,14 @@ end
\ctxlua{luatex.registerstopactions(function() moduledata.progress.save() end)}
\stopnotmode
-\def\ShowNamedUsage#1#2#3%
- {\setbox\scratchbox\vbox\bgroup\startMPcode
+\unexpanded\def\ShowNamedUsage#1#2#3%
+ {\setbox\scratchbox\vbox\bgroup
+ \startMPcode
begingroup ; save p, q, b, h, w ;
path p, q, b ; numeric h, w ;
p := \cldcontext{moduledata.progress.path("#1","#2")} ;
% p := p shifted -llcorner p ;
- if bbwidth(p) > 1 :
+ if bbwidth(p) > 0 :
h := 100 ; w := 2 * h ;
w := \the\textwidth-3pt ; % correct for pen
p := p xstretched w ;
@@ -79,7 +80,8 @@ end
fi ;
fi ;
endgroup ;
- \stopMPcode\egroup
+ \stopMPcode
+ \egroup
\scratchdimen\wd\scratchbox
\ifdim\scratchdimen>\zeropoint
\startlinecorrection
@@ -92,9 +94,9 @@ end
\stoplinecorrection
\fi}
-\def\LoadUsage #1{\ctxlua{moduledata.progress.convert("#1")}}
-\def\ShowUsage #1{\ctxlua{moduledata.progress.show("#1",nil,nil,"elapsed_time")}}
-\def\ShowMemoryUsage#1{\ctxlua{moduledata.progress.show("#1",nil,{}, "elapsed_time")}}
-\def\ShowNodeUsage #1{\ctxlua{moduledata.progress.show("#1",{},nil, "elapsed_time")}}
+\unexpanded\def\LoadUsage #1{\ctxlua{moduledata.progress.convert("#1")}}
+\unexpanded\def\ShowUsage #1{\ctxlua{moduledata.progress.show("#1",nil,nil,"elapsed_time")}}
+\unexpanded\def\ShowMemoryUsage#1{\ctxlua{moduledata.progress.show("#1",nil,{}, "elapsed_time")}}
+\unexpanded\def\ShowNodeUsage #1{\ctxlua{moduledata.progress.show("#1",{},nil, "elapsed_time")}}
\endinput