diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
commit | 824f7b0903de8ad7f6ee3d7656005e4c59155e06 (patch) | |
tree | abfc8673ef9916f3ab7074e811207384c301492b /Master/texmf-dist/tex/context/base/data-ini.lua | |
parent | 689aefb0727676ed3cddf331337b4be226495e72 (diff) |
context import for TL13, from www.pragma-ade.com/context/beta/cont-tmf.zip
git-svn-id: svn://tug.org/texlive/trunk@29731 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/data-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/data-ini.lua | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/context/base/data-ini.lua b/Master/texmf-dist/tex/context/base/data-ini.lua index 2c263aada22..201c6a2d766 100644 --- a/Master/texmf-dist/tex/context/base/data-ini.lua +++ b/Master/texmf-dist/tex/context/base/data-ini.lua @@ -7,10 +7,9 @@ if not modules then modules = { } end modules ['data-ini'] = { } local gsub, find, gmatch, char = string.gsub, string.find, string.gmatch, string.char -local concat = table.concat local next, type = next, type -local filedirname, filebasename, fileextname, filejoin = file.dirname, file.basename, file.extname, file.join +local filedirname, filebasename, filejoin = file.dirname, file.basename, file.join local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end) @@ -33,7 +32,7 @@ local resolvers = resolvers texconfig.kpse_init = false texconfig.shell_escape = 't' -if kpse and kpse.default_texmfcnf then +if not (environment and environment.default_texmfcnf) and kpse and kpse.default_texmfcnf then local default_texmfcnf = kpse.default_texmfcnf() -- looks more like context: default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTOLOC","selfautoloc:") @@ -98,6 +97,10 @@ do local args = environment.originalarguments or arg -- this needs a cleanup + if not environment.ownmain then + environment.ownmain = status and string.match(string.lower(status.banner),"this is ([%a]+)") or "luatex" + end + local ownbin = environment.ownbin or args[-2] or arg[-2] or args[-1] or arg[-1] or arg[0] or "luatex" local ownpath = environment.ownpath or os.selfdir @@ -132,13 +135,13 @@ do if lfs.chdir(p) then local pp = lfs.currentdir() if trace_locating and p ~= pp then - report_initialization("following symlink '%s' to '%s'",p,pp) + report_initialization("following symlink %a to %a",p,pp) end ownpath = pp lfs.chdir(olddir) else if trace_locating then - report_initialization("unable to check path '%s'",p) + report_initialization("unable to check path %a",p) end ownpath = p end @@ -149,9 +152,9 @@ do end if not ownpath or ownpath == "" then ownpath = "." - report_initialization("forcing fallback ownpath .") + report_initialization("forcing fallback to ownpath %a",ownpath) elseif trace_locating then - report_initialization("using ownpath '%s'",ownpath) + report_initialization("using ownpath %a",ownpath) end end @@ -214,23 +217,12 @@ end environment.texroot = file.collapsepath(texroot) --- Tracing. Todo ... - -function resolvers.settrace(n) -- no longer number but: 'locating' or 'detail' - if n then - trackers.disable("resolvers.*") - trackers.enable("resolvers."..n) - end +if profiler then + directives.register("system.profile",function() + profiler.start("luatex-profile.log") + end) end -resolvers.settrace(osgetenv("MTX_INPUT_TRACE")) - --- todo: - --- if profiler and osgetenv("MTX_PROFILE_RUN") == "YES" then --- profiler.start("luatex-profile.log") --- end - -- a forward definition if not resolvers.resolve then |