From 7dc350d0d097b61338500f8605518e215e3ef103 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 8 Feb 2011 21:46:00 +0100 Subject: beta 2011.02.08 21:46 --- tex/context/base/attr-col.lua | 6 +- tex/context/base/attr-lay.lua | 2 +- tex/context/base/back-exp.lua | 2 +- tex/context/base/back-ini.lua | 2 +- tex/context/base/bibl-bib.lua | 2 +- tex/context/base/bibl-tra.lua | 2 +- tex/context/base/blob-ini.lua | 2 +- tex/context/base/buff-ini.lua | 2 +- tex/context/base/buff-par.lua | 2 +- tex/context/base/buff-ver.lua | 2 +- tex/context/base/char-ini.lua | 2 +- tex/context/base/chem-ini.lua | 2 +- tex/context/base/chem-str.lua | 2 +- tex/context/base/cldf-ini.lua | 4 +- tex/context/base/colo-icc.lua | 2 +- tex/context/base/colo-ini.lua | 2 +- tex/context/base/core-ctx.lua | 2 +- tex/context/base/core-job.lua | 4 +- tex/context/base/core-uti.lua | 2 +- tex/context/base/data-aux.lua | 2 +- tex/context/base/data-con.lua | 2 +- tex/context/base/data-ctx.lua | 2 +- tex/context/base/data-exp.lua | 2 +- tex/context/base/data-fil.lua | 2 +- tex/context/base/data-ini.lua | 2 +- tex/context/base/data-lst.lua | 2 +- tex/context/base/data-lua.lua | 2 +- tex/context/base/data-met.lua | 2 +- tex/context/base/data-res.lua | 2 +- tex/context/base/data-sch.lua | 2 +- tex/context/base/data-tex.lua | 2 +- tex/context/base/data-tmf.lua | 2 +- tex/context/base/data-tmp.lua | 4 +- tex/context/base/data-tre.lua | 2 +- tex/context/base/data-use.lua | 2 +- tex/context/base/data-vir.lua | 2 +- tex/context/base/data-zip.lua | 2 +- tex/context/base/font-afm.lua | 2 +- tex/context/base/font-chk.lua | 2 +- tex/context/base/font-cid.lua | 2 +- tex/context/base/font-col.lua | 2 +- tex/context/base/font-ctx.lua | 6 +- tex/context/base/font-def.lua | 2 +- tex/context/base/font-enc.lua | 2 +- tex/context/base/font-enh.lua | 2 +- tex/context/base/font-ext.lua | 6 +- tex/context/base/font-fbk.lua | 2 +- tex/context/base/font-gds.lua | 2 +- tex/context/base/font-ini.lua | 2 +- tex/context/base/font-log.lua | 2 +- tex/context/base/font-lua.lua | 2 +- tex/context/base/font-map.lua | 2 +- tex/context/base/font-otb.lua | 2 +- tex/context/base/font-otc.lua | 2 +- tex/context/base/font-otd.lua | 2 +- tex/context/base/font-otf.lua | 2 +- tex/context/base/font-otn.lua | 10 +- tex/context/base/font-otp.lua | 2 +- tex/context/base/font-syn.lua | 2 +- tex/context/base/font-tfm.lua | 2 +- tex/context/base/grph-fil.lua | 2 +- tex/context/base/grph-inc.lua | 2 +- tex/context/base/grph-u3d.lua | 2 +- tex/context/base/grph-wnd.lua | 2 +- tex/context/base/java-ini.lua | 4 +- tex/context/base/lang-ini.lua | 2 +- tex/context/base/lang-lab.lua | 2 +- tex/context/base/lang-wrd.lua | 2 +- tex/context/base/lpdf-ano.lua | 6 +- tex/context/base/lpdf-enc.lua | 157 ++++++++++++++++++++++++++++ tex/context/base/lpdf-epa.lua | 2 +- tex/context/base/lpdf-fld.lua | 153 +-------------------------- tex/context/base/lpdf-fmt.lua | 2 +- tex/context/base/lpdf-ini.lua | 7 +- tex/context/base/lpdf-tag.lua | 2 +- tex/context/base/lpdf-wid.lua | 2 +- tex/context/base/lpdf-xmp.lua | 2 +- tex/context/base/luat-cbk.lua | 4 +- tex/context/base/luat-dum.lua | 2 + tex/context/base/luat-env.lua | 2 +- tex/context/base/luat-exe.lua | 2 +- tex/context/base/luat-fmt.lua | 2 +- tex/context/base/luat-mac.lua | 2 +- tex/context/base/luat-run.lua | 15 ++- tex/context/base/luat-sto.lua | 2 +- tex/context/base/lxml-aux.lua | 2 +- tex/context/base/lxml-dir.lua | 2 +- tex/context/base/lxml-ent.lua | 2 +- tex/context/base/lxml-lpt.lua | 2 +- tex/context/base/lxml-tab.lua | 2 +- tex/context/base/lxml-tex.lua | 2 +- tex/context/base/m-database.lua | 2 +- tex/context/base/m-pstricks.lua | 2 +- tex/context/base/math-ext.lua | 2 +- tex/context/base/math-ini.lua | 2 +- tex/context/base/math-map.lua | 2 +- tex/context/base/math-noa.lua | 4 +- tex/context/base/math-vfu.lua | 2 +- tex/context/base/meta-pdf.lua | 2 +- tex/context/base/mlib-ctx.lua | 2 +- tex/context/base/mlib-pdf.lua | 2 +- tex/context/base/mlib-pps.lua | 2 +- tex/context/base/mlib-run.lua | 2 +- tex/context/base/mult-aux.lua | 2 +- tex/context/base/mult-chk.lua | 2 +- tex/context/base/mult-ini.lua | 4 +- tex/context/base/mult-mes.lua | 66 ++++++------ tex/context/base/node-fnt.lua | 2 +- tex/context/base/node-inj.lua | 2 +- tex/context/base/node-mig.lua | 2 +- tex/context/base/node-par.lua | 2 +- tex/context/base/node-pro.lua | 2 +- tex/context/base/node-ref.lua | 6 +- tex/context/base/node-res.lua | 2 +- tex/context/base/node-rul.lua | 4 +- tex/context/base/node-spl.lua | 6 +- tex/context/base/node-tra.lua | 2 +- tex/context/base/node-tsk.lua | 2 +- tex/context/base/page-flt.lua | 2 +- tex/context/base/page-lin.lua | 2 +- tex/context/base/page-str.lua | 2 +- tex/context/base/regi-ini.lua | 4 +- tex/context/base/scrp-ini.lua | 2 +- tex/context/base/sort-ini.lua | 2 +- tex/context/base/spac-ver.lua | 6 +- tex/context/base/status-files.pdf | Bin 23258 -> 23224 bytes tex/context/base/strc-bkm.lua | 2 +- tex/context/base/strc-doc.lua | 2 +- tex/context/base/strc-ini.lua | 2 +- tex/context/base/strc-lst.lua | 2 +- tex/context/base/strc-mar.lua | 2 +- tex/context/base/strc-not.lua | 2 +- tex/context/base/strc-num.lua | 2 +- tex/context/base/strc-pag.lua | 2 +- tex/context/base/strc-ref.lua | 2 +- tex/context/base/strc-reg.lua | 2 +- tex/context/base/strc-tag.lua | 2 +- tex/context/base/supp-box.lua | 2 +- tex/context/base/supp-fil.lua | 4 +- tex/context/base/supp-ran.lua | 2 +- tex/context/base/trac-deb.lua | 2 +- tex/context/base/trac-inf.lua | 4 +- tex/context/base/trac-log.lua | 58 +++++----- tex/context/base/trac-pro.lua | 2 +- tex/context/base/trac-set.lua | 1 - tex/context/base/typo-brk.lua | 2 +- tex/context/base/typo-cap.lua | 2 +- tex/context/base/typo-dig.lua | 2 +- tex/context/base/typo-dir.lua | 2 +- tex/context/base/typo-rep.lua | 2 +- tex/context/base/typo-spa.lua | 2 +- tex/context/base/util-lua.lua | 2 +- tex/context/base/util-mrg.lua | 2 +- tex/context/base/x-asciimath.lua | 2 +- tex/generic/context/luatex-fonts-merged.lua | 38 +++---- 155 files changed, 433 insertions(+), 412 deletions(-) create mode 100644 tex/context/base/lpdf-enc.lua (limited to 'tex') diff --git a/tex/context/base/attr-col.lua b/tex/context/base/attr-col.lua index 451cf0ee1..fd69fb682 100644 --- a/tex/context/base/attr-col.lua +++ b/tex/context/base/attr-col.lua @@ -15,9 +15,9 @@ local concat = table.concat local allocate = utilities.storage.allocate -local report_attributes = logs.new("attributes","colors") -local report_colors = logs.new("colors","support") -local report_transparencies = logs.new("transparencies","support") +local report_attributes = logs.reporter("attributes","colors") +local report_colors = logs.reporter("colors","support") +local report_transparencies = logs.reporter("transparencies","support") local attributes, nodes = attributes, nodes diff --git a/tex/context/base/attr-lay.lua b/tex/context/base/attr-lay.lua index 949c9dbe8..5e60fbed3 100644 --- a/tex/context/base/attr-lay.lua +++ b/tex/context/base/attr-lay.lua @@ -16,7 +16,7 @@ local insert, remove = table.insert, table.remove local allocate = utilities.storage.allocate -local report_viewerlayers = logs.new("viewerlayers") +local report_viewerlayers = logs.reporter("viewerlayers") -- todo: document this but first reimplement this as it reflects the early -- days of luatex / mkiv and we have better ways now diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua index 8c01e365c..d5bdc2b91 100644 --- a/tex/context/base/back-exp.lua +++ b/tex/context/base/back-exp.lua @@ -50,7 +50,7 @@ local trace_tree = false trackers.register ("structures.export.showtree", local less_state = false directives.register("structures.export.lessstate", function(v) less_state = v end) local page_breaks = false directives.register("structures.export.pagebreaks", function(v) page_breaks = v end) -local report_export = logs.new("backend","export") +local report_export = logs.reporter("backend","export") local nodes = nodes local attributes = attributes diff --git a/tex/context/base/back-ini.lua b/tex/context/base/back-ini.lua index 3cbfb9a30..dc510acc6 100644 --- a/tex/context/base/back-ini.lua +++ b/tex/context/base/back-ini.lua @@ -14,7 +14,7 @@ local backends = backends local trace_backend = false trackers.register("backend.initializers", function(v) trace_finalizers = v end) -local report_backend = logs.new("backend","initializing") +local report_backend = logs.reporter("backend","initializing") local function nothing() return nil end diff --git a/tex/context/base/bibl-bib.lua b/tex/context/base/bibl-bib.lua index 518518b42..e0e5a6c3a 100644 --- a/tex/context/base/bibl-bib.lua +++ b/tex/context/base/bibl-bib.lua @@ -27,7 +27,7 @@ local P, R, S, C, Cc, Cs, Ct = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, local trace_bibxml = false trackers.register("publications.bibxml", function(v) trace_bibtex = v end) -local report_xml = logs.new("publications","xml") +local report_xml = logs.reporter("publications","xml") bibtex = bibtex or { } local bibtex = bibtex diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua index 6b44d1b67..6a9f77f43 100644 --- a/tex/context/base/bibl-tra.lua +++ b/tex/context/base/bibl-tra.lua @@ -17,7 +17,7 @@ local variables, constants = interfaces.variables, interfaces.constants local trace_bibtex = false trackers.register("publications.bibtex", function(v) trace_bibtex = v end) -local report_tex = logs.new("publications","tex") +local report_tex = logs.reporter("publications","tex") local context, structures = context, structures diff --git a/tex/context/base/blob-ini.lua b/tex/context/base/blob-ini.lua index 537e8bdd3..ffb435c25 100644 --- a/tex/context/base/blob-ini.lua +++ b/tex/context/base/blob-ini.lua @@ -24,7 +24,7 @@ if not modules then modules = { } end modules ['blob-ini'] = { local type = type -local report_blobs = logs.new("blobs") +local report_blobs = logs.reporter("blobs") local utfvalues = string.utfvalues local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua index be602d0a0..9de1cd606 100644 --- a/tex/context/base/buff-ini.lua +++ b/tex/context/base/buff-ini.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['buff-ini'] = { local trace_run = false trackers.register("buffers.run", function(v) trace_run = v end) local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end) -local report_buffers = logs.new("buffers","usage") +local report_buffers = logs.reporter("buffers","usage") local concat = table.concat local type, next = type, next diff --git a/tex/context/base/buff-par.lua b/tex/context/base/buff-par.lua index aa4841d8a..2015b0bc0 100644 --- a/tex/context/base/buff-par.lua +++ b/tex/context/base/buff-par.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['buff-ini'] = { local trace_parallel = false trackers.register("buffers.parallel", function(v) trace_parallel = v end) -local report_parallel = logs.new("buffers","parallel") +local report_parallel = logs.reporter("buffers","parallel") local insert, remove, find, gmatch = table.insert, table.remove, string.find, string.gmatch local strip, format = string.strip, string.format diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua index a8721f6ec..c4b7b4a03 100644 --- a/tex/context/base/buff-ver.lua +++ b/tex/context/base/buff-ver.lua @@ -22,7 +22,7 @@ local settings_to_array = utilities.parsers.settings_to_array local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end) -local report_visualizers = logs.new("buffers","visualizers") +local report_visualizers = logs.reporter("buffers","visualizers") visualizers = visualizers or { } diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua index 6a9d1117d..103250d2b 100644 --- a/tex/context/base/char-ini.lua +++ b/tex/context/base/char-ini.lua @@ -24,7 +24,7 @@ local texcatcodes = tex.texcatcodes local trace_defining = false trackers.register("characters.defining", function(v) characters_defining = v end) -local report_defining = logs.new("characters") +local report_defining = logs.reporter("characters") --[[ldx--

This module implements some methods and creates additional datastructured diff --git a/tex/context/base/chem-ini.lua b/tex/context/base/chem-ini.lua index 4bbfe4c38..4d47982a2 100644 --- a/tex/context/base/chem-ini.lua +++ b/tex/context/base/chem-ini.lua @@ -13,7 +13,7 @@ local P, R, V, Cc, Cs = lpeg.P, lpeg.R, lpeg.V, lpeg.Cc, lpeg.Cs local trace_molecules = false trackers.register("chemistry.molecules", function(v) trace_molecules = v end) -local report_chemistry = logs.new("chemistry") +local report_chemistry = logs.reporter("chemistry") local context = context diff --git a/tex/context/base/chem-str.lua b/tex/context/base/chem-str.lua index 0e5f36434..44849c067 100644 --- a/tex/context/base/chem-str.lua +++ b/tex/context/base/chem-str.lua @@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['chem-str'] = { local trace_structure = false trackers.register("chemistry.structure", function(v) trace_structure = v end) local trace_textstack = false trackers.register("chemistry.textstack", function(v) trace_textstack = v end) -local report_chemistry = logs.new("chemistry") +local report_chemistry = logs.reporter("chemistry") local format, gmatch, match, lower, gsub = string.format, string.gmatch, string.match, string.lower, string.gsub local concat, insert, remove = table.concat, table.insert, table.remove diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua index 5d84bc9fa..b7f9ee44b 100644 --- a/tex/context/base/cldf-ini.lua +++ b/tex/context/base/cldf-ini.lua @@ -50,8 +50,8 @@ local xmlcatcodes = tex.xmlcatcodes local flush = texsprint -local report_context = logs.new("cld","tex") -local report_cld = logs.new("cld","stack") +local report_context = logs.reporter("cld","tex") +local report_cld = logs.reporter("cld","stack") local processlines = true -- experiments.register("context.processlines", function(v) processlines = v end) diff --git a/tex/context/base/colo-icc.lua b/tex/context/base/colo-icc.lua index 4687bfe3f..2ce34e8cd 100644 --- a/tex/context/base/colo-icc.lua +++ b/tex/context/base/colo-icc.lua @@ -11,7 +11,7 @@ local readstring, readnumber = io.readstring, io.readnumber local colors = attributes and attributes.colors or { } -- when used in mtxrun -local report_colors = logs.new("colors","icc") +local report_colors = logs.reporter("colors","icc") local R, Cs, lpegmatch = lpeg.R, lpeg.Cs, lpeg.match diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index eed68d4c6..75cee7b23 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -14,7 +14,7 @@ local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns local trace_define = false trackers.register("colors.define",function(v) trace_define = v end) -local report_colors = logs.new("colors","defining") +local report_colors = logs.reporter("colors","defining") local attributes, context, commands = attributes, context, commands diff --git a/tex/context/base/core-ctx.lua b/tex/context/base/core-ctx.lua index b6ea7e66b..1ee8e9698 100644 --- a/tex/context/base/core-ctx.lua +++ b/tex/context/base/core-ctx.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['core-ctx'] = { local trace_prepfiles = false trackers.register("system.prepfiles", function(v) trace_prepfiles = v end) -local report_prepfiles = logs.new("system","prepfiles") +local report_prepfiles = logs.reporter("system","prepfiles") commands = commands or { } local commands = commands diff --git a/tex/context/base/core-job.lua b/tex/context/base/core-job.lua index 56e71f8ae..f56d2ca1f 100644 --- a/tex/context/base/core-job.lua +++ b/tex/context/base/core-job.lua @@ -19,7 +19,7 @@ resolvers.maxreadlevel = 3 directives.register("resolvers.maxreadlevel", function(v) resolvers.maxreadlevel = tonumber(v) or resolvers.maxreadlevel end) -local report_examodes = logs.new("system","examodes") -- maybe another category +local report_examodes = logs.reporter("system","examodes") -- maybe another category local function exists(n) if io.exists(n) then @@ -130,7 +130,7 @@ function commands.loadexamodes(filename) end end -local report_options = logs.new("system","options") +local report_options = logs.reporter("system","options") function commands.logoptionfile(name) -- todo: xml if xml logmode diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua index f302d6051..cae744176 100644 --- a/tex/context/base/core-uti.lua +++ b/tex/context/base/core-uti.lua @@ -24,7 +24,7 @@ local serialize = table.serialize local packers = utilities.packers local allocate, mark = utilities.storage.allocate, utilities.storage.mark -local report_jobcontrol = logs.new("jobcontrol") +local report_jobcontrol = logs.reporter("jobcontrol") job = job or { } local job = job diff --git a/tex/context/base/data-aux.lua b/tex/context/base/data-aux.lua index 480005a45..058033afe 100644 --- a/tex/context/base/data-aux.lua +++ b/tex/context/base/data-aux.lua @@ -13,7 +13,7 @@ local trace_locating = false trackers.register("resolvers.locating", function(v local resolvers = resolvers -local report_scripts = logs.new("resolvers","scripts") +local report_scripts = logs.reporter("resolvers","scripts") function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix local scriptpath = "scripts/context/lua" diff --git a/tex/context/base/data-con.lua b/tex/context/base/data-con.lua index 673361d74..ed4f2dec0 100644 --- a/tex/context/base/data-con.lua +++ b/tex/context/base/data-con.lua @@ -29,7 +29,7 @@ containers = containers or { } local containers = containers containers.usecache = true -local report_containers = logs.new("resolvers","containers") +local report_containers = logs.reporter("resolvers","containers") local function report(container,tag,name) if trace_cache or trace_containers then diff --git a/tex/context/base/data-ctx.lua b/tex/context/base/data-ctx.lua index 6b9dc23ab..adf334d8e 100644 --- a/tex/context/base/data-ctx.lua +++ b/tex/context/base/data-ctx.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-ctx'] = { local format = string.format -local report_dump = logs.new("resolvers","dump") +local report_dump = logs.reporter("resolvers","dump") local resolvers = resolvers diff --git a/tex/context/base/data-exp.lua b/tex/context/base/data-exp.lua index 7ddf7e319..e81389682 100644 --- a/tex/context/base/data-exp.lua +++ b/tex/context/base/data-exp.lua @@ -18,7 +18,7 @@ local collapsepath = file.collapsepath local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end) -local report_expansions = logs.new("resolvers","expansions") +local report_expansions = logs.reporter("resolvers","expansions") local resolvers = resolvers diff --git a/tex/context/base/data-fil.lua b/tex/context/base/data-fil.lua index c9d8b23e1..0e82008f3 100644 --- a/tex/context/base/data-fil.lua +++ b/tex/context/base/data-fil.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-fil'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_files = logs.new("resolvers","files") +local report_files = logs.reporter("resolvers","files") local resolvers = resolvers diff --git a/tex/context/base/data-ini.lua b/tex/context/base/data-ini.lua index 5579ea964..7b114e47b 100644 --- a/tex/context/base/data-ini.lua +++ b/tex/context/base/data-ini.lua @@ -16,7 +16,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end) local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end) -local report_initialization = logs.new("resolvers","initialization") +local report_initialization = logs.reporter("resolvers","initialization") local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv diff --git a/tex/context/base/data-lst.lua b/tex/context/base/data-lst.lua index e2ad5164e..3f9425340 100644 --- a/tex/context/base/data-lst.lua +++ b/tex/context/base/data-lst.lua @@ -14,7 +14,7 @@ resolvers.listers = resolvers.listers or { } local resolvers = resolvers -local report_lists = logs.new("resolvers","lists") +local report_lists = logs.reporter("resolvers","lists") local function tabstr(str) if type(str) == 'table' then diff --git a/tex/context/base/data-lua.lua b/tex/context/base/data-lua.lua index ead64fe42..065714407 100644 --- a/tex/context/base/data-lua.lua +++ b/tex/context/base/data-lua.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['data-lua'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_libraries = logs.new("resolvers","libraries") +local report_libraries = logs.reporter("resolvers","libraries") local gsub, insert = string.gsub, table.insert local unpack = unpack or table.unpack diff --git a/tex/context/base/data-met.lua b/tex/context/base/data-met.lua index f9906c854..5437d9a29 100644 --- a/tex/context/base/data-met.lua +++ b/tex/context/base/data-met.lua @@ -17,7 +17,7 @@ trackers.register("resolvers.methods", function(v) trace_methods = v end) --~ trace_methods = true -local report_methods = logs.new("resolvers","methods") +local report_methods = logs.reporter("resolvers","methods") local allocate = utilities.storage.allocate diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua index cd63941da..0683a08b7 100644 --- a/tex/context/base/data-res.lua +++ b/tex/context/base/data-res.lua @@ -30,7 +30,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end) local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end) -local report_resolving = logs.new("resolvers","resolving") +local report_resolving = logs.reporter("resolvers","resolving") local resolvers = resolvers diff --git a/tex/context/base/data-sch.lua b/tex/context/base/data-sch.lua index 7d777319f..1f4a77a79 100644 --- a/tex/context/base/data-sch.lua +++ b/tex/context/base/data-sch.lua @@ -13,7 +13,7 @@ local finders, openers, loaders = resolvers.finders, resolvers.openers, resolver local trace_schemes = false trackers.register("resolvers.schemes",function(v) trace_schemes = v end) -local report_schemes = logs.new("resolvers","schemes") +local report_schemes = logs.reporter("resolvers","schemes") local resolvers = resolvers diff --git a/tex/context/base/data-tex.lua b/tex/context/base/data-tex.lua index 38ecaed74..d6c375b52 100644 --- a/tex/context/base/data-tex.lua +++ b/tex/context/base/data-tex.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-tex'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_tex = logs.new("resolvers","tex") +local report_tex = logs.reporter("resolvers","tex") local resolvers = resolvers diff --git a/tex/context/base/data-tmf.lua b/tex/context/base/data-tmf.lua index 4c39b57cf..9391e881e 100644 --- a/tex/context/base/data-tmf.lua +++ b/tex/context/base/data-tmf.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-tmf'] = { local resolvers = resolvers -local report_tds = logs.new("resolvers","tds") +local report_tds = logs.reporter("resolvers","tds") -- = << -- ? ?? diff --git a/tex/context/base/data-tmp.lua b/tex/context/base/data-tmp.lua index 4084eda62..240493195 100644 --- a/tex/context/base/data-tmp.lua +++ b/tex/context/base/data-tmp.lua @@ -28,8 +28,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end) -local report_caches = logs.new("resolvers","caches") -local report_resolvers = logs.new("resolvers","caching") +local report_caches = logs.reporter("resolvers","caches") +local report_resolvers = logs.reporter("resolvers","caching") local resolvers = resolvers diff --git a/tex/context/base/data-tre.lua b/tex/context/base/data-tre.lua index 3de7bc5b5..88bf4f112 100644 --- a/tex/context/base/data-tre.lua +++ b/tex/context/base/data-tre.lua @@ -12,7 +12,7 @@ local find, gsub, format = string.find, string.gsub, string.format local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_trees = logs.new("resolvers","trees") +local report_trees = logs.reporter("resolvers","trees") local resolvers = resolvers diff --git a/tex/context/base/data-use.lua b/tex/context/base/data-use.lua index 9a31b13c8..d2a9b7571 100644 --- a/tex/context/base/data-use.lua +++ b/tex/context/base/data-use.lua @@ -10,7 +10,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_mounts = logs.new("resolvers","mounts") +local report_mounts = logs.reporter("resolvers","mounts") local resolvers = resolvers diff --git a/tex/context/base/data-vir.lua b/tex/context/base/data-vir.lua index 2a7ee1d8b..5a288953f 100644 --- a/tex/context/base/data-vir.lua +++ b/tex/context/base/data-vir.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['data-vir'] = { local format = string.format local trace_virtual = false -local report_virtual = logs.new("resolvers","virtual") +local report_virtual = logs.reporter("resolvers","virtual") trackers.register("resolvers.locating", function(v) trace_virtual = v end) trackers.register("resolvers.virtual", function(v) trace_virtual = v end) diff --git a/tex/context/base/data-zip.lua b/tex/context/base/data-zip.lua index 706461aaf..6a50d2aa9 100644 --- a/tex/context/base/data-zip.lua +++ b/tex/context/base/data-zip.lua @@ -12,7 +12,7 @@ local format, find, match = string.format, string.find, string.match local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_zip = logs.new("resolvers","zip") +local report_zip = logs.reporter("resolvers","zip") -- zip:///oeps.zip?name=bla/bla.tex -- zip:///oeps.zip?tree=tex/texmf-local diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua index 31ed1332a..aaf947632 100644 --- a/tex/context/base/font-afm.lua +++ b/tex/context/base/font-afm.lua @@ -22,7 +22,7 @@ local trace_indexing = false trackers.register("afm.indexing", function(v) tr local trace_loading = false trackers.register("afm.loading", function(v) trace_loading = v end) local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_afm = logs.new("fonts","afm loading") +local report_afm = logs.reporter("fonts","afm loading") local next, type = next, type local format, match, gmatch, lower, gsub, strip = string.format, string.match, string.gmatch, string.lower, string.gsub, string.strip diff --git a/tex/context/base/font-chk.lua b/tex/context/base/font-chk.lua index b3a08e50c..d6a0cdcc8 100644 --- a/tex/context/base/font-chk.lua +++ b/tex/context/base/font-chk.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-chk'] = { -- possible optimization: delayed initialization of vectors -local report_fonts = logs.new("fonts","checking") +local report_fonts = logs.reporter("fonts","checking") local fonts = fonts diff --git a/tex/context/base/font-cid.lua b/tex/context/base/font-cid.lua index ed9a25563..a9bd3c56e 100644 --- a/tex/context/base/font-cid.lua +++ b/tex/context/base/font-cid.lua @@ -12,7 +12,7 @@ local lpegmatch = lpeg.match local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua index 5b5eaf8ea..e1c2afe48 100644 --- a/tex/context/base/font-col.lua +++ b/tex/context/base/font-col.lua @@ -15,7 +15,7 @@ local settings_to_hash = utilities.parsers.settings_to_hash local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end) -local report_fonts = logs.new("fonts","collections") +local report_fonts = logs.reporter("fonts","collections") local fonts, context = fonts, context diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 22b908825..4a88d3527 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -22,9 +22,9 @@ local trace_defining = false trackers.register("fonts.defining", function(v) tr local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end) local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end) -local report_defining = logs.new("fonts","defining") -local report_status = logs.new("fonts","status") -local report_mapfiles = logs.new("fonts","mapfiles") +local report_defining = logs.reporter("fonts","defining") +local report_status = logs.reporter("fonts","status") +local report_mapfiles = logs.reporter("fonts","mapfiles") local fonts = fonts local tfm = fonts.tfm diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua index 09b23f8dc..61132e661 100644 --- a/tex/context/base/font-def.lua +++ b/tex/context/base/font-def.lua @@ -19,7 +19,7 @@ local directive_embedall = false directives.register("fonts.embedall", function trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading") trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*") -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") --[[ldx--

Here we deal with defining fonts. We do so by intercepting the diff --git a/tex/context/base/font-enc.lua b/tex/context/base/font-enc.lua index a70d30c10..a18db6730 100644 --- a/tex/context/base/font-enc.lua +++ b/tex/context/base/font-enc.lua @@ -29,7 +29,7 @@ enc.known = utilities.storage.allocate { -- sort of obsolete t2a = true, t2b = true, t2c = true, - unicode = true + unicode = true, } function enc.is_known(encoding) diff --git a/tex/context/base/font-enh.lua b/tex/context/base/font-enh.lua index b745b8f6c..77c145c4b 100644 --- a/tex/context/base/font-enh.lua +++ b/tex/context/base/font-enh.lua @@ -12,7 +12,7 @@ local next, match = next, string.match local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") -- tfmdata has also fast access to indices and unicodes -- to be checked: otf -> tfm -> tfmscaled diff --git a/tex/context/base/font-ext.lua b/tex/context/base/font-ext.lua index ff9a70108..eb1e9f447 100644 --- a/tex/context/base/font-ext.lua +++ b/tex/context/base/font-ext.lua @@ -17,8 +17,8 @@ local allocate = utilities.storage.allocate local trace_protrusion = false trackers.register("fonts.protrusion", function(v) trace_protrusion = v end) local trace_expansion = false trackers.register("fonts.expansion", function(v) trace_expansion = v end) -local report_expansions = logs.new("fonts","expansions") -local report_protrusions = logs.new("fonts","protrusions") +local report_expansions = logs.reporter("fonts","expansions") +local report_protrusions = logs.reporter("fonts","protrusions") commands = commands or { } @@ -217,7 +217,7 @@ initializers.node.afm.expansion = initializers.common.expansion fonts.goodies.register("expansions", function(...) return fonts.goodies.report("expansions", trace_expansion, ...) end) -local report_opbd = logs.new("fonts","otf opbd") +local report_opbd = logs.reporter("fonts","otf opbd") -- -- -- -- -- -- -- protrusion diff --git a/tex/context/base/font-fbk.lua b/tex/context/base/font-fbk.lua index 6092f7442..586af127b 100644 --- a/tex/context/base/font-fbk.lua +++ b/tex/context/base/font-fbk.lua @@ -14,7 +14,7 @@ local trace_combining_all = false trackers.register("fonts.combining.all", func trackers.register("fonts.composing", "fonts.combining") -local report_combining = logs.new("fonts","combining") +local report_combining = logs.reporter("fonts","combining") local allocate = utilities.storage.allocate diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua index 048eecd12..f5c5a3127 100644 --- a/tex/context/base/font-gds.lua +++ b/tex/context/base/font-gds.lua @@ -11,7 +11,7 @@ local gmatch = string.gmatch local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end) -local report_fonts = logs.new("fonts","goodies") +local report_fonts = logs.reporter("fonts","goodies") local allocate = utilities.storage.allocate diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua index 077be7c0c..3eee559a0 100644 --- a/tex/context/base/font-ini.lua +++ b/tex/context/base/font-ini.lua @@ -16,7 +16,7 @@ local write_nl = texio.write_nl local lower = string.lower local allocate, mark = utilities.storage.allocate, utilities.storage.mark -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") fontloader.totable = fontloader.to_table diff --git a/tex/context/base/font-log.lua b/tex/context/base/font-log.lua index d7fc16f58..0dbde8e39 100644 --- a/tex/context/base/font-log.lua +++ b/tex/context/base/font-log.lua @@ -10,7 +10,7 @@ local next, format, lower, concat = next, string.format, string.lower, table.con local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") local fonts = fonts fonts.logger = fonts.logger or { } diff --git a/tex/context/base/font-lua.lua b/tex/context/base/font-lua.lua index fe07dd38b..a6fcc1642 100644 --- a/tex/context/base/font-lua.lua +++ b/tex/context/base/font-lua.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-lua'] = { local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_lua = logs.new("fonts","lua loading") +local report_lua = logs.reporter("fonts","lua loading") fonts.formats.lua = "lua" diff --git a/tex/context/base/font-map.lua b/tex/context/base/font-map.lua index 48ba29a78..cabdbbac6 100644 --- a/tex/context/base/font-map.lua +++ b/tex/context/base/font-map.lua @@ -14,7 +14,7 @@ local utfbyte = utf.byte local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") --[[ldx--

Eventually this code will disappear because map files are kind diff --git a/tex/context/base/font-otb.lua b/tex/context/base/font-otb.lua index 23326607f..8ee39b8c5 100644 --- a/tex/context/base/font-otb.lua +++ b/tex/context/base/font-otb.lua @@ -23,7 +23,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end) local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end) -local report_prepare = logs.new("fonts","otf prepare") +local report_prepare = logs.reporter("fonts","otf prepare") local wildcard = "*" local default = "dflt" diff --git a/tex/context/base/font-otc.lua b/tex/context/base/font-otc.lua index 17e442978..93b942f9a 100644 --- a/tex/context/base/font-otc.lua +++ b/tex/context/base/font-otc.lua @@ -16,7 +16,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_ local fonts = fonts local otf = fonts.otf -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") -- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to -- have always); some day we can write a "force always when true" trick for other diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua index 299b703c6..475481643 100644 --- a/tex/context/base/font-otd.lua +++ b/tex/context/base/font-otd.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-otd'] = { local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.otf diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index 80046281a..68d3c730c 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/font-otf.lua @@ -32,7 +32,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v) local trace_math = false trackers.register("otf.math", function(v) trace_math = v end) local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index c4abeba22..6c5ba12c8 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -148,11 +148,11 @@ local trace_steps = false trackers.register("otf.steps", function local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end) local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end) -local report_direct = logs.new("fonts","otf direct") -local report_subchain = logs.new("fonts","otf subchain") -local report_chain = logs.new("fonts","otf chain") -local report_process = logs.new("fonts","otf process") -local report_prepare = logs.new("fonts","otf prepare") +local report_direct = logs.reporter("fonts","otf direct") +local report_subchain = logs.reporter("fonts","otf subchain") +local report_chain = logs.reporter("fonts","otf chain") +local report_process = logs.reporter("fonts","otf process") +local report_prepare = logs.reporter("fonts","otf prepare") trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end) trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end) diff --git a/tex/context/base/font-otp.lua b/tex/context/base/font-otp.lua index fe5ced658..221c127f2 100644 --- a/tex/context/base/font-otp.lua +++ b/tex/context/base/font-otp.lua @@ -13,7 +13,7 @@ local sort, concat = table.sort, table.concat local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") fonts = fonts or { } -- this module is also used in mtxrun local fonts = fonts diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua index 5efdab3b4..ee83daaf6 100644 --- a/tex/context/base/font-syn.lua +++ b/tex/context/base/font-syn.lua @@ -24,7 +24,7 @@ local trace_names = false trackers.register("fonts.names", fu local trace_warnings = false trackers.register("fonts.warnings", function(v) trace_warnings = v end) local trace_specifications = false trackers.register("fonts.specifications", function(v) trace_specifications = v end) -local report_names = logs.new("fonts","names") +local report_names = logs.reporter("fonts","names") --[[ldx--

This module implements a name to filename resolver. Names are resolved diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua index d7cd0c15e..7fa308c25 100644 --- a/tex/context/base/font-tfm.lua +++ b/tex/context/base/font-tfm.lua @@ -16,7 +16,7 @@ local allocate = utilities.storage.allocate local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end) -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") -- tfmdata has also fast access to indices and unicodes -- to be checked: otf -> tfm -> tfmscaled diff --git a/tex/context/base/grph-fil.lua b/tex/context/base/grph-fil.lua index 95141d03e..e036cf9a1 100644 --- a/tex/context/base/grph-fil.lua +++ b/tex/context/base/grph-fil.lua @@ -10,7 +10,7 @@ local format, concat = string.format, table.concat local trace_run = false trackers.register("graphic.runfile",function(v) trace_run = v end) -local report_run = logs.new("graphics","run") +local report_run = logs.reporter("graphics","run") local allocate, mark = utilities.storage.allocate, utilities.storage.mark diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua index 9546218ef..71ef9430a 100644 --- a/tex/context/base/grph-inc.lua +++ b/tex/context/base/grph-inc.lua @@ -55,7 +55,7 @@ local trace_programs = false trackers.register("graphics.programs", functio local trace_conversion = false trackers.register("graphics.conversion", function(v) trace_conversion = v end) local trace_inclusion = false trackers.register("graphics.inclusion", function(v) trace_inclusion = v end) -local report_inclusion = logs.new("graphics","inclusion") +local report_inclusion = logs.reporter("graphics","inclusion") local context, img = context, img diff --git a/tex/context/base/grph-u3d.lua b/tex/context/base/grph-u3d.lua index 25a5addef..09bfd29e7 100644 --- a/tex/context/base/grph-u3d.lua +++ b/tex/context/base/grph-u3d.lua @@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['grph-u3d'] = { local trace_inclusion = false trackers.register("figures.inclusion", function(v) trace_inclusion = v end) -local report_u3d = logs.new("graphics","u3d") +local report_u3d = logs.reporter("graphics","u3d") local figures = figures diff --git a/tex/context/base/grph-wnd.lua b/tex/context/base/grph-wnd.lua index 5e048ad46..0ea3f8c43 100644 --- a/tex/context/base/grph-wnd.lua +++ b/tex/context/base/grph-wnd.lua @@ -14,7 +14,7 @@ local converters, suffixes = figures.converters, figures.suffixes local trace_conversion = false trackers.register("figures.conversion", function(v) trace_conversion = v end) -local report_wand = logs.new("graphics","wand") +local report_wand = logs.reporter("graphics","wand") local function togray(oldname,newname) if lfs.isfile(oldname) then diff --git a/tex/context/base/java-ini.lua b/tex/context/base/java-ini.lua index cbe8ab30a..d69b5322c 100644 --- a/tex/context/base/java-ini.lua +++ b/tex/context/base/java-ini.lua @@ -17,7 +17,7 @@ local variables = interfaces.variables local trace_javascript = false trackers.register("backends.javascript", function(v) trace_javascript = v end) -local report_javascripts = logs.new("interactions","javascripts") +local report_javascripts = logs.reporter("interactions","javascripts") interactions.javascripts = interactions.javascripts or { } local javascripts = interactions.javascripts @@ -192,7 +192,7 @@ function javascripts.usescripts(name) context.startnointerference() context.startreadingfile() context.input(foundname) - context.showcolormessage("javascript",1,name) + context.showmessage("javascripts",1,name) context.stopreadingfile() context.stopnointerference() end) diff --git a/tex/context/base/lang-ini.lua b/tex/context/base/lang-ini.lua index c3bed03a6..0a2d76508 100644 --- a/tex/context/base/lang-ini.lua +++ b/tex/context/base/lang-ini.lua @@ -27,7 +27,7 @@ local settings_to_array = utilities.parsers.settings_to_array local trace_patterns = false trackers.register("languages.patterns", function(v) trace_patterns = v end) -local report_initialization = logs.new("languages","initialization") +local report_initialization = logs.reporter("languages","initialization") local prehyphenchar, posthyphenchar = lang.prehyphenchar, lang.posthyphenchar -- global per language local lefthyphenmin, righthyphenmin = lang.lefthyphenmin, lang.righthyphenmin diff --git a/tex/context/base/lang-lab.lua b/tex/context/base/lang-lab.lua index 41cd40df7..58fff29cd 100644 --- a/tex/context/base/lang-lab.lua +++ b/tex/context/base/lang-lab.lua @@ -69,7 +69,7 @@ languages.data = languages.data or { } local trace_labels = false trackers.register("languages.labels", function(v) trace_labels = v end) -local report_labels = logs.new("languages","labels") +local report_labels = logs.reporter("languages","labels") function languages.labels.define() local variables = interfaces.variables diff --git a/tex/context/base/lang-wrd.lua b/tex/context/base/lang-wrd.lua index b8eb19353..558d5744f 100644 --- a/tex/context/base/lang-wrd.lua +++ b/tex/context/base/lang-wrd.lua @@ -12,7 +12,7 @@ local concat = table.concat local lpegmatch = lpeg.match local P, S, Cs = lpeg.P, lpeg.S, lpeg.Cs -local report_words = logs.new("languages","words") +local report_words = logs.reporter("languages","words") local nodes, node, languages = nodes, node, languages diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua index d020c8a78..60711044e 100644 --- a/tex/context/base/lpdf-ano.lua +++ b/tex/context/base/lpdf-ano.lua @@ -16,9 +16,9 @@ local trace_references = false trackers.register("references.references", f local trace_destinations = false trackers.register("references.destinations", function(v) trace_destinations = v end) local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end) -local report_reference = logs.new("backend","references") -local report_destination = logs.new("backend","destinations") -local report_bookmark = logs.new("backend","bookmarks") +local report_reference = logs.reporter("backend","references") +local report_destination = logs.reporter("backend","destinations") +local report_bookmark = logs.reporter("backend","bookmarks") local variables = interfaces.variables local constants = interfaces.constants diff --git a/tex/context/base/lpdf-enc.lua b/tex/context/base/lpdf-enc.lua new file mode 100644 index 000000000..090fb15cd --- /dev/null +++ b/tex/context/base/lpdf-enc.lua @@ -0,0 +1,157 @@ +if not modules then modules = { } end modules ['lpdf-enc'] = { + version = 1.001, + comment = "companion to lpdf-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- delayed loading + +local pdfconstant = lpdf.constant + +return lpdf.dictionary { + Type = pdfconstant("Encoding"), + Differences = lpdf.array { + 24, + pdfconstant("breve"), + pdfconstant("caron"), + pdfconstant("circumflex"), + pdfconstant("dotaccent"), + pdfconstant("hungarumlaut"), + pdfconstant("ogonek"), + pdfconstant("ring"), + pdfconstant("tilde"), + 39, + pdfconstant("quotesingle"), + 96, + pdfconstant("grave"), + 128, + pdfconstant("bullet"), + pdfconstant("dagger"), + pdfconstant("daggerdbl"), + pdfconstant("ellipsis"), + pdfconstant("emdash"), + pdfconstant("endash"), + pdfconstant("florin"), + pdfconstant("fraction"), + pdfconstant("guilsinglleft"), + pdfconstant("guilsinglright"), + pdfconstant("minus"), + pdfconstant("perthousand"), + pdfconstant("quotedblbase"), + pdfconstant("quotedblleft"), + pdfconstant("quotedblright"), + pdfconstant("quoteleft"), + pdfconstant("quoteright"), + pdfconstant("quotesinglbase"), + pdfconstant("trademark"), + pdfconstant("fi"), + pdfconstant("fl"), + pdfconstant("Lslash"), + pdfconstant("OE"), + pdfconstant("Scaron"), + pdfconstant("Ydieresis"), + pdfconstant("Zcaron"), + pdfconstant("dotlessi"), + pdfconstant("lslash"), + pdfconstant("oe"), + pdfconstant("scaron"), + pdfconstant("zcaron"), + 160, + pdfconstant("Euro"), + 164, + pdfconstant("currency"), + 166, + pdfconstant("brokenbar"), + 168, + pdfconstant("dieresis"), + pdfconstant("copyright"), + pdfconstant("ordfeminine"), + 172, + pdfconstant("logicalnot"), + pdfconstant(".notdef"), + pdfconstant("registered"), + pdfconstant("macron"), + pdfconstant("degree"), + pdfconstant("plusminus"), + pdfconstant("twosuperior"), + pdfconstant("threesuperior"), + pdfconstant("acute"), + pdfconstant("mu"), + 183, + pdfconstant("periodcentered"), + pdfconstant("cedilla"), + pdfconstant("onesuperior"), + pdfconstant("ordmasculine"), + 188, + pdfconstant("onequarter"), + pdfconstant("onehalf"), + pdfconstant("threequarters"), + 192, + pdfconstant("Agrave"), + pdfconstant("Aacute"), + pdfconstant("Acircumflex"), + pdfconstant("Atilde"), + pdfconstant("Adieresis"), + pdfconstant("Aring"), + pdfconstant("AE"), + pdfconstant("Ccedilla"), + pdfconstant("Egrave"), + pdfconstant("Eacute"), + pdfconstant("Ecircumflex"), + pdfconstant("Edieresis"), + pdfconstant("Igrave"), + pdfconstant("Iacute"), + pdfconstant("Icircumflex"), + pdfconstant("Idieresis"), + pdfconstant("Eth"), + pdfconstant("Ntilde"), + pdfconstant("Ograve"), + pdfconstant("Oacute"), + pdfconstant("Ocircumflex"), + pdfconstant("Otilde"), + pdfconstant("Odieresis"), + pdfconstant("multiply"), + pdfconstant("Oslash"), + pdfconstant("Ugrave"), + pdfconstant("Uacute"), + pdfconstant("Ucircumflex"), + pdfconstant("Udieresis"), + pdfconstant("Yacute"), + pdfconstant("Thorn"), + pdfconstant("germandbls"), + pdfconstant("agrave"), + pdfconstant("aacute"), + pdfconstant("acircumflex"), + pdfconstant("atilde"), + pdfconstant("adieresis"), + pdfconstant("aring"), + pdfconstant("ae"), + pdfconstant("ccedilla"), + pdfconstant("egrave"), + pdfconstant("eacute"), + pdfconstant("ecircumflex"), + pdfconstant("edieresis"), + pdfconstant("igrave"), + pdfconstant("iacute"), + pdfconstant("icircumflex"), + pdfconstant("idieresis"), + pdfconstant("eth"), + pdfconstant("ntilde"), + pdfconstant("ograve"), + pdfconstant("oacute"), + pdfconstant("ocircumflex"), + pdfconstant("otilde"), + pdfconstant("odieresis"), + pdfconstant("divide"), + pdfconstant("oslash"), + pdfconstant("ugrave"), + pdfconstant("uacute"), + pdfconstant("ucircumflex"), + pdfconstant("udieresis"), + pdfconstant("yacute"), + pdfconstant("thorn"), + pdfconstant("ydieresis"), + }, +} diff --git a/tex/context/base/lpdf-epa.lua b/tex/context/base/lpdf-epa.lua index 14d0da84f..6afdb23d3 100644 --- a/tex/context/base/lpdf-epa.lua +++ b/tex/context/base/lpdf-epa.lua @@ -14,7 +14,7 @@ local format = string.format local trace_links = false trackers.register("figures.links", function(v) trace_links = v end) -local report_link = logs.new("backend","merging") +local report_link = logs.reporter("backend","merging") local backends, lpdf = backends, lpdf diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index 8b2ccaaec..c189b8a67 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -16,7 +16,7 @@ local bpfactor, todimen = number.dimenfactors.bp, string.todimen local trace_fields = false trackers.register("widgets.fields", function(v) trace_fields = v end) -local report_fields = logs.new("backend","fields") +local report_fields = logs.reporter("backend","fields") local backends, lpdf = backends, lpdf @@ -180,154 +180,11 @@ end local pdfdocencodingvector, pdfdocencodingcapsule +-- we could save some bytes by pasing the vector as string + local function checkpdfdocencoding() - -- not using pdfconstant for all these names saves us quite - -- some bytecode - local encoding = pdfdictionary { - Type = pdfconstant("Encoding"), - Differences = pdfarray { - 24, - "/breve", - "/caron", - "/circumflex", - "/dotaccent", - "/hungarumlaut", - "/ogonek", - "/ring", - "/tilde", - 39, - "/quotesingle", - 96, - "/grave", - 128, - "/bullet", - "/dagger", - "/daggerdbl", - "/ellipsis", - "/emdash", - "/endash", - "/florin", - "/fraction", - "/guilsinglleft", - "/guilsinglright", - "/minus", - "/perthousand", - "/quotedblbase", - "/quotedblleft", - "/quotedblright", - "/quoteleft", - "/quoteright", - "/quotesinglbase", - "/trademark", - "/fi", - "/fl", - "/Lslash", - "/OE", - "/Scaron", - "/Ydieresis", - "/Zcaron", - "/dotlessi", - "/lslash", - "/oe", - "/scaron", - "/zcaron", - 160, - "/Euro", - 164, - "/currency", - 166, - "/brokenbar", - 168, - "/dieresis", - "/copyright", - "/ordfeminine", - 172, - "/logicalnot", - "/.notdef", - "/registered", - "/macron", - "/degree", - "/plusminus", - "/twosuperior", - "/threesuperior", - "/acute", - "/mu", - 183, - "/periodcentered", - "/cedilla", - "/onesuperior", - "/ordmasculine", - 188, - "/onequarter", - "/onehalf", - "/threequarters", - 192, - "/Agrave", - "/Aacute", - "/Acircumflex", - "/Atilde", - "/Adieresis", - "/Aring", - "/AE", - "/Ccedilla", - "/Egrave", - "/Eacute", - "/Ecircumflex", - "/Edieresis", - "/Igrave", - "/Iacute", - "/Icircumflex", - "/Idieresis", - "/Eth", - "/Ntilde", - "/Ograve", - "/Oacute", - "/Ocircumflex", - "/Otilde", - "/Odieresis", - "/multiply", - "/Oslash", - "/Ugrave", - "/Uacute", - "/Ucircumflex", - "/Udieresis", - "/Yacute", - "/Thorn", - "/germandbls", - "/agrave", - "/aacute", - "/acircumflex", - "/atilde", - "/adieresis", - "/aring", - "/ae", - "/ccedilla", - "/egrave", - "/eacute", - "/ecircumflex", - "/edieresis", - "/igrave", - "/iacute", - "/icircumflex", - "/idieresis", - "/eth", - "/ntilde", - "/ograve", - "/oacute", - "/ocircumflex", - "/otilde", - "/odieresis", - "/divide", - "/oslash", - "/ugrave", - "/uacute", - "/ucircumflex", - "/udieresis", - "/yacute", - "/thorn", - "/ydieresis", - }, - } + report_fields("adding pdfdoc encoding vector") + local encoding = dofile(resolvers.findfile("lpdf-enc.lua")) -- no checking, fatal if not present pdfdocencodingvector = pdfreference(pdfflushobject(encoding)) local capsule = pdfdictionary { PDFDocEncoding = pdfdocencodingvector diff --git a/tex/context/base/lpdf-fmt.lua b/tex/context/base/lpdf-fmt.lua index 8f0a57bf4..8250ce775 100644 --- a/tex/context/base/lpdf-fmt.lua +++ b/tex/context/base/lpdf-fmt.lua @@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['lpdf-fmt'] = { local trace_format = false trackers.register("backend.format", function(v) trace_format = v end) local trace_variables = false trackers.register("backend.variables", function(v) trace_variables = v end) -local report_backend = logs.new("backend","profiles") +local report_backend = logs.reporter("backend","profiles") local backends, lpdf = backends, lpdf diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua index 044ff5c68..0871ea6f0 100644 --- a/tex/context/base/lpdf-ini.lua +++ b/tex/context/base/lpdf-ini.lua @@ -26,8 +26,8 @@ local trace_resources = false trackers.register("backend.resources", function local trace_objects = false trackers.register("backend.objects", function(v) trace_objects = v end) local trace_detail = false trackers.register("backend.detail", function(v) trace_detail = v end) -local report_objects = logs.new("backend","objects") -local report_finalizing = logs.new("backend","finalizing") +local report_objects = logs.reporter("backend","objects") +local report_finalizing = logs.reporter("backend","finalizing") local backends, context = backends, context @@ -510,9 +510,6 @@ end resetpageproperties() local function setpageproperties() ---~ texset("global", "pdfpageresources", pageresources ()) ---~ texset("global", "pdfpageattr", pageattributes ()) ---~ texset("global", "pdfpagesattr", pagesattributes()) pdf.pageresources = pageresources () pdf.pageattributes = pageattributes () pdf.pagesattributes = pagesattributes() diff --git a/tex/context/base/lpdf-tag.lua b/tex/context/base/lpdf-tag.lua index e2afddc51..06f3377bc 100644 --- a/tex/context/base/lpdf-tag.lua +++ b/tex/context/base/lpdf-tag.lua @@ -12,7 +12,7 @@ local utfchar = utf.char local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end) -local report_tags = logs.new("backend","tags") +local report_tags = logs.reporter("backend","tags") local backends, lpdf, nodes = backends, lpdf, nodes diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua index a9e9db2f0..684fa8025 100644 --- a/tex/context/base/lpdf-wid.lua +++ b/tex/context/base/lpdf-wid.lua @@ -11,7 +11,7 @@ local texbox, texcount = tex.box, tex.count local settings_to_array = utilities.parsers.settings_to_array local settings_to_hash = utilities.parsers.settings_to_hash -local report_media = logs.new("backend","media") +local report_media = logs.reporter("backend","media") local backends, lpdf, nodes = backends, lpdf, nodes diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua index e216b5e01..160a5ece1 100644 --- a/tex/context/base/lpdf-xmp.lua +++ b/tex/context/base/lpdf-xmp.lua @@ -12,7 +12,7 @@ local xmlfillin = xml.fillin local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end) -local report_xmp = logs.new("backend","xmp") +local report_xmp = logs.reporter("backend","xmp") local lpdf = lpdf diff --git a/tex/context/base/luat-cbk.lua b/tex/context/base/luat-cbk.lua index ef2a8502f..031a24e0d 100644 --- a/tex/context/base/luat-cbk.lua +++ b/tex/context/base/luat-cbk.lua @@ -12,8 +12,8 @@ local round = math.round local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end) -local report_callbacks = logs.new("system","callbacks") -local report_memory = logs.new("system","memory") +local report_callbacks = logs.reporter("system","callbacks") +local report_memory = logs.reporter("system","memory") --[[ldx--

Callbacks are the real asset of . They permit you to hook diff --git a/tex/context/base/luat-dum.lua b/tex/context/base/luat-dum.lua index 1d1a98e80..f986af864 100644 --- a/tex/context/base/luat-dum.lua +++ b/tex/context/base/luat-dum.lua @@ -35,6 +35,8 @@ storage = { -- probably no longer needed } logs = { new = function() return dummyfunction end, + reporter = function() return dummyfunction end, + messenger = function() return dummyfunction end, report = dummyfunction, } callbacks = { diff --git a/tex/context/base/luat-env.lua b/tex/context/base/luat-env.lua index f5c8cf888..4f1b661c2 100644 --- a/tex/context/base/luat-env.lua +++ b/tex/context/base/luat-env.lua @@ -14,7 +14,7 @@ if not modules then modules = { } end modules ['luat-env'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) -local report_lua = logs.new("resolvers","lua") +local report_lua = logs.reporter("resolvers","lua") local allocate, mark = utilities.storage.allocate, utilities.storage.mark diff --git a/tex/context/base/luat-exe.lua b/tex/context/base/luat-exe.lua index f0841f3d0..42c17ded5 100644 --- a/tex/context/base/luat-exe.lua +++ b/tex/context/base/luat-exe.lua @@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['luat-exe'] = { local match, find, gmatch = string.match, string.find, string.gmatch local concat = table.concat -local report_executers = logs.new("system","executers") +local report_executers = logs.reporter("system","executers") resolvers.executers = resolvers.executers or { } local executers = resolvers.executers diff --git a/tex/context/base/luat-fmt.lua b/tex/context/base/luat-fmt.lua index 1c0e106a6..cfb9a0bb7 100644 --- a/tex/context/base/luat-fmt.lua +++ b/tex/context/base/luat-fmt.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['luat-fmt'] = { local format = string.format -local report_format = logs.new("resolvers","formats") +local report_format = logs.reporter("resolvers","formats") -- helper for mtxrun diff --git a/tex/context/base/luat-mac.lua b/tex/context/base/luat-mac.lua index ef34afc89..1b9e09951 100644 --- a/tex/context/base/luat-mac.lua +++ b/tex/context/base/luat-mac.lua @@ -13,7 +13,7 @@ local insert, remove = table.insert, table.remove local rep, sub = string.rep, string.sub local setmetatable = setmetatable -local report_macros = logs.new("interface","macros") +local report_macros = logs.reporter("interface","macros") local stack, top, n, hashes = { }, nil, 0, { } diff --git a/tex/context/base/luat-run.lua b/tex/context/base/luat-run.lua index 172357798..65ac641c9 100644 --- a/tex/context/base/luat-run.lua +++ b/tex/context/base/luat-run.lua @@ -12,8 +12,8 @@ local insert = table.insert local trace_lua_dump = false trackers.register("system.dump", function(v) trace_lua_dump = v end) local trace_temp_files = false trackers.register("system.tempfiles", function(v) trace_temp_files = v end) -local report_lua = logs.new("system","lua") -local report_tempfiles = logs.new("resolvers","tempfiles") +local report_lua = logs.reporter("system","lua") +local report_tempfiles = logs.reporter("resolvers","tempfiles") luatex = luatex or { } local luatex = luatex @@ -67,6 +67,12 @@ end local function report_output_log() end +--~ local function show_open() +--~ end + +--~ local function show_close() +--~ end + local function pre_dump_actions() lua.finalize(trace_lua_dump and report_lua or nil) statistics.reportstorage("log") @@ -78,6 +84,9 @@ end callbacks.register('start_run', start_run, "actions performed at the beginning of a run") callbacks.register('stop_run', stop_run, "actions performed at the end of a run") +--~ callbacks.register('show_open', show_open, "actions performed when opening a file") +--~ callbacks.register('show_close', show_close, "actions performed when closing a file") + callbacks.register('report_output_pages', report_output_pages, "actions performed when reporting pages") callbacks.register('report_output_log', report_output_log, "actions performed when reporting log file") @@ -118,7 +127,7 @@ luatex.registerstopactions(luatex.cleanuptempfiles) local synctex = false -local report_system = logs.new("system") +local report_system = logs.reporter("system") directives.register("system.synctex", function(v) synctex = v diff --git a/tex/context/base/luat-sto.lua b/tex/context/base/luat-sto.lua index de08af8ce..946ce3756 100644 --- a/tex/context/base/luat-sto.lua +++ b/tex/context/base/luat-sto.lua @@ -11,7 +11,7 @@ local gmatch, format, write_nl = string.gmatch, string.format, texio.write_nl local serialize, concat = table.serialize, table.concat local bytecode = lua.bytecode -local report_storage = logs.new("system","storage") +local report_storage = logs.reporter("system","storage") storage = storage or { } local storage = storage diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua index 521fb71ab..a8223c4b4 100644 --- a/tex/context/base/lxml-aux.lua +++ b/tex/context/base/lxml-aux.lua @@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['lxml-aux'] = { local trace_manipulations = false trackers.register("lxml.manipulations", function(v) trace_manipulations = v end) -local report_xml = logs.new("xml") +local report_xml = logs.reporter("xml") local xml = xml diff --git a/tex/context/base/lxml-dir.lua b/tex/context/base/lxml-dir.lua index 80e9577b9..0924931c1 100644 --- a/tex/context/base/lxml-dir.lua +++ b/tex/context/base/lxml-dir.lua @@ -30,7 +30,7 @@ local lxml = lxml lxml.directives = lxml.directives or { } local directives = lxml.directives -local report_lxml = logs.new("xml","tex") +local report_lxml = logs.reporter("xml","tex") local data = { setup = { }, diff --git a/tex/context/base/lxml-ent.lua b/tex/context/base/lxml-ent.lua index 487d13983..5b24d9d68 100644 --- a/tex/context/base/lxml-ent.lua +++ b/tex/context/base/lxml-ent.lua @@ -24,7 +24,7 @@ original entity is returned.

local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end) -local report_xml = logs.new("xml") +local report_xml = logs.reporter("xml") local xml = xml diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua index 91f97b4a2..0f65a741d 100644 --- a/tex/context/base/lxml-lpt.lua +++ b/tex/context/base/lxml-lpt.lua @@ -43,7 +43,7 @@ local trace_lpath = false if trackers then trackers.register("xml.path", local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end -local report_lpath = logs.new("xml","lpath") +local report_lpath = logs.reporter("xml","lpath") --[[ldx--

We've now arrived at an interesting part: accessing the tree using a subset diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 422fb14bf..7d38a8d5a 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = { local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end) -local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end +local report_xml = logs and logs.reporter("xml","core") or function(...) print(format(...)) end --[[ldx--

The parser used here is inspired by the variant discussed in the lua book, but diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua index a3adaf20a..b4cbbbdd3 100644 --- a/tex/context/base/lxml-tex.lua +++ b/tex/context/base/lxml-tex.lua @@ -40,7 +40,7 @@ local trace_loading = false trackers.register("lxml.loading", function(v) tra local trace_access = false trackers.register("lxml.access", function(v) trace_access = v end) local trace_comments = false trackers.register("lxml.comments", function(v) trace_comments = v end) -local report_lxml = logs.new("xml","tex") +local report_lxml = logs.reporter("xml","tex") lxml.loaded = lxml.loaded or { } local loaded = lxml.loaded diff --git a/tex/context/base/m-database.lua b/tex/context/base/m-database.lua index 59e875ee4..8dde9690e 100644 --- a/tex/context/base/m-database.lua +++ b/tex/context/base/m-database.lua @@ -14,7 +14,7 @@ local sprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes local trace_flush = false trackers.register("module.database.flush", function(v) trace_flush = v end) -local report_database = logs.new("database") +local report_database = logs.reporter("database") buffers.database = buffers.database or { } diff --git a/tex/context/base/m-pstricks.lua b/tex/context/base/m-pstricks.lua index 360c566ee..ab2719084 100644 --- a/tex/context/base/m-pstricks.lua +++ b/tex/context/base/m-pstricks.lua @@ -19,7 +19,7 @@ local variables = interfaces.variables moduledata.pstricks = moduledata.pstricks or { } -local report_pstricks = logs.new("pstricks") +local report_pstricks = logs.reporter("pstricks") local template = [[ \starttext diff --git a/tex/context/base/math-ext.lua b/tex/context/base/math-ext.lua index 428bdad0a..75c6e4b26 100644 --- a/tex/context/base/math-ext.lua +++ b/tex/context/base/math-ext.lua @@ -11,7 +11,7 @@ local trace_virtual = false trackers.register("math.virtual", function(v) trace_ local mathematics = mathematics local characters = characters -local report_math = logs.new("mathematics") +local report_math = logs.reporter("mathematics") mathematics.extras = mathematics.extras or { } local extras = mathematics.extras diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua index 693709c63..c34e39bea 100644 --- a/tex/context/base/math-ini.lua +++ b/tex/context/base/math-ini.lua @@ -18,7 +18,7 @@ local allocate = utilities.storage.allocate local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end) -local report_math = logs.new("mathematics","initializing") +local report_math = logs.reporter("mathematics","initializing") mathematics = mathematics or { } local mathematics = mathematics diff --git a/tex/context/base/math-map.lua b/tex/context/base/math-map.lua index 2b3a5e478..b6d57bff5 100644 --- a/tex/context/base/math-map.lua +++ b/tex/context/base/math-map.lua @@ -28,7 +28,7 @@ local texattribute = tex.attribute local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end) -local report_remapping = logs.new("mathematics","remapping") +local report_remapping = logs.reporter("mathematics","remapping") mathematics = mathematics or { } local mathematics = mathematics diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua index 1a337c8c9..6736181e6 100644 --- a/tex/context/base/math-noa.lua +++ b/tex/context/base/math-noa.lua @@ -43,8 +43,8 @@ local trace_remapping = false trackers.register("math.remapping", function(v) local trace_processing = false trackers.register("math.processing", function(v) trace_processing = v end) local trace_analyzing = false trackers.register("math.analyzing", function(v) trace_analyzing = v end) -local report_processing = logs.new("mathematics","processing") -local report_remapping = logs.new("mathematics","remapping") +local report_processing = logs.reporter("mathematics","processing") +local report_remapping = logs.reporter("mathematics","remapping") local nodecodes = nodes.nodecodes local noadcodes = nodes.noadcodes diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index 6a4e50898..e072fe83b 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -16,7 +16,7 @@ local max = math.max local trace_virtual = false trackers.register("math.virtual", function(v) trace_virtual = v end) local trace_timings = false trackers.register("math.timings", function(v) trace_timings = v end) -local report_virtual = logs.new("fonts","virtual math") +local report_virtual = logs.reporter("fonts","virtual math") local fonts, nodes, mathematics = fonts, nodes, mathematics diff --git a/tex/context/base/meta-pdf.lua b/tex/context/base/meta-pdf.lua index 47a398e2c..b554810ee 100644 --- a/tex/context/base/meta-pdf.lua +++ b/tex/context/base/meta-pdf.lua @@ -14,7 +14,7 @@ local concat, format, gsub, find, byte, gmatch, match = table.concat, string.for local lpegmatch = lpeg.match local round = math.round -local report_mptopdf = logs.new("graphics","mptopdf") +local report_mptopdf = logs.reporter("graphics","mptopdf") local mplib, metapost, lpdf, context = mplib, metapost, lpdf, context diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua index 3baf29c2d..1a5ce2a24 100644 --- a/tex/context/base/mlib-ctx.lua +++ b/tex/context/base/mlib-ctx.lua @@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['mlib-ctx'] = { local format, concat = string.format, table.concat local sprint = tex.sprint -local report_metapost = logs.new("metapost") +local report_metapost = logs.reporter("metapost") local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua index 403dbf0bd..b7f2863ad 100644 --- a/tex/context/base/mlib-pdf.lua +++ b/tex/context/base/mlib-pdf.lua @@ -11,7 +11,7 @@ local abs, sqrt, round = math.abs, math.sqrt, math.round local allocate = utilities.storage.allocate -local report_metapost = logs.new("metapost") +local report_metapost = logs.reporter("metapost") local mplib, context = mplib, context diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua index f5f5b3472..3eb861342 100644 --- a/tex/context/base/mlib-pps.lua +++ b/tex/context/base/mlib-pps.lua @@ -25,7 +25,7 @@ local context = context local trace_textexts = false trackers.register("metapost.textexts", function(v) trace_textexts = v end) -local report_metapost = logs.new("metapost") +local report_metapost = logs.reporter("metapost") local colors = attributes.colors diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua index 361298ed5..e35d92b28 100644 --- a/tex/context/base/mlib-run.lua +++ b/tex/context/base/mlib-run.lua @@ -31,7 +31,7 @@ nears zero.

local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end) -local report_metapost = logs.new("metapost") +local report_metapost = logs.reporter("metapost") local texerrormessage = logs.texerrormessage diff --git a/tex/context/base/mult-aux.lua b/tex/context/base/mult-aux.lua index 4130aa12c..e16eac670 100644 --- a/tex/context/base/mult-aux.lua +++ b/tex/context/base/mult-aux.lua @@ -14,7 +14,7 @@ local variables = interfaces.variables local trace_namespaces = false trackers.register("interfaces.namespaces", function(v) trace_namespaces = v end) -local report_namespaces = logs.new("interface","namespaces") +local report_namespaces = logs.reporter("interface","namespaces") local v_yes, v_list = variables.yes, variables.list diff --git a/tex/context/base/mult-chk.lua b/tex/context/base/mult-chk.lua index 9344a7b8a..efe17db34 100644 --- a/tex/context/base/mult-chk.lua +++ b/tex/context/base/mult-chk.lua @@ -14,7 +14,7 @@ local make_settings_to_hash_pattern, settings_to_set = utilities.parsers.make_se local allocate = utilities.storage.allocate -local report_interface = logs.new("interface","checking") +local report_interface = logs.reporter("interface","checking") interfaces = interfaces or { } diff --git a/tex/context/base/mult-ini.lua b/tex/context/base/mult-ini.lua index c6be54ee6..383ad0287 100644 --- a/tex/context/base/mult-ini.lua +++ b/tex/context/base/mult-ini.lua @@ -12,7 +12,7 @@ local serialize = table.serialize local texsprint = tex.sprint -local report_interface = logs.new("interface","initialization") +local report_interface = logs.reporter("interface","initialization") interfaces = interfaces or { } interfaces.messages = interfaces.messages or { } @@ -59,7 +59,7 @@ setmetatable(constants,valueiskey) setmetatable(elements, valueiskey) setmetatable(messages, { __index = function(t,k) local v = { } ; t[k] = v ; return v end }) -setmetatable(reporters, { __index = function(t,k) local v = logs.new(k) ; t[k] = v ; return v end }) +setmetatable(reporters, { __index = function(t,k) local v = logs.reporter(k) ; t[k] = v ; return v end }) for category, m in next, messages do -- We pre-create reporters for already defined messages diff --git a/tex/context/base/mult-mes.lua b/tex/context/base/mult-mes.lua index 152090c81..14865704d 100644 --- a/tex/context/base/mult-mes.lua +++ b/tex/context/base/mult-mes.lua @@ -917,39 +917,39 @@ return { ["ro"]="interactiuni", }, }, ---~ ["javascripts"]={ ---~ ["1"]={ ---~ ["cs"]="nacita se soubor skriptu %s", ---~ ["de"]="Lade Scriptdatei %s", ---~ ["en"]="loading script set %s", ---~ ["fr"]="chargement du jeu de script %s", ---~ ["it"]="caricamento dello script set %s", ---~ ["nl"]="script set %s wordt geladen", ---~ ["no"]="leser inn scriptsett %s", ---~ ["ro"]="se incarca scriptul %s", ---~ }, ---~ ["2"]={ ---~ ["cs"]="neznama preambule %s", ---~ ["de"]="unbekannte Preamble %s", ---~ ["en"]="unknown preamble %s", ---~ ["fr"]="préambule %s inconnu", ---~ ["it"]="preambolo sconosciuto %s", ---~ ["nl"]="onbekende preamble %s", ---~ ["no"]="ukjent 'preamble' %s", ---~ ["ro"]="preambul necunoscut %s", ---~ }, ---~ ["files"]={ "java-ini.tex" }, ---~ ["title"]={ ---~ ["cs"]="javascripts", ---~ ["de"]="javascripts", ---~ ["en"]="javascripts", ---~ ["fr"]="javascripts", ---~ ["it"]="javascripts", ---~ ["nl"]="javascripts", ---~ ["no"]="javascripts", ---~ ["ro"]="javascripts", ---~ }, ---~ }, + ["javascripts"]={ + ["1"]={ + ["cs"]="nacita se soubor skriptu %s", + ["de"]="Lade Scriptdatei %s", + ["en"]="loading script set %s", + ["fr"]="chargement du jeu de script %s", + ["it"]="caricamento dello script set %s", + ["nl"]="script set %s wordt geladen", + ["no"]="leser inn scriptsett %s", + ["ro"]="se incarca scriptul %s", + }, + ["2"]={ + ["cs"]="neznama preambule %s", + ["de"]="unbekannte Preamble %s", + ["en"]="unknown preamble %s", + ["fr"]="préambule %s inconnu", + ["it"]="preambolo sconosciuto %s", + ["nl"]="onbekende preamble %s", + ["no"]="ukjent 'preamble' %s", + ["ro"]="preambul necunoscut %s", + }, + ["files"]={ "java-ini.tex" }, + ["title"]={ + ["cs"]="javascripts", + ["de"]="javascripts", + ["en"]="javascripts", + ["fr"]="javascripts", + ["it"]="javascripts", + ["nl"]="javascripts", + ["no"]="javascripts", + ["ro"]="javascripts", + }, + }, ["layouts"]={ ["1"]={ ["cs"]="vyska textu prizpusobena s %s na strane %s", diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua index dfb57d9c5..8348e05c3 100644 --- a/tex/context/base/node-fnt.lua +++ b/tex/context/base/node-fnt.lua @@ -14,7 +14,7 @@ local concat = table.concat local trace_characters = false trackers.register("nodes.characters", function(v) trace_characters = v end) local trace_fontrun = false trackers.register("nodes.fontrun", function(v) trace_fontrun = v end) -local report_fonts = logs.new("fonts","processing") +local report_fonts = logs.reporter("fonts","processing") local nodes, node = nodes, node diff --git a/tex/context/base/node-inj.lua b/tex/context/base/node-inj.lua index 836b01085..bf6a60987 100644 --- a/tex/context/base/node-inj.lua +++ b/tex/context/base/node-inj.lua @@ -17,7 +17,7 @@ local next = next local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end) -local report_injections = logs.new("nodes","injections") +local report_injections = logs.reporter("nodes","injections") local attributes, nodes, node = attributes, nodes, node diff --git a/tex/context/base/node-mig.lua b/tex/context/base/node-mig.lua index fb6b4570a..e93887694 100644 --- a/tex/context/base/node-mig.lua +++ b/tex/context/base/node-mig.lua @@ -26,7 +26,7 @@ local migrated = attributes.private("migrated") local trace_migrations = false trackers.register("nodes.migrations", function(v) trace_migrations = v end) -local report_nodes = logs.new("nodes","migrations") +local report_nodes = logs.reporter("nodes","migrations") local migrate_inserts, migrate_marks diff --git a/tex/context/base/node-par.lua b/tex/context/base/node-par.lua index 9a4c51759..b0879c750 100644 --- a/tex/context/base/node-par.lua +++ b/tex/context/base/node-par.lua @@ -33,7 +33,7 @@ local stoptiming = statistics.stoptiming storage.register("builders/paragraphs/constructors/names", names, "builders.paragraphs.constructors.names") storage.register("builders/paragraphs/constructors/numbers", numbers, "builders.paragraphs.constructors.numbers") -local report_parbuilders = logs.new("parbuilders") +local report_parbuilders = logs.reporter("parbuilders") local mainconstructor = nil -- not stored in format diff --git a/tex/context/base/node-pro.lua b/tex/context/base/node-pro.lua index 19ebcdd03..b316f2fe3 100644 --- a/tex/context/base/node-pro.lua +++ b/tex/context/base/node-pro.lua @@ -12,7 +12,7 @@ local format, concat = string.format, table.concat local trace_callbacks = false trackers.register("nodes.callbacks", function(v) trace_callbacks = v end) -local report_nodes = logs.new("nodes","processors") +local report_nodes = logs.reporter("nodes","processors") local nodes, node = nodes, node diff --git a/tex/context/base/node-ref.lua b/tex/context/base/node-ref.lua index e0aa65c6c..c54614359 100644 --- a/tex/context/base/node-ref.lua +++ b/tex/context/base/node-ref.lua @@ -39,9 +39,9 @@ local trace_backend = false trackers.register("nodes.backend", functi local trace_references = false trackers.register("nodes.references", function(v) trace_references = v end) local trace_destinations = false trackers.register("nodes.destinations", function(v) trace_destinations = v end) -local report_reference = logs.new("backend","references") -local report_destination = logs.new("backend","destinations") -local report_area = logs.new("backend","areas") +local report_reference = logs.reporter("backend","references") +local report_destination = logs.reporter("backend","destinations") +local report_area = logs.reporter("backend","areas") local nodecodes = nodes.nodecodes local skipcodes = nodes.skipcodes diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua index b4be0b920..7f52f6f64 100644 --- a/tex/context/base/node-res.lua +++ b/tex/context/base/node-res.lua @@ -14,7 +14,7 @@ local tonumber, round = tonumber, math.round for debugging node management.

--ldx]]-- -local report_nodes = logs.new("nodes","housekeeping") +local report_nodes = logs.reporter("nodes","housekeeping") local nodes, node = nodes, node diff --git a/tex/context/base/node-rul.lua b/tex/context/base/node-rul.lua index d7ef13453..deb5b4341 100644 --- a/tex/context/base/node-rul.lua +++ b/tex/context/base/node-rul.lua @@ -62,7 +62,7 @@ end local trace_ruled = false trackers.register("nodes.rules", function(v) trace_ruled = v end) -local report_ruled = logs.new("nodes","rules") +local report_ruled = logs.reporter("nodes","rules") local floor = math.floor local n_tostring, n_tosequence = nodes.idstostring, nodes.tosequence @@ -319,7 +319,7 @@ end local trace_shifted = false trackers.register("nodes.shifting", function(v) trace_shifted = v end) -local report_shifted = logs.new("nodes","shifting") +local report_shifted = logs.reporter("nodes","shifting") local a_shifted = attributes.private('shifted') diff --git a/tex/context/base/node-spl.lua b/tex/context/base/node-spl.lua index 14bd3fbeb..d6fff9ede 100644 --- a/tex/context/base/node-spl.lua +++ b/tex/context/base/node-spl.lua @@ -31,9 +31,9 @@ local trace_optimize = false trackers.register("builders.paragraphs.solutions.s local trace_colors = false trackers.register("builders.paragraphs.solutions.splitters.colors", function(v) trace_colors = v end) local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end) -local report_solutions = logs.new("fonts","solutions") -local report_splitters = logs.new("nodes","splitters") -local report_optimizers = logs.new("nodes","optimizers") +local report_solutions = logs.reporter("fonts","solutions") +local report_splitters = logs.reporter("nodes","splitters") +local report_optimizers = logs.reporter("nodes","optimizers") local nodes, node = nodes, node diff --git a/tex/context/base/node-tra.lua b/tex/context/base/node-tra.lua index c464d7736..ba081c884 100644 --- a/tex/context/base/node-tra.lua +++ b/tex/context/base/node-tra.lua @@ -17,7 +17,7 @@ local format, match, gmatch, concat, rep = string.format, string.match, string.g local lpegmatch = lpeg.match local write_nl = texio.write_nl -local report_nodes = logs.new("nodes","tracing") +local report_nodes = logs.reporter("nodes","tracing") fonts = fonts or { } nodes = nodes or { } diff --git a/tex/context/base/node-tsk.lua b/tex/context/base/node-tsk.lua index 7792d1248..29a665ff0 100644 --- a/tex/context/base/node-tsk.lua +++ b/tex/context/base/node-tsk.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['node-tsk'] = { local trace_tasks = false trackers.register("tasks.creation", function(v) trace_tasks = v end) -local report_tasks = logs.new("tasks") +local report_tasks = logs.reporter("tasks") local allocate = utilities.storage.allocate diff --git a/tex/context/base/page-flt.lua b/tex/context/base/page-flt.lua index 02cf70840..67e2e5b6f 100644 --- a/tex/context/base/page-flt.lua +++ b/tex/context/base/page-flt.lua @@ -16,7 +16,7 @@ local copy_node_list = node.copy_list local trace_floats = false trackers.register("graphics.floats", function(v) trace_floats = v end) -- name might change -local report_floats = logs.new("structure","floats") +local report_floats = logs.reporter("structure","floats") local C, S, P, lpegmatch = lpeg.C, lpeg.S, lpeg.P, lpeg.match diff --git a/tex/context/base/page-lin.lua b/tex/context/base/page-lin.lua index d31785329..676a4c7f6 100644 --- a/tex/context/base/page-lin.lua +++ b/tex/context/base/page-lin.lua @@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['page-lin'] = { local trace_numbers = false trackers.register("lines.numbers", function(v) trace_numbers = v end) -local report_lines = logs.new("lines") +local report_lines = logs.reporter("lines") local texbox = tex.box diff --git a/tex/context/base/page-str.lua b/tex/context/base/page-str.lua index 4ee2919d1..7ce0f3c0f 100644 --- a/tex/context/base/page-str.lua +++ b/tex/context/base/page-str.lua @@ -28,7 +28,7 @@ local new_glyph = nodepool.glyph local trace_collecting = false trackers.register("streams.collecting", function(v) trace_collecting = v end) local trace_flushing = false trackers.register("streams.flushing", function(v) trace_flushing = v end) -local report_streams = logs.new("streams") +local report_streams = logs.reporter("streams") streams = streams or { } -- might move to the builders namespace local streams = streams diff --git a/tex/context/base/regi-ini.lua b/tex/context/base/regi-ini.lua index c6dae61c1..9cea70ef0 100644 --- a/tex/context/base/regi-ini.lua +++ b/tex/context/base/regi-ini.lua @@ -26,8 +26,8 @@ local textlineactions = resolvers.openers.helpers.textlineactions local trace_translating = false trackers.register("regimes.translating", function(v) trace_translating = v end) -local report_loading = logs.new("regimes","loading") -local report_translating = logs.new("regimes","translating") +local report_loading = logs.reporter("regimes","loading") +local report_translating = logs.reporter("regimes","translating") regimes = regimes or { } local regimes = regimes diff --git a/tex/context/base/scrp-ini.lua b/tex/context/base/scrp-ini.lua index 2d36fd973..650a9fd83 100644 --- a/tex/context/base/scrp-ini.lua +++ b/tex/context/base/scrp-ini.lua @@ -13,7 +13,7 @@ local texwrite = tex.write local trace_analyzing = false trackers.register("scripts.analyzing", function(v) trace_analyzing = v end) local trace_injections = false trackers.register("scripts.injections", function(v) trace_injections = v end) -local report_preprocessing = logs.new("scripts","preprocessing") +local report_preprocessing = logs.reporter("scripts","preprocessing") local allocate = utilities.storage.allocate diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua index 793022e52..37443c257 100644 --- a/tex/context/base/sort-ini.lua +++ b/tex/context/base/sort-ini.lua @@ -50,7 +50,7 @@ local allocate = utilities.storage.allocate local trace_tests = false trackers.register("sorters.tests", function(v) trace_tests = v end) -local report_sorters = logs.new("languages","sorters") +local report_sorters = logs.reporter("languages","sorters") local comparers = { } local splitters = { } diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua index c10ff18fd..2f3f2a38a 100644 --- a/tex/context/base/spac-ver.lua +++ b/tex/context/base/spac-ver.lua @@ -46,9 +46,9 @@ local trace_vspacing = false trackers.register("builders.vspacing", local trace_vsnapping = false trackers.register("builders.vsnapping", function(v) trace_vsnapping = v end) local trace_vpacking = false trackers.register("builders.vpacking", function(v) trace_vpacking = v end) -local report_vspacing = logs.new("vspacing","spacing") -local report_collapser = logs.new("vspacing","collapsing") -local report_snapper = logs.new("vspacing","snapping") +local report_vspacing = logs.reporter("vspacing","spacing") +local report_collapser = logs.reporter("vspacing","collapsing") +local report_snapper = logs.reporter("vspacing","snapping") local a_skipcategory = attributes.private('skipcategory') local a_skippenalty = attributes.private('skippenalty') diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 3df8fa58d..c588c7005 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/strc-bkm.lua b/tex/context/base/strc-bkm.lua index 84bb73e80..6a2cc3827 100644 --- a/tex/context/base/strc-bkm.lua +++ b/tex/context/base/strc-bkm.lua @@ -21,7 +21,7 @@ local codeinjections = backends.codeinjections local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end) -local report_bookmarks = logs.new("structure","bookmarks") +local report_bookmarks = logs.reporter("structure","bookmarks") local structures = structures diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua index 8195bdecf..40b01fcbe 100644 --- a/tex/context/base/strc-doc.lua +++ b/tex/context/base/strc-doc.lua @@ -25,7 +25,7 @@ local variables = interfaces.variables local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end) local trace_detail = false trackers.register("structures.detail", function(v) trace_detail = v end) -local report_structure = logs.new("structure","sectioning") +local report_structure = logs.reporter("structure","sectioning") local structures, context = structures, context diff --git a/tex/context/base/strc-ini.lua b/tex/context/base/strc-ini.lua index 69d7528dd..d213c925e 100644 --- a/tex/context/base/strc-ini.lua +++ b/tex/context/base/strc-ini.lua @@ -31,7 +31,7 @@ local ctxcatcodes, xmlcatcodes, notcatcodes = tex.ctxcatcodes, tex.xmlcatcodes, local trace_processors = false trackers.register("structures.processors", function(v) trace_processors = v end) -local report_processors = logs.new("structure","processors") +local report_processors = logs.reporter("structure","processors") -- move this diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index fca7f56e3..f09444f26 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -21,7 +21,7 @@ local allocate, mark, checked = utilities.storage.allocate, utilities.storage.ma local trace_lists = false trackers.register("structures.lists", function(v) trace_lists = v end) -local report_lists = logs.new("structure","lists") +local report_lists = logs.reporter("structure","lists") local ctxcatcodes = tex.ctxcatcodes diff --git a/tex/context/base/strc-mar.lua b/tex/context/base/strc-mar.lua index c14d93a43..983ffe97e 100644 --- a/tex/context/base/strc-mar.lua +++ b/tex/context/base/strc-mar.lua @@ -28,7 +28,7 @@ local trace_marks_set = false trackers.register("marks.set", function(v) local trace_marks_get = false trackers.register("marks.get", function(v) trace_marks_get = v end) local trace_marks_all = false trackers.register("marks.detail", function(v) trace_marks_all = v end) -local report_marks = logs.new("structure","marks") +local report_marks = logs.reporter("structure","marks") local variables = interfaces.variables diff --git a/tex/context/base/strc-not.lua b/tex/context/base/strc-not.lua index ebc25dd5d..07cd32496 100644 --- a/tex/context/base/strc-not.lua +++ b/tex/context/base/strc-not.lua @@ -12,7 +12,7 @@ local texcount = tex.count local trace_notes = false trackers.register("structures.notes", function(v) trace_notes = v end) -local report_notes = logs.new("structure","notes") +local report_notes = logs.reporter("structure","notes") local structures = structures local helpers = structures.helpers diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua index 8f4f0e245..943e9fd4f 100644 --- a/tex/context/base/strc-num.lua +++ b/tex/context/base/strc-num.lua @@ -14,7 +14,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark local trace_counters = false trackers.register("structures.counters", function(v) trace_counters = v end) -local report_counters = logs.new("structure","counters") +local report_counters = logs.reporter("structure","counters") local structures = structures diff --git a/tex/context/base/strc-pag.lua b/tex/context/base/strc-pag.lua index 19af8cbc4..b899b924b 100644 --- a/tex/context/base/strc-pag.lua +++ b/tex/context/base/strc-pag.lua @@ -13,7 +13,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark local trace_pages = false trackers.register("structures.pages", function(v) trace_pages = v end) -local report_pages = logs.new("structure","pages") +local report_pages = logs.reporter("structure","pages") local structures = structures diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 522442982..d97de03ed 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -16,7 +16,7 @@ local allocate = utilities.storage.allocate local trace_referencing = false trackers.register("structures.referencing", function(v) trace_referencing = v end) -local report_references = logs.new("structure","references") +local report_references = logs.reporter("structure","references") local variables = interfaces.variables local constants = interfaces.constants diff --git a/tex/context/base/strc-reg.lua b/tex/context/base/strc-reg.lua index 3220b3f61..d37997baf 100644 --- a/tex/context/base/strc-reg.lua +++ b/tex/context/base/strc-reg.lua @@ -16,7 +16,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark local trace_registers = false trackers.register("structures.registers", function(v) trace_registers = v end) -local report_registers = logs.new("structure","registers") +local report_registers = logs.reporter("structure","registers") local structures = structures local registers = structures.registers diff --git a/tex/context/base/strc-tag.lua b/tex/context/base/strc-tag.lua index 5563cd834..1c30541c3 100644 --- a/tex/context/base/strc-tag.lua +++ b/tex/context/base/strc-tag.lua @@ -17,7 +17,7 @@ local settings_to_hash = utilities.parsers.settings_to_hash local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end) -local report_tags = logs.new("structure","tags") +local report_tags = logs.reporter("structure","tags") local attributes, structures = attributes, structures diff --git a/tex/context/base/supp-box.lua b/tex/context/base/supp-box.lua index be5bc2864..4d496d8de 100644 --- a/tex/context/base/supp-box.lua +++ b/tex/context/base/supp-box.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['supp-box'] = { -- this is preliminary code -local report_hyphenation = logs.new("languages","hyphenation") +local report_hyphenation = logs.reporter("languages","hyphenation") local nodecodes = nodes.nodecodes diff --git a/tex/context/base/supp-fil.lua b/tex/context/base/supp-fil.lua index 357de5eca..49427ddca 100644 --- a/tex/context/base/supp-fil.lua +++ b/tex/context/base/supp-fil.lua @@ -24,8 +24,8 @@ local isfile = lfs.isfile local trace_modules = false trackers.register("modules.loading", function(v) trace_modules = v end) local trace_files = false trackers.register("resolvers.readfile", function(v) trace_files = v end) -local report_modules = logs.new("resolvers","modules") -local report_files = logs.new("resolvers","files") +local report_modules = logs.reporter("resolvers","modules") +local report_files = logs.reporter("resolvers","files") commands = commands or { } local commands = commands diff --git a/tex/context/base/supp-ran.lua b/tex/context/base/supp-ran.lua index 0be9f66fd..accd5c94c 100644 --- a/tex/context/base/supp-ran.lua +++ b/tex/context/base/supp-ran.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['supp-ran'] = { -- We cannot ask for the current seed, so we need some messy hack -- here. -local report_system = logs.new("system","randomizer") +local report_system = logs.reporter("system","randomizer") commands = commands or { } local commands = commands diff --git a/tex/context/base/trac-deb.lua b/tex/context/base/trac-deb.lua index fdcc5513e..87434a13d 100644 --- a/tex/context/base/trac-deb.lua +++ b/tex/context/base/trac-deb.lua @@ -14,7 +14,7 @@ local texdimen, textoks, texcount = tex.dimen, tex.toks, tex.count -- maybe tracers -> tracers.tex (and tracers.lua for current debugger) -local report_system = logs.new("system","tex") +local report_system = logs.reporter("system","tex") tracers = tracers or { } local tracers = tracers diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua index 79007953a..2c3aa1dec 100644 --- a/tex/context/base/trac-inf.lua +++ b/tex/context/base/trac-inf.lua @@ -149,7 +149,7 @@ function statistics.showjobstat(tag,data,n) else if not template or n > nn then template, n = format("%%-%ss - %%s",n), nn - report_statistics = logs.new("mkiv lua stats") + report_statistics = logs.reporter("mkiv lua stats") end report_statistics(format(template,tag,data)) end @@ -172,7 +172,7 @@ function statistics.runtime() end function statistics.timed(action,report) - report = report or logs.new("system") + report = report or logs.reporter("system") starttiming("run") action() stoptiming("run") diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua index 93e8decf9..92cb768d0 100644 --- a/tex/context/base/trac-log.lua +++ b/tex/context/base/trac-log.lua @@ -26,10 +26,6 @@ provide based logging a sparsing is relatively easy anyway.

logs = logs or { } local logs = logs ---[[ldx-- -

This looks pretty ugly but we need to speed things up a bit.

---ldx]]-- - local moreinfo = [[ More information about ConTeXt and the tools that come with it can be found at: @@ -38,24 +34,12 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net wiki : http://contextgarden.net ]] --- local functions = { --- 'report', 'status', 'start', 'stop', 'line', 'direct', --- 'start_run', 'stop_run', --- 'start_page_number', 'stop_page_number', --- 'report_output_pages', 'report_output_log', --- 'report_tex_stat', 'report_job_stat', --- 'show_open', 'show_close', 'show_load', --- 'dummy', --- } - -- basic loggers local function ignore() end setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end }) --- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|" - local report, subreport, status, settarget if tex and tex.jobname or tex.formatname then @@ -185,7 +169,6 @@ function logs.reporter(category,subcategory) local logger = data[category] if not logger then local state = false ---~ print(category,states) if states == true then state = true elseif type(states) == "table" then @@ -340,27 +323,42 @@ logs.report_job_stat = statistics and statistics.showjobstat local report_files = logs.reporter("files") -local nesting = 0 -local verbose = false +local nesting = 0 +local verbose = false +local hasscheme = url.hasscheme + +-- we don't have show_open and show_close callbacks yet function logs.show_open(name) - if verbose then - nesting = nesting + 1 - report_files("level %s, opening %s",nesting,name) - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- nesting = nesting + 1 + -- report_files("level %s, opening %s",nesting,name) + -- else + -- write(format("(%s",name)) -- tex adds a space + -- end + -- end end function logs.show_close(name) - if verbose then - report_files("level %s, closing %s",nesting,name) - nesting = nesting - 1 - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- report_files("level %s, closing %s",nesting,name) + -- nesting = nesting - 1 + -- else + -- write(")") -- tex adds a space + -- end + -- end end function logs.show_load(name) - if verbose then - report_files("level %s, loading %s",nesting+1,name) - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- report_files("level %s, loading %s",nesting+1,name) + -- else + -- write(format("(%s)",name)) + -- end + -- end end -- there may be scripts out there using this: diff --git a/tex/context/base/trac-pro.lua b/tex/context/base/trac-pro.lua index 596d40897..43c5ef7db 100644 --- a/tex/context/base/trac-pro.lua +++ b/tex/context/base/trac-pro.lua @@ -17,7 +17,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end) -local report_system = logs.new("system","protection") +local report_system = logs.reporter("system","protection") namespaces = namespaces or { } local namespaces = namespaces diff --git a/tex/context/base/trac-set.lua b/tex/context/base/trac-set.lua index 6829f95b0..7eb92bfa6 100644 --- a/tex/context/base/trac-set.lua +++ b/tex/context/base/trac-set.lua @@ -312,7 +312,6 @@ if texconfig then local function set(k,v) v = tonumber(v) if v then ---~ print(k,v) texconfig[k] = v end end diff --git a/tex/context/base/typo-brk.lua b/tex/context/base/typo-brk.lua index 7111497fc..afea669ca 100644 --- a/tex/context/base/typo-brk.lua +++ b/tex/context/base/typo-brk.lua @@ -15,7 +15,7 @@ local format = string.format local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end) -local report_breakpoints = logs.new("typesetting","breakpoints") +local report_breakpoints = logs.reporter("typesetting","breakpoints") local nodes, node = nodes, node diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua index f157ce875..aaa9de933 100644 --- a/tex/context/base/typo-cap.lua +++ b/tex/context/base/typo-cap.lua @@ -12,7 +12,7 @@ local div = math.div local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end) -local report_casing = logs.new("typesetting","casing") +local report_casing = logs.reporter("typesetting","casing") local nodes, node = nodes, node diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua index 3ef8e162b..fbbad96f8 100644 --- a/tex/context/base/typo-dig.lua +++ b/tex/context/base/typo-dig.lua @@ -15,7 +15,7 @@ local round, div = math.round, math.div local trace_digits = false trackers.register("typesetters.digits", function(v) trace_digits = v end) -local report_digits = logs.new("typesetting","digits") +local report_digits = logs.reporter("typesetting","digits") local nodes, node = nodes, node diff --git a/tex/context/base/typo-dir.lua b/tex/context/base/typo-dir.lua index 5a427ef55..49d58239d 100644 --- a/tex/context/base/typo-dir.lua +++ b/tex/context/base/typo-dir.lua @@ -18,7 +18,7 @@ local nodes, node = nodes, node local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end) -local report_directions = logs.new("typesetting","directions") +local report_directions = logs.reporter("typesetting","directions") local has_attribute = node.has_attribute local unset_attribute = node.unset_attribute diff --git a/tex/context/base/typo-rep.lua b/tex/context/base/typo-rep.lua index f90ce16ef..78243229a 100644 --- a/tex/context/base/typo-rep.lua +++ b/tex/context/base/typo-rep.lua @@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['typo-rep'] = { local trace_stripping = false trackers.register("nodes.stripping", function(v) trace_stripping = v end) trackers.register("fonts.stripping", function(v) trace_stripping = v end) -local report_stripping = logs.new("fonts","stripping") +local report_stripping = logs.reporter("fonts","stripping") local nodes, node = nodes, node diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua index 2b89df515..310384aa8 100644 --- a/tex/context/base/typo-spa.lua +++ b/tex/context/base/typo-spa.lua @@ -15,7 +15,7 @@ local utfchar = utf.char local trace_spacing = false trackers.register("typesetters.spacing", function(v) trace_spacing = v end) -local report_spacing = logs.new("typesetting","spacing") +local report_spacing = logs.reporter("typesetting","spacing") local nodes, fonts, node = nodes, fonts, node diff --git a/tex/context/base/util-lua.lua b/tex/context/base/util-lua.lua index 93ae16f47..54c2468ba 100644 --- a/tex/context/base/util-lua.lua +++ b/tex/context/base/util-lua.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['util-lua'] = { utilities = utilities or {} utilities.lua = utilities.lua or { } -utilities.report = logs and logs.new("system") or print +utilities.report = logs and logs.reporter("system") or print function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true utilities.report("lua: compiling %s into %s",luafile,lucfile) diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua index 6eba76d99..3d8e79d93 100644 --- a/tex/context/base/util-mrg.lua +++ b/tex/context/base/util-mrg.lua @@ -14,7 +14,7 @@ local type, next = type, next utilities = utilities or {} utilities.merger = utilities.merger or { } -- maybe mergers -utilities.report = logs and logs.new("system") or print +utilities.report = logs and logs.reporter("system") or print local merger = utilities.merger diff --git a/tex/context/base/x-asciimath.lua b/tex/context/base/x-asciimath.lua index affb24ef9..50f4b0391 100644 --- a/tex/context/base/x-asciimath.lua +++ b/tex/context/base/x-asciimath.lua @@ -16,7 +16,7 @@ local asciimath = { } local moduledata = moduledata or { } moduledata.asciimath = asciimath -local report_asciimath = logs.new("mathematics","asciimath") +local report_asciimath = logs.reporter("mathematics","asciimath") local format = string.format local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 6b0e89fa0..7bfc0e069 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 02/08/11 18:41:10 +-- merge date : 02/08/11 21:46:05 do -- begin closure to overcome local limits and interference @@ -2398,6 +2398,8 @@ storage = { -- probably no longer needed } logs = { new = function() return dummyfunction end, + reporter = function() return dummyfunction end, + messenger = function() return dummyfunction end, report = dummyfunction, } callbacks = { @@ -2601,7 +2603,7 @@ containers = containers or { } local containers = containers containers.usecache = true -local report_containers = logs.new("resolvers","containers") +local report_containers = logs.reporter("resolvers","containers") local function report(container,tag,name) if trace_cache or trace_containers then @@ -2874,7 +2876,7 @@ local next = next local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end) -local report_injections = logs.new("nodes","injections") +local report_injections = logs.reporter("nodes","injections") local attributes, nodes, node = attributes, nodes, node @@ -3327,7 +3329,7 @@ local write_nl = texio.write_nl local lower = string.lower local allocate, mark = utilities.storage.allocate, utilities.storage.mark -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") fontloader.totable = fontloader.to_table @@ -3447,7 +3449,7 @@ local allocate = utilities.storage.allocate local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end) -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") -- tfmdata has also fast access to indices and unicodes -- to be checked: otf -> tfm -> tfmscaled @@ -4259,7 +4261,7 @@ local lpegmatch = lpeg.match local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts @@ -5381,7 +5383,7 @@ local utfbyte = utf.byte local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") --[[ldx--

Eventually this code will disappear because map files are kind @@ -5654,7 +5656,7 @@ if not modules then modules = { } end modules ['font-lua'] = { local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_lua = logs.new("fonts","lua loading") +local report_lua = logs.reporter("fonts","lua loading") fonts.formats.lua = "lua" @@ -5728,7 +5730,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v) local trace_math = false trackers.register("otf.math", function(v) trace_math = v end) local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime @@ -7679,7 +7681,7 @@ if not modules then modules = { } end modules ['font-otd'] = { local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.otf @@ -7853,7 +7855,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end) local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end) -local report_prepare = logs.new("fonts","otf prepare") +local report_prepare = logs.reporter("fonts","otf prepare") local wildcard = "*" local default = "dflt" @@ -8371,11 +8373,11 @@ local trace_steps = false trackers.register("otf.steps", function local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end) local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end) -local report_direct = logs.new("fonts","otf direct") -local report_subchain = logs.new("fonts","otf subchain") -local report_chain = logs.new("fonts","otf chain") -local report_process = logs.new("fonts","otf process") -local report_prepare = logs.new("fonts","otf prepare") +local report_direct = logs.reporter("fonts","otf direct") +local report_subchain = logs.reporter("fonts","otf subchain") +local report_chain = logs.reporter("fonts","otf chain") +local report_process = logs.reporter("fonts","otf process") +local report_prepare = logs.reporter("fonts","otf prepare") trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end) trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end) @@ -11244,7 +11246,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_ local fonts = fonts local otf = fonts.otf -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") -- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to -- have always); some day we can write a "force always when true" trick for other @@ -15451,7 +15453,7 @@ local directive_embedall = false directives.register("fonts.embedall", function trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading") trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*") -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") --[[ldx--

Here we deal with defining fonts. We do so by intercepting the -- cgit v1.2.3