diff options
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 2a1479e93..18d9d9a8d 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -7400,7 +7400,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-mrg"] = package.loaded["util-mrg"] or true --- original size: 7294, stripped down to: 5798 +-- original size: 7757, stripped down to: 6015 if not modules then modules={} end modules ['util-mrg']={ version=1.001, @@ -7457,17 +7457,23 @@ local close=P("]")*C(equals)*P("]") local closeeq=Cmt(close*Cb("init"),function(s,i,a,b) return a==b end) local longstring=open*(1-closeeq)^0*close local quoted=patterns.quoted +local digit=patterns.digit local emptyline=space^0*eol local operator1=P("<=")+P(">=")+P("~=")+P("..")+S("/^<>=*+%%") local operator2=S("*+/") local operator3=S("-") +local operator4=P("..") local separator=S(",;") local ignore=(P("]")*space^1*P("=")*space^1*P("]"))/"]=["+(P("=")*space^1*P("{"))/"={"+(P("(")*space^1)/"("+(P("{")*(space+eol)^1*P("}"))/"{}" local strings=quoted local longcmt=(emptyline^0*P("--")*longstring*emptyline^0)/"" local longstr=longstring local comment=emptyline^0*P("--")*P("-")^0*(1-eol)^0*emptyline^1/"\n" -local pack=((eol+space)^0/"")*operator1*((eol+space)^0/"")+((eol+space)^0/"")*operator2*((space)^0/"")+((eol+space)^1/"")*operator3*((space)^1/"")+((space)^0/"")*separator*((space)^0/"") +local optionalspaces=space^0/"" +local mandatespaces=space^1/"" +local optionalspacing=(eol+space)^0/"" +local mandatespacing=(eol+space)^1/"" +local pack=digit*space^1*operator4*optionalspacing+optionalspacing*operator1*optionalspacing+optionalspacing*operator2*optionalspaces+mandatespacing*operator3*mandatespaces+optionalspaces*separator*optionalspaces local lines=emptyline^2/"\n" local spaces=(space*space)/" " local compact=Cs (( @@ -12173,7 +12179,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-tmp"] = package.loaded["data-tmp"] or true --- original size: 14308, stripped down to: 10956 +-- original size: 14615, stripped down to: 11208 if not modules then modules={} end modules ['data-tmp']={ version=1.100, @@ -12183,7 +12189,7 @@ if not modules then modules={} end modules ['data-tmp']={ license="see context related readme files" } local format,lower,gsub,concat=string.format,string.lower,string.gsub,table.concat -local serialize,serializetofile=table.serialize,table.tofile +local concat,serialize,serializetofile=table.concat,table.serialize,table.tofile local mkdirs,isdir,isfile=dir.mkdirs,lfs.isdir,lfs.isfile local addsuffix,is_writable,is_readable=file.addsuffix,file.is_writable,file.is_readable local formatters=string.formatters @@ -12296,20 +12302,27 @@ local function identify() end return writable,readables end -function caches.usedpaths() +function caches.usedpaths(separator) local writable,readables=identify() if #readables>1 then local result={} + local done={} for i=1,#readables do local readable=readables[i] - if usedreadables[i] or readable==writable then - result[#result+1]=formatters["readable: %a (order %s)"](readable,i) + if readable==writable then + done[readable]=true + result[#result+1]=formatters["readable+writable: %a"](readable) + elseif usedreadables[i] then + done[readable]=true + result[#result+1]=formatters["readable: %a"](readable) end end - result[#result+1]=formatters["writable: %a"](writable) - return result + if not done[writable] then + result[#result+1]=formatters["writable: %a"](writable) + end + return concat(result,separator or " | ") else - return writable + return writable or "?" end end function caches.configfiles() @@ -15421,7 +15434,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lib"] = package.loaded["util-lib"] or true --- original size: 10762, stripped down to: 5269 +-- original size: 10985, stripped down to: 5458 if not modules then modules={} end modules ['util-lib']={ version=1.001, @@ -15539,10 +15552,14 @@ local function requireswiglib(required,version) if trace_swiglib then report_swiglib("found: %a",found_library) end - library=package.loadlib(found_library,"luaopen_"..required_base) - if type(library)=="function" then + local message=nil + local opener="luaopen_"..required_base + library,message=package.loadlib(found_library,opener) + local libtype=type(library) + if libtype=="function" then library=library() else + report_swiglib("load error: %a returns %a, message %a",opener,libtype,message or "no message") library=false end dir.pop() @@ -15828,8 +15845,8 @@ end -- of closure -- used libraries : l-lua.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 660952 --- stripped bytes : 242693 +-- original bytes : 661945 +-- stripped bytes : 243028 -- end library merge |