summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-lmp.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-11-23 19:48:34 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-11-23 19:48:34 +0100
commit18499e46a49b8ccf4346686d1cf626ada33935b8 (patch)
treebd0ae7b601b323e20954c10c07598637d9403e00 /tex/context/base/mkiv/mlib-lmp.lmt
parent4b089e589d39346a66a27d04f9857fe16e4b7b41 (diff)
downloadcontext-18499e46a49b8ccf4346686d1cf626ada33935b8.tar.gz
2020-11-23 18:39:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lmp.lmt')
-rw-r--r--tex/context/base/mkiv/mlib-lmp.lmt70
1 files changed, 0 insertions, 70 deletions
diff --git a/tex/context/base/mkiv/mlib-lmp.lmt b/tex/context/base/mkiv/mlib-lmp.lmt
deleted file mode 100644
index ff9682e87..000000000
--- a/tex/context/base/mkiv/mlib-lmp.lmt
+++ /dev/null
@@ -1,70 +0,0 @@
-if not modules then modules = { } end modules ['mlib-lmp'] = {
- version = 1.001,
- comment = "companion to mlib-ctx.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files",
-}
-
--- path relates stuff ... todo: use a stack (or numeric index to list)
-
-local type = type
-
-local aux = mp.aux
-local mpnumeric = aux.numeric
-local mppair = aux.pair
-
-local p = nil
-local n = 0
-
-local function mf_path_reset()
- p = nil
- n = 0
-end
-
-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
- mpnumeric(n)
-end
-
-local function mf_path_point()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[1],pi[2])
- end
-end
-
-local function mf_path_left()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[5],pi[6])
- end
-end
-
-local function mf_path_right()
- local i = scannumber()
- if i > 0 and i <= n then
- local pn
- if i == 1 then
- pn = p[2] or p[1]
- else
- pn = p[i+1] or p[1]
- end
- mppair(pn[3],pn[4])
- end
-end
-
-local registerscript = metapost.registerscript
-
-registerscript("pathreset", mf_path_reset)
-registerscript("pathlengthof", mf_path_length)
-registerscript("pathpointof", mf_path_point)
-registerscript("pathleftof", mf_path_left)
-registerscript("pathrightof", mf_path_right)