summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-02-28 15:11:56 +0000
committerKarl Berry <karl@freefriends.org>2019-02-28 15:11:56 +0000
commitcc17ad601696f5cf966c8a0b9d79144cd42828a6 (patch)
treef6007b9b2f886d942f9b30b4797e8718001f65bd /Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
parente298746bb92cdf7e87bc3b5b9bd973b6c429a47f (diff)
context for tl19
git-svn-id: svn://tug.org/texlive/trunk@50165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua27
1 files changed, 15 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
index a28f305932c..32582c56fc5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
@@ -17,6 +17,7 @@ local formatters = string.formatters
local nodecodes = nodes.nodecodes
local gluecodes = nodes.gluecodes
local listcodes = nodes.listcodes
+local leadercodes = nodes.leadercodes
local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
@@ -30,10 +31,12 @@ local math_code = nodecodes.math
local rule_code = nodecodes.rule
local marginkern_code = nodecodes.marginkern
-local leaders_code = gluecodes.leaders
+local leaders_code = leadercodes.leaders
+
local lineskip_code = gluecodes.lineskip
local baselineskip_code = gluecodes.baselineskip
-local line_code = listcodes.line
+
+local linelist_code = listcodes.line
local texlists = tex.lists
local settexattribute = tex.setattribute
@@ -128,6 +131,9 @@ local function getprofile(line,step)
local margin = step / 4
local min = 0
local max = ceiling(getwidth(line)/step) + 1
+ local wd = 0
+ local ht = 0
+ local dp = 0
for i=min,max do
heights[i] = 0
@@ -136,8 +142,6 @@ local function getprofile(line,step)
-- remember p
- local wd, ht, dp = 0, 0, 0
-
local function progress()
position = width
width = position + wd
@@ -639,7 +643,7 @@ end
local function profilelist(line,mvl)
- local current = tonut(line)
+ local current = line
local top = nil
local bot = nil
@@ -668,7 +672,7 @@ local function profilelist(line,mvl)
local id = getid(current)
if id == hlist_code then
local subtype = getsubtype(current)
- if subtype == line_code then
+ if subtype == linelist_code then
t_profile = hasprofile(current)
if t_profile then
top = current
@@ -710,7 +714,7 @@ local function profilelist(line,mvl)
if id == hlist_code then -- check subtype
local subtype = getsubtype(current)
- if subtype == line_code then
+ if subtype == linelist_code then
if top == current then
-- skip
bot = nil -- to be sure
@@ -819,7 +823,7 @@ function profiling.profilebox(specification)
local id = getid(current)
if id == hlist_code then
local subtype = getsubtype(current)
- if subtype == line_code then
+ if subtype == linelist_code then
if top then
bot = current
b_profile = setprofile(bot)
@@ -899,9 +903,8 @@ end
--
-- function profiling.vboxhandler(head,where)
-- if head and not ignore[where] then
--- local h = tonut(head)
--- if getnext(h) then
--- profilelist(h)
+-- if getnext(head) then
+-- profilelist(head)
-- end
-- end
-- return head
@@ -911,7 +914,7 @@ function profiling.pagehandler(head)
if head then
profilelist(head,true)
end
- return head, true
+ return head
end
interfaces.implement {