diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-03-21 09:47:34 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-03-21 09:47:34 +0100 |
commit | f47b4939787074397c9ea37c1d892a1f7ccc7290 (patch) | |
tree | 7768be58efe0faab8e2dccb999686c6a674bf0d7 /tex/context/base/mkiv/data-exp.lua | |
parent | f923c957a3b322ae3ee8e7a0b20df1580869bee7 (diff) | |
download | context-f47b4939787074397c9ea37c1d892a1f7ccc7290.tar.gz |
2018-03-21 09:24:00
Diffstat (limited to 'tex/context/base/mkiv/data-exp.lua')
-rw-r--r-- | tex/context/base/mkiv/data-exp.lua | 86 |
1 files changed, 6 insertions, 80 deletions
diff --git a/tex/context/base/mkiv/data-exp.lua b/tex/context/base/mkiv/data-exp.lua index 994399e36..76fd3c7b0 100644 --- a/tex/context/base/mkiv/data-exp.lua +++ b/tex/context/base/mkiv/data-exp.lua @@ -337,80 +337,6 @@ local addcasecraptoo = true -- experiment to let case matter a bit (still fuzzy -- So, we assume either a lowercase name or a mixed case one but only one such case -- as having Foo fOo foo FoO FOo etc on the system is braindead in any sane project. --- local function scan(files,remap,spec,path,n,m,r,onlyone,tolerant) --- local full = path == "" and spec or (spec .. path .. '/') --- local dirs = { } --- local nofdirs = 0 --- local pattern = tolerant and lessweird or weird --- for name in directory(full) do --- if not lpegmatch(pattern,name) then --- local mode = attributes(full..name,"mode") --- if mode == "file" then --- n = n + 1 --- local lower = lower(name) --- local paths = files[lower] --- if paths then --- if onlyone then --- -- forget about it --- else --- if name ~= lower then --- local rl = remap[lower] --- if not rl then --- remap[lower] = name --- r = r + 1 --- 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 -- probably unique anyway --- files[lower] = path --- if name ~= lower then --- local rl = remap[lower] --- if not rl then --- remap[lower] = name --- r = r + 1 --- elseif trace_globbing and rl ~= name then --- report_globbing("confusing filename, name: %a, lower: %a, already: %a",name,lower,rl) --- end --- end --- end --- elseif mode == "directory" then --- m = m + 1 --- nofdirs = nofdirs + 1 --- if path ~= "" then --- dirs[nofdirs] = path .. "/" .. name --- else --- dirs[nofdirs] = name --- end --- end --- end --- end --- if nofdirs > 0 then --- sort(dirs) --- for i=1,nofdirs do --- files, remap, n, m, r = scan(files,remap,spec,dirs[i],n,m,r,onlyonce,tolerant) --- end --- end --- scancache[sub(full,1,-2)] = files --- return files, remap, n, m, r --- end - local function scan(files,remap,spec,path,n,m,r,onlyone,tolerant) local full = path == "" and spec or (spec .. path .. '/') local dirlist = { } @@ -585,12 +511,12 @@ function resolvers.get_from_content(content,path,name) -- or (content,name) else -- this one does a lookup and resolves a remapped name local name = path - if addcasecraptoo then - local path = files[name] - if path then - return path, name - end - end +-- 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 |