From fca2d946bc4d3ef525c3a2c9016e3b88d6d09812 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 24 Aug 2019 23:32:35 +0200 Subject: 2019-08-24 22:49:00 --- tex/context/base/mkiv/mlib-lmp.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tex/context/base/mkiv/mlib-lmp.lua') diff --git a/tex/context/base/mkiv/mlib-lmp.lua b/tex/context/base/mkiv/mlib-lmp.lua index 292265be1..93a758681 100644 --- a/tex/context/base/mkiv/mlib-lmp.lua +++ b/tex/context/base/mkiv/mlib-lmp.lua @@ -6,23 +6,15 @@ if not modules then modules = { } end modules ['mlib-lmp'] = { license = "see context related readme files", } -local get = mp.get local aux = mp.aux -local scan = mp.scan - local mpnumeric = aux.numeric local mppair = aux.pair local mpquoted = aux.quoted -local scannumber = scan.number -local scanpath = scan.path - -local registerscript = metapost.registerscript +-- todo: use a stack? do - -- todo: use a stack? - local p = nil local n = 0 @@ -33,6 +25,10 @@ do if CONTEXTLMTXMODE > 0 then + local scan = mp.scan + local scannumber = scan.number + local scanpath = scan.path + local function mf_path_length() p = scanpath() n = p and #p or 1 @@ -68,6 +64,8 @@ do end end + local registerscript = metapost.registerscript + registerscript("pathreset", mf_path_reset) registerscript("pathlengthof", mf_path_length) registerscript("pathpointof", mf_path_point) @@ -76,6 +74,7 @@ do else + local get = mp.get local mpgetpath = get.path local function mf_path_length(name) -- cgit v1.2.3