From 8b6aa4917f960304df746f97e8861cc422c7990a Mon Sep 17 00:00:00 2001 From: Mojca Miklavec Date: Thu, 24 May 2012 20:38:29 +0000 Subject: ConTeXt 2012.05.24 19:36 git-svn-id: svn://tug.org/texlive/trunk@26637 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/alpha-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/amd64-freebsd/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/amd64-kfreebsd/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/armel-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-cygwin/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-freebsd/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-kfreebsd/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-netbsd/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/i386-solaris/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/mips-irix/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/mipsel-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/powerpc-aix/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/powerpc-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/sparc-solaris/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/universal-darwin/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/win32/mtxrun.lua | 45 ++++++++++++++++++++++++-------------- Master/bin/x86_64-darwin/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/x86_64-linux/mtxrun | 45 ++++++++++++++++++++++++-------------- Master/bin/x86_64-solaris/mtxrun | 45 ++++++++++++++++++++++++-------------- 20 files changed, 560 insertions(+), 340 deletions(-) (limited to 'Master/bin') diff --git a/Master/bin/alpha-linux/mtxrun b/Master/bin/alpha-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/alpha-linux/mtxrun +++ b/Master/bin/alpha-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/amd64-freebsd/mtxrun b/Master/bin/amd64-freebsd/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/amd64-freebsd/mtxrun +++ b/Master/bin/amd64-freebsd/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/amd64-kfreebsd/mtxrun b/Master/bin/amd64-kfreebsd/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/amd64-kfreebsd/mtxrun +++ b/Master/bin/amd64-kfreebsd/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/armel-linux/mtxrun b/Master/bin/armel-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/armel-linux/mtxrun +++ b/Master/bin/armel-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-cygwin/mtxrun b/Master/bin/i386-cygwin/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-cygwin/mtxrun +++ b/Master/bin/i386-cygwin/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-freebsd/mtxrun b/Master/bin/i386-freebsd/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-freebsd/mtxrun +++ b/Master/bin/i386-freebsd/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-kfreebsd/mtxrun b/Master/bin/i386-kfreebsd/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-kfreebsd/mtxrun +++ b/Master/bin/i386-kfreebsd/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-linux/mtxrun b/Master/bin/i386-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-linux/mtxrun +++ b/Master/bin/i386-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-netbsd/mtxrun b/Master/bin/i386-netbsd/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-netbsd/mtxrun +++ b/Master/bin/i386-netbsd/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/i386-solaris/mtxrun b/Master/bin/i386-solaris/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/i386-solaris/mtxrun +++ b/Master/bin/i386-solaris/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/mips-irix/mtxrun b/Master/bin/mips-irix/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/mips-irix/mtxrun +++ b/Master/bin/mips-irix/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/mipsel-linux/mtxrun b/Master/bin/mipsel-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/mipsel-linux/mtxrun +++ b/Master/bin/mipsel-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/powerpc-aix/mtxrun b/Master/bin/powerpc-aix/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/powerpc-aix/mtxrun +++ b/Master/bin/powerpc-aix/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/powerpc-linux/mtxrun b/Master/bin/powerpc-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/powerpc-linux/mtxrun +++ b/Master/bin/powerpc-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/sparc-solaris/mtxrun b/Master/bin/sparc-solaris/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/sparc-solaris/mtxrun +++ b/Master/bin/sparc-solaris/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/universal-darwin/mtxrun b/Master/bin/universal-darwin/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/universal-darwin/mtxrun +++ b/Master/bin/universal-darwin/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/win32/mtxrun.lua b/Master/bin/win32/mtxrun.lua index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/win32/mtxrun.lua +++ b/Master/bin/win32/mtxrun.lua @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/x86_64-darwin/mtxrun b/Master/bin/x86_64-darwin/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/x86_64-darwin/mtxrun +++ b/Master/bin/x86_64-darwin/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/x86_64-linux/mtxrun b/Master/bin/x86_64-linux/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/x86_64-linux/mtxrun +++ b/Master/bin/x86_64-linux/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) diff --git a/Master/bin/x86_64-solaris/mtxrun b/Master/bin/x86_64-solaris/mtxrun index e8f229572cc..51cbb95f269 100755 --- a/Master/bin/x86_64-solaris/mtxrun +++ b/Master/bin/x86_64-solaris/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) @@ -11169,7 +11169,7 @@ local stripper = Cs( ) function resolvers.checkedvariable(str) -- assumes str is a string - return lpegmatch(stripper,str) or str + return type(str) == "string" and lpegmatch(stripper,str) or str end -- The path splitter: @@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown" -- selfautoparent:texmf/web2c if environment.default_texmfcnf then + -- unfortunately we now have quite some overkill in the spec (not so nice on a network) resolvers.luacnfspec = environment.default_texmfcnf else + -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c" resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}" end @@ -12673,7 +12675,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then @@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str) end local function resolve(str) -- use schemes, this one is then for the commandline only - local res = resolved[str] - if not res then - res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc - resolved[str] = res - abstract[res] = str + if type(str) == "table" then + local t = { } + for i=1,#str do + t[i] = resolve(str[i]) + end + return t + else + local res = resolved[str] + if not res then + res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added) + resolved[str] = res + abstract[res] = str + end + return res end - return res end local function unresolve(str) @@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve) -- local AUTOPARENT etc. although these are alwasy set new. if resolve then + -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec)))) resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec) end @@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern) report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset") report_lists(" var: %s",tabstr(configured[key]) or "unset") report_lists(" exp: %s",tabstr(expansions[key]) or "unset") - report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset") + report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset") end end instance.environment = fastcopy(env) -- cgit v1.2.3