summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/lua/mtxrun.lua23
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua23
-rwxr-xr-xscripts/context/stubs/unix/mtxrun23
-rw-r--r--tex/context/base/context-version.pdfbin4132 -> 4134 bytes
-rw-r--r--tex/context/base/context-version.pngbin40546 -> 40411 bytes
-rw-r--r--tex/context/base/l-package.lua19
-rw-r--r--tex/context/base/lang-ini.mkiv3
-rw-r--r--tex/context/base/m-sql.mkiv57
-rw-r--r--tex/context/base/status-files.pdfbin24730 -> 24744 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211536 -> 211488 bytes
-rw-r--r--tex/context/base/syst-aux.mkiv6
-rw-r--r--tex/context/base/util-soc.lua93
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
-rw-r--r--web2c/contextcnf.lua2
14 files changed, 237 insertions, 14 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index b06cd6955..ea3c1f148 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -144,7 +144,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 9341, stripped down to: 6815
+-- original size: 9796, stripped down to: 7191
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -358,6 +358,8 @@ methods["not loaded"]=function(name)
return nil
end
local level=0
+local used={}
+helpers.traceused=false
function helpers.loaded(name)
local sequence=helpers.sequence
level=level+1
@@ -371,6 +373,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
level=level-1
return result,rest
end
@@ -378,6 +383,18 @@ function helpers.loaded(name)
level=level-1
return nil
end
+function helpers.showused()
+ local n=#used
+ if n>0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u=used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
@@ -15971,8 +15988,8 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 666608
--- stripped bytes : 244185
+-- original bytes : 667063
+-- stripped bytes : 244264
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index b06cd6955..ea3c1f148 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -144,7 +144,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 9341, stripped down to: 6815
+-- original size: 9796, stripped down to: 7191
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -358,6 +358,8 @@ methods["not loaded"]=function(name)
return nil
end
local level=0
+local used={}
+helpers.traceused=false
function helpers.loaded(name)
local sequence=helpers.sequence
level=level+1
@@ -371,6 +373,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
level=level-1
return result,rest
end
@@ -378,6 +383,18 @@ function helpers.loaded(name)
level=level-1
return nil
end
+function helpers.showused()
+ local n=#used
+ if n>0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u=used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
@@ -15971,8 +15988,8 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 666608
--- stripped bytes : 244185
+-- original bytes : 667063
+-- stripped bytes : 244264
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index b06cd6955..ea3c1f148 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -144,7 +144,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 9341, stripped down to: 6815
+-- original size: 9796, stripped down to: 7191
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -358,6 +358,8 @@ methods["not loaded"]=function(name)
return nil
end
local level=0
+local used={}
+helpers.traceused=false
function helpers.loaded(name)
local sequence=helpers.sequence
level=level+1
@@ -371,6 +373,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
level=level-1
return result,rest
end
@@ -378,6 +383,18 @@ function helpers.loaded(name)
level=level-1
return nil
end
+function helpers.showused()
+ local n=#used
+ if n>0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u=used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
@@ -15971,8 +15988,8 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 666608
--- stripped bytes : 244185
+-- original bytes : 667063
+-- stripped bytes : 244264
-- end library merge
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 4db30f527..fcddb4470 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 558566ac1..758525307 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/l-package.lua b/tex/context/base/l-package.lua
index 09e65f9c8..837502ca6 100644
--- a/tex/context/base/l-package.lua
+++ b/tex/context/base/l-package.lua
@@ -279,6 +279,9 @@ methods["not loaded"] = function(name)
end
local level = 0
+local used = { }
+
+helpers.traceused = false
function helpers.loaded(name)
local sequence = helpers.sequence
@@ -293,6 +296,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1] = { level = level, name = name }
+ end
level = level - 1
return result, rest
end
@@ -302,6 +308,19 @@ function helpers.loaded(name)
return nil
end
+function helpers.showused()
+ local n = #used
+ if n > 0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u = used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
+
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index 3226c1255..1297fe23e 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -398,6 +398,9 @@
\lang_basics_synchronize_min_max
\to \everylanguage
+\unexpanded\def\unhyphenated
+ {\groupedcommand{\lefthyphenmin\maxdimen}\donothing}
+
% \appendtoks
% \setups[\languageparameter\c!setups]%
% \to \everylanguage
diff --git a/tex/context/base/m-sql.mkiv b/tex/context/base/m-sql.mkiv
new file mode 100644
index 000000000..bccfa9cb8
--- /dev/null
+++ b/tex/context/base/m-sql.mkiv
@@ -0,0 +1,57 @@
+%D \module
+%D [ file=m-sql,
+%D version=2012.07.12,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=SQL,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{util-tpl}{}
+\registerctxluafile{util-sql}{}
+
+\startluacode
+
+local sql = utilities.sql
+
+function sql.show(specification)
+ local data = specification.data
+ if data and #data > 0 then
+ local keys = specification.order or table.sortedkeys(data[1])
+ local align = specification.align
+ local template = "|"
+ if type(align) == "table" then
+ for i=1,#keys do
+ template = template .. (align[keys[i]] or "c") .. "|"
+ end
+ else
+ template = template .. string.rep((align or "c").. "|",#keys)
+ end
+ context.starttabulate { template }
+ context.NC()
+ for i=1,#keys do
+ context(keys[i])
+ context.NC()
+ end
+ context.NR()
+ context.HL()
+ for i=specification.first or 1,specification.last or #data do
+ local d = data[i]
+ context.NC()
+ for i=1,#keys do
+ context(d[keys[i]])
+ context.NC()
+ end
+ context.NR()
+ end
+ context.stoptabulate()
+ end
+end
+
+\stopluacode
+
+\endinput
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 712588d4e..e39b3eb88 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 31642ec7d..a007ae8e3 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 4a8c8d32f..3e0b1629b 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -6284,7 +6284,7 @@
\unexpanded\def\freezemeasure
{\dodoubleargument\syst_helpers_freeze_measure}
-\def\syst_helpers_freede_measure[#1][#2]%
+\def\syst_helpers_freeze_measure[#1][#2]%
{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}}
\unexpanded\def\setmeasure #1#2{\expandafter\def \csname\??measure#1\endcsname{#2}} % quick way
@@ -6292,8 +6292,8 @@
\unexpanded\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
\unexpanded\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\def\measure#1% maybe \dimexpr ... \relax
- {\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi}
+\def\measure#1%
+ {\the\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
% #2 could be omitted, but we want to support spaces
%
diff --git a/tex/context/base/util-soc.lua b/tex/context/base/util-soc.lua
new file mode 100644
index 000000000..30301c510
--- /dev/null
+++ b/tex/context/base/util-soc.lua
@@ -0,0 +1,93 @@
+if not modules then modules = { } end modules ['util-soc'] = {
+ version = 1.001,
+ comment = "support for sockets / protocols",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format = string.format
+
+local smtp = require("socket.smtp")
+local ltn12 = require("ltn12")
+local mime = require("mime")
+
+local mail = utilities.mail or { }
+utilities.mail = mail
+
+local report_mail = logs.reporter("mail")
+
+function mail.send(specification)
+ local presets = specification.presets
+ if presets then
+ table.setmetatableindex(specification,presets)
+ end
+ local server = specification.server or ""
+ if not server then
+ report_mail("no server specified")
+ return false
+ end
+ local to = specification.to or specification.recepient or ""
+ if to == "" then
+ report_mail("no recepient specified")
+ return false
+ end
+ local from = specification.from or specification.sender or ""
+ if from == "" then
+ report_mail("no sender specified")
+ return false
+ end
+ local message = { }
+ local body = specification.body
+ if body then
+ message[#message+1] = {
+ body = body
+ }
+ end
+ local files = specification.files
+ if files then
+ for i=1,#files do
+ local filename = files[i]
+ local handle = io.open(filename, "rb")
+ if handle then
+ report_mail("attaching file %a",filename)
+ message[#message+1] = {
+ headers = {
+ ["content-type"] = format('application/pdf; name="%s"',filename),
+ ["content-disposition"] = format('attachment; filename="%s"',filename),
+ ["content-description"] = format('file: %s',filename),
+ ["content-transfer-encoding"] = "BASE64"
+ },
+ body = ltn12.source.chain(
+ ltn12.source.file(handle),
+ ltn12.filter.chain(mime.encode("base64"),mime.wrap())
+ )
+ }
+ else
+ report_mail("file %a not found",filename)
+ end
+ end
+ end
+ local result, detail = smtp.send {
+ server = specification.server,
+ port = specification.port,
+ user = specification.user,
+ password = specification.password,
+ from = from,
+ rcpt = to,
+ source = smtp.message {
+ headers = {
+ to = to,
+ from = from,
+ cc = specification.cc,
+ subject = specification.subject or "no subject",
+ },
+ body = message
+ },
+ }
+ if detail then
+ report_mail("error: %s",detail)
+ else
+ report_mail("message sent")
+ end
+end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 314305a5d..f34e02742 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 04/20/13 13:33:53
+-- merge date : 04/22/13 16:19:03
do -- begin closure to overcome local limits and interference
diff --git a/web2c/contextcnf.lua b/web2c/contextcnf.lua
index 4c5a40b67..9adbff9b8 100644
--- a/web2c/contextcnf.lua
+++ b/web2c/contextcnf.lua
@@ -102,7 +102,7 @@ return {
PYTHONINPUTS = ".;$TEXMF/scripts/context/python",
RUBYINPUTS = ".;$TEXMF/scripts/context/ruby",
LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//",
- CLUAINPUTS = ".;$SELFAUTOLOC/lib/{$engine,luatex}/lua//",
+ CLUAINPUTS = ".;$SELFAUTOLOC/lib/{context,$engine,luatex}/lua//",
-- Not really used by MkIV so they might go away.