diff options
author | Marius <mariausol@gmail.com> | 2013-07-12 20:20:46 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-07-12 20:20:46 +0300 |
commit | b1d691809f3556327b45caf09444c50a77335b8f (patch) | |
tree | 8e85bb077d6680d1ea73a284a9ab3a0d26954628 /tex/context/base/trac-deb.lua | |
parent | b10c48bc0fe2e5be7305c0f31e41ea01f8596c30 (diff) | |
download | context-b1d691809f3556327b45caf09444c50a77335b8f.tar.gz |
beta 2013.07.12 19:10
Diffstat (limited to 'tex/context/base/trac-deb.lua')
-rw-r--r-- | tex/context/base/trac-deb.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/tex/context/base/trac-deb.lua b/tex/context/base/trac-deb.lua index fe167c343..4cc48c4a5 100644 --- a/tex/context/base/trac-deb.lua +++ b/tex/context/base/trac-deb.lua @@ -11,22 +11,25 @@ local lpeg, status = lpeg, status local lpegmatch = lpeg.match local format, concat, match = string.format, table.concat, string.match local tonumber, tostring = tonumber, tostring -local texdimen, textoks, texcount = tex.dimen, tex.toks, tex.count -- maybe tracers -> tracers.tex (and tracers.lua for current debugger) local report_system = logs.reporter("system","tex") -tracers = tracers or { } -local tracers = tracers +tracers = tracers or { } +local tracers = tracers -tracers.lists = { } -local lists = tracers.lists +tracers.lists = { } +local lists = tracers.lists -tracers.strings = { } -local strings = tracers.strings +tracers.strings = { } +local strings = tracers.strings -strings.undefined = "undefined" +local texgetdimen = tex.getdimen +local texgettoks = tex.gettoks +local texgetcount = tex.getcount + +strings.undefined = "undefined" lists.scratch = { 0, 2, 4, 6, 8 @@ -71,16 +74,16 @@ function tracers.cs(csname) end function tracers.dimen(name) - local d = texdimen[name] + local d = texgetdimen(name) return d and number.topoints(d) or strings.undefined end function tracers.count(name) - return texcount[name] or strings.undefined + return texgetcount(name) or strings.undefined end function tracers.toks(name,limit) - local t = textoks[name] + local t = texgettoks(name) return t and string.limit(t,tonumber(limit) or 40) or strings.undefined end |