summaryrefslogtreecommitdiff
path: root/tex/generic/context/luatex/luatex-basics-gen.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
commit965214d981e6129b782c67adcaf3a81aedcb0bac (patch)
tree84f5945aae8efc9b6eb1898b873be5453cafe43d /tex/generic/context/luatex/luatex-basics-gen.lua
parente7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff)
downloadcontext-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz
stable 2013.05.28 00:36
Diffstat (limited to 'tex/generic/context/luatex/luatex-basics-gen.lua')
-rw-r--r--tex/generic/context/luatex/luatex-basics-gen.lua28
1 files changed, 6 insertions, 22 deletions
diff --git a/tex/generic/context/luatex/luatex-basics-gen.lua b/tex/generic/context/luatex/luatex-basics-gen.lua
index 9cf5b9317..4a46fbb07 100644
--- a/tex/generic/context/luatex/luatex-basics-gen.lua
+++ b/tex/generic/context/luatex/luatex-basics-gen.lua
@@ -89,7 +89,6 @@ local remapper = {
fea = "font feature files",
pfa = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
pfb = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
- afm = "afm",
}
function resolvers.findfile(name,fileformat)
@@ -118,11 +117,6 @@ end
resolvers.findbinfile = resolvers.findfile
-function resolvers.loadbinfile(filename,filetype)
- local data = io.loaddata(filename)
- return true, data, #data
-end
-
function resolvers.resolve(s)
return s
end
@@ -155,29 +149,19 @@ do
local cachepaths = kpse.expand_var('$TEXMFCACHE') or ""
- -- quite like tex live or so (the weird $TEXMFCACHE test seems to be needed on miktex)
+ -- quite like tex live or so
- if cachepaths == "" or cachepaths == "$TEXMFCACHE" then
+ if cachepaths == "" then
cachepaths = kpse.expand_var('$TEXMFVAR') or ""
end
- -- this also happened to be used (the weird $TEXMFVAR test seems to be needed on miktex)
+ -- this also happened to be used
- if cachepaths == "" or cachepaths == "$TEXMFVAR" then
+ if cachepaths == "" then
cachepaths = kpse.expand_var('$VARTEXMF') or ""
end
- -- and this is a last resort (hm, we could use TEMP or TEMPDIR)
-
- if cachepaths == "" then
- local fallbacks = { "TMPDIR", "TEMPDIR", "TMP", "TEMP", "HOME", "HOMEPATH" }
- for i=1,#fallbacks do
- cachepaths = os.getenv(fallbacks[i]) or ""
- if cachepath ~= "" and lfs.isdir(cachepath) then
- break
- end
- end
- end
+ -- and this is a last resort
if cachepaths == "" then
cachepaths = "."
@@ -283,7 +267,7 @@ function caches.savedata(path,name,data)
local luaname, lucname = makefullname(path,name)
if luaname then
texio.write(string.format("(save: %s)",luaname))
- table.tofile(luaname,data,true)
+ table.tofile(luaname,data,true,{ reduce = true })
if lucname and type(caches.compile) == "function" then
os.remove(lucname) -- better be safe
texio.write(string.format("(save: %s)",lucname))