summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/spac-par.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/spac-par.lmt
parent4b089e589d39346a66a27d04f9857fe16e4b7b41 (diff)
downloadcontext-18499e46a49b8ccf4346686d1cf626ada33935b8.tar.gz
2020-11-23 18:39:00
Diffstat (limited to 'tex/context/base/mkiv/spac-par.lmt')
-rw-r--r--tex/context/base/mkiv/spac-par.lmt80
1 files changed, 0 insertions, 80 deletions
diff --git a/tex/context/base/mkiv/spac-par.lmt b/tex/context/base/mkiv/spac-par.lmt
deleted file mode 100644
index 3af8ea415..000000000
--- a/tex/context/base/mkiv/spac-par.lmt
+++ /dev/null
@@ -1,80 +0,0 @@
-if not modules then modules = { } end modules ['spac-par'] = {
- version = 1.001,
- comment = "companion to spac-par.mkxl",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local context = context
-local implement = interfaces.implement
-
-local collected = utilities.storage.allocate()
-local tobesaved = utilities.storage.allocate()
-local wrappers = { }
-
-local jobparwrappers = {
- collected = collected,
- tobesaved = tobesaved,
-}
-
-job.parwrappers = jobparwrappers
-
-local function initializer()
- tobesaved = jobparwrappers.tobesaved
- collected = jobparwrappers.collected
-end
-
-local function finalizer()
- -- nothing yet
-end
-
-job.register('job.parwrappers.collected', tobesaved, initializer, finalizer)
-
-implement {
- name = "newparwrapper",
- arguments = "string",
- actions = function(id)
- local t = tobesaved[id]
- local n
- if t then
- n = #t + 1
- t[n] = 0
- else
- n = 1
- tobesaved[id] = { 0 }
- end
- wrappers[id] = n
- end
-}
-
-implement {
- name = "setparwrapper",
- arguments = "string",
- protected = true,
- actions = function(id)
- local t = tobesaved[id]
- local n = #t
- t[n] = t[n] + 1
- end
-}
-
-implement {
- name = "getparwrapper",
- arguments = "string",
- public = true,
- actions = function(id)
- local t = tobesaved[id]
- context(t and t[#t] or 0)
- end
-}
-
-implement {
- name = "lastparwrapper",
- arguments = "string",
- public = true,
- actions = function(id)
- local t = collected and collected[id]
- context(t and t[wrappers[id]] or 0)
- end
-}