summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-03-05 12:17:06 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-03-05 12:17:06 +0100
commitcd05787a9d41bac345695564011d333974afe1d9 (patch)
treeecc998d3de192ddcccdf1fcb1ec56fc3d539c2f9 /scripts
parent0d300509bdd7497fd376844b2326f5917636590e (diff)
downloadcontext-cd05787a9d41bac345695564011d333974afe1d9.tar.gz
2021-03-05 11:16:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua65
-rw-r--r--scripts/context/lua/mtx-context.xml5
-rw-r--r--scripts/context/lua/mtxrun.lua37
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua37
-rw-r--r--scripts/context/stubs/unix/mtxrun37
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua37
6 files changed, 173 insertions, 45 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 38cb363bf..5b159158c 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules['mtx-context'] = {
local type, next, tostring, tonumber = type, next, tostring, tonumber
local format, gmatch, match, gsub, find = string.format, string.gmatch, string.match, string.gsub, string.find
-local quote, validstring = string.quote, string.valid
+local quote, validstring, splitstring = string.quote, string.valid, string.split
local sort, concat, insert, sortedhash, tohash = table.sort, table.concat, table.insert, table.sortedhash, table.tohash
local settings_to_array = utilities.parsers.settings_to_array
local appendtable = table.append
@@ -1435,6 +1435,67 @@ function scripts.context.touch()
end
end
+function scripts.context.pages()
+ local filename = environment.files[1]
+ if filename then
+ local u = table.load(file.addsuffix(filename,"tuc"))
+ if u then
+ local p = u.structures.pages.collected
+ local l = u.structures.lists.collected
+ local page = environment.arguments.page
+ local list = environment.arguments.list
+ if type(page) == "string" then
+ page = settings_to_array(page)
+ end
+ if type(list) == "string" then
+ list = settings_to_array(list)
+ end
+ if page or list then
+ if page then
+ for i=1,#p do
+ local pi = p[i]
+ local m = pi.marked
+ if m then
+ for j=1,#page do
+ local n = page[j]
+ if table.contains(m,n) then
+ report("page : %04i %s",i,n)
+ end
+ end
+ end
+ end
+ end
+ if list then
+ for i=1,#l do
+ local li = l[i]
+ local r = li.references
+ if r then
+ local rr = r.reference
+ if rr then
+ rr = splitstring(rr,",")
+ for j=1,#list do
+ local n = list[j]
+ if table.contains(rr,n) then
+ report("list : %04i %s",r.realpage,n)
+ end
+ end
+ end
+ end
+ end
+ end
+ else
+ for i=1,#p do
+ local pi = p[i]
+ local m = pi.marked
+ if m then
+ report("page : %04i % t",i,m)
+ end
+ end
+ end
+ end
+ end
+end
+
-- modules
local labels = { "title", "comment", "status" }
@@ -1661,6 +1722,8 @@ elseif getargument("version") then
scripts.context.version()
elseif getargument("touch") then
scripts.context.touch()
+elseif getargument("pages") then
+ scripts.context.pages()
elseif getargument("expert") then
application.help("expert", "special")
elseif getargument("showmodules") or getargument("modules") then
diff --git a/scripts/context/lua/mtx-context.xml b/scripts/context/lua/mtx-context.xml
index 40751c613..98a75244b 100644
--- a/scripts/context/lua/mtx-context.xml
+++ b/scripts/context/lua/mtx-context.xml
@@ -112,6 +112,11 @@
</flag>
</subcategory>
<subcategory>
+ <flag name="pages">
+ <short>report pagenumbers of names pages and list references (<ref name="page"/>=... or <ref name="page"/>=...)</short>
+ </flag>
+ </subcategory>
+ <subcategory>
<flag name="jit">
<short>use luajittex with jit turned off (only use the faster virtual machine)</short>
</flag>
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 4d176eea7..6fc17adb0 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -849,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11969, stripped down to: 8501
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -858,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -888,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -904,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1037,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1079,6 +1087,10 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
@@ -1120,6 +1132,9 @@ end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -11800,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11845,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11855,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11881,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11892,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -25827,8 +25842,8 @@ end -- of closure
-- used libraries : l-bit32.lua 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-sha.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 util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.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 util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1025303
--- stripped bytes : 405465
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 4d176eea7..6fc17adb0 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -849,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11969, stripped down to: 8501
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -858,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -888,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -904,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1037,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1079,6 +1087,10 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
@@ -1120,6 +1132,9 @@ end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -11800,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11845,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11855,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11881,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11892,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -25827,8 +25842,8 @@ end -- of closure
-- used libraries : l-bit32.lua 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-sha.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 util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.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 util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1025303
--- stripped bytes : 405465
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 4d176eea7..6fc17adb0 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -849,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11969, stripped down to: 8501
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -858,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -888,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -904,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1037,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1079,6 +1087,10 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
@@ -1120,6 +1132,9 @@ end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -11800,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11845,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11855,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11881,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11892,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -25827,8 +25842,8 @@ end -- of closure
-- used libraries : l-bit32.lua 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-sha.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 util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.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 util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1025303
--- stripped bytes : 405465
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 4d176eea7..6fc17adb0 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -849,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11969, stripped down to: 8501
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -858,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -888,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -904,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1037,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1079,6 +1087,10 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
@@ -1120,6 +1132,9 @@ end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -11800,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11845,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11855,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11881,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11892,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -25827,8 +25842,8 @@ end -- of closure
-- used libraries : l-bit32.lua 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-sha.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 util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.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 util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1025303
--- stripped bytes : 405465
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge