summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/luat-cod.lua
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/luat-cod.lua
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/luat-cod.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/luat-cod.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/luat-cod.lua b/Master/texmf-dist/tex/context/base/luat-cod.lua
index ab21fef09c6..b022f31c3e9 100644
--- a/Master/texmf-dist/tex/context/base/luat-cod.lua
+++ b/Master/texmf-dist/tex/context/base/luat-cod.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['luat-cod'] = {
license = "see context related readme files"
}
-local match, gsub, find = string.match, string.gsub, string.find
+local match, gsub, find, format = string.match, string.gsub, string.find, string.format
local texconfig, lua = texconfig, lua
@@ -57,7 +57,7 @@ function lua.registerfinalizer(f,comment)
if type(f) == "function" then
finalizers[#finalizers+1] = { action = f, comment = comment }
else
- print(string.format("fatal error: invalid finalizer, action: %s",finalizer.comment or "unknown"))
+ print(format("fatal error: invalid finalizer, action: %s",finalizer.comment or "unknown"))
os.exit()
end
end
@@ -77,9 +77,10 @@ end
environment = environment or { }
local environment = environment
-local sourcefile = arg and arg[1] or ""
-local sourcepath = gsub (sourcefile,"^\"(.*)\"$", "%1")
-sourcepath = find(sourcepath,"/") and gsub(sourcepath,"/[^/]+$","") or ""
+-- no string.unquoted yet
+
+local sourcefile = gsub(arg and arg[1] or "","^\"(.*)\"$","%1")
+local sourcepath = find(sourcefile,"/") and gsub(sourcefile,"/[^/]+$","") or ""
local targetpath = "."
-- delayed (via metatable):