diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
commit | f210bce174e1f2f05305ab03e88e120a1cbfc4da (patch) | |
tree | 5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/tex/context/base/mkiv/data-pre.lua | |
parent | 35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff) |
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/data-pre.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/data-pre.lua | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua index 5e3020b7065..f7df8b91870 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua @@ -25,6 +25,8 @@ if not modules then modules = { } end modules ['data-pre'] = { -- version : operating system version -- release : operating system release +local insert, remove = table.insert, table.remove + local resolvers = resolvers local prefixes = resolvers.prefixes @@ -121,8 +123,10 @@ prefixes.path = prefixes.pathname -- This one assumes that inputstack is set (used in the tex loader). It is a momentary resolve -- as the top of the input stack changes. +local inputstack = { } +local stackpath = resolvers.stackpath + local function toppath() - local inputstack = resolvers.inputstack -- dependency, actually the code should move but it's if not inputstack then -- more convenient to keep it here return "." end @@ -139,7 +143,7 @@ end -- stucture. local function jobpath() - local path = resolvers.stackpath() + local path = stackpath() if not path or path == "" then return "." else @@ -147,8 +151,18 @@ local function jobpath() end end -resolvers.toppath = toppath -resolvers.jobpath = jobpath +local function pushinputname(name) + insert(inputstack,name) +end + +local function popinputname(name) + return remove(inputstack) +end + +resolvers.toppath = toppath +resolvers.jobpath = jobpath +resolvers.pushinputname = pushinputname +resolvers.popinputname = popinputname -- This hook sit into the resolver: |