From f4c9d2d305f1214a144fcb23a66964761583234a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 9 Feb 2018 01:00:38 +0100 Subject: 2018-02-09 00:12:00 --- scripts/context/stubs/win64/mtxrun.lua | 41 ++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'scripts/context/stubs/win64/mtxrun.lua') diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 7dd544b82..a50f340bf 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -16262,7 +16262,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-exp"] = package.loaded["data-exp"] or true --- original size: 17958, stripped down to: 10705 +-- original size: 17979, stripped down to: 11188 if not modules then modules={} end modules ['data-exp']={ version=1.001, @@ -16461,6 +16461,7 @@ local nofscans=0 local scancache={} local fullcache={} local nofsharedscans=0 +local addcasecraptoo=true local function scan(files,remap,spec,path,n,m,r,onlyone,tolerant) local full=path=="" and spec or (spec..path..'/') local dirs={} @@ -16476,11 +16477,6 @@ local function scan(files,remap,spec,path,n,m,r,onlyone,tolerant) if paths then if onlyone then else - if type(paths)=="string" then - files[lower]={ paths,path } - else - paths[#paths+1]=path - end if name~=lower then local rl=remap[lower] if not rl then @@ -16489,6 +16485,21 @@ local function scan(files,remap,spec,path,n,m,r,onlyone,tolerant) elseif trace_globbing and rl~=name then report_globbing("confusing filename, name: %a, lower: %a, already: %a",name,lower,rl) end + if addcasecraptoo then + local paths=files[name] + if not paths then + files[name]=path + elseif type(paths)=="string" then + files[name]={ paths,path } + else + paths[#paths+1]=path + end + end + end + if type(paths)=="string" then + files[lower]={ paths,path } + else + paths[#paths+1]=path end end else @@ -16607,6 +16618,12 @@ function resolvers.get_from_content(content,path,name) return path,remap[used] or used else local name=path + if addcasecraptoo then + local path=files[name] + if path then + return path,name + end + end local used=lower(name) local path=files[used] if path then @@ -17418,7 +17435,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-res"] = package.loaded["data-res"] or true --- original size: 68236, stripped down to: 47762 +-- original size: 68263, stripped down to: 47789 if not modules then modules={} end modules ['data-res']={ version=1.001, @@ -18195,7 +18212,7 @@ end local function collect_files(names) local filelist={} local noffiles=0 - local function check(hash,root,pathname,path,name) + local function check(hash,root,pathname,path,basename,name) if not pathname or find(path,pathname) then local variant=hash.type local search=filejoin(root,path,name) @@ -18234,10 +18251,10 @@ local function collect_files(names) local metadata=content.metadata local realroot=metadata and metadata.path or hashname if type(path)=="string" then - check(hash,realroot,pathname,path,name) + check(hash,realroot,pathname,path,basename,name) else for i=1,#path do - check(hash,realroot,pathname,path[i],name) + check(hash,realroot,pathname,path[i],basename,name) end end end @@ -21069,8 +21086,8 @@ end -- of closure -- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.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-gzip.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-fil.lua util-sac.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-tpl.lua util-sbx.lua util-mrg.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 : 868809 --- stripped bytes : 316117 +-- original bytes : 868857 +-- stripped bytes : 315655 -- end library merge -- cgit v1.2.3