summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ref.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-03-13 01:20:16 +0200
committerMarius <mariausol@gmail.com>2013-03-13 01:20:16 +0200
commit4d6709d2eec4237345164c15be765be0669541d0 (patch)
tree110053b7da1c5638de03d45cf2898ebdd49188e5 /tex/context/base/strc-ref.lua
parent1253a5723d8188696f9ab801b13ec84f16c6bf6f (diff)
downloadcontext-4d6709d2eec4237345164c15be765be0669541d0.tar.gz
beta 2013.03.13 00:08
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r--tex/context/base/strc-ref.lua61
1 files changed, 33 insertions, 28 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index 61f9dc69e..88a1dc480 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -293,9 +293,9 @@ function references.set(kind,prefix,tag,data)
if ref ~= "" then
if check_duplicates and pd[ref] then
if prefix and prefix ~= "" then
- report_references("redundant reference: %q in namespace %q",ref,prefix)
+ report_references("redundant reference %a in namespace %a",ref,prefix)
else
- report_references("redundant reference %q",ref)
+ report_references("redundant reference %a",ref)
end
else
n = n + 1
@@ -396,7 +396,7 @@ local function register_from_lists(collected,derived,pages,sections)
local t = { kind, i, entry }
for s in gmatch(reference,"%s*([^,]+)") do
if trace_referencing then
- report_references("list entry %s provides %s reference '%s' on realpage %s",i,kind,s,realpage)
+ report_references("list entry %a provides %a reference %a on realpage %a",i,kind,s,realpage)
end
c[s] = c[s] or t -- share them
d[s] = d[s] or t -- share them
@@ -714,7 +714,7 @@ local function resolve(prefix,reference,args,set) -- we start with prefix,refere
set.has_tex = true
end
else
- -- report_references("funny pattern: %s",ri or "?")
+ -- report_references("funny pattern %a",ri)
end
end
end
@@ -776,7 +776,8 @@ local function loadexternalreferences(name,utilitydata)
for prefix, set in next, external do
for reference, data in next, set do
if trace_importing then
- report_importing("registering external reference: regular | %s | %s | %s",name,prefix,reference)
+ report_importing("registering %a reference, kind %a, name %a, prefix %a, reference %a",
+ "external","regular",name,prefix,reference)
end
local section = reference.section
local realpage = reference.realpage
@@ -807,7 +808,8 @@ local function loadexternalreferences(name,utilitydata)
end
for s in gmatch(reference,"%s*([^,]+)") do
if trace_importing then
- report_importing("registering external reference: %s | %s | %s | %s",kind,name,prefix,s)
+ report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a",
+ "external",kind,name,prefix,s)
end
target[s] = target[s] or entry
end
@@ -866,7 +868,8 @@ local function loadproductreferences(productname,componentname,utilitydata)
for prefix, set in next, productreferences do
for reference, data in next, set do
if trace_importing then
- report_importing("registering product reference: regular | %s | %s | %s",productname,prefix,reference)
+ report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a",
+ "product","regular",productname,prefix,reference)
end
local section = reference.section
local realpage = reference.realpage
@@ -920,13 +923,15 @@ local function loadproductreferences(productname,componentname,utilitydata)
for s in gmatch(reference,"%s*([^,]+)") do
if ptarget then
if trace_importing then
- report_importing("registering product reference: %s | %s | %s | %s",kind,productname,prefix,s)
+ report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a",
+ "product",kind,productname,prefix,s)
end
ptarget[s] = ptarget[s] or entry
end
if ctarget then
if trace_importing then
- report_importing("registering component reference: %s | %s | %s | %s",kind,productname,prefix,s)
+ report_importing("registering %s reference, kind %a, name %a, prefix %a, referenc %a",
+ "component",kind,productname,prefix,s)
end
ctarget[s] = ctarget[s] or entry
end
@@ -954,7 +959,7 @@ local function loadproductvariables(product,component,utilitydata)
local numbers = firstsection.numberdata.numbers
if numbers then
if trace_importing then
- report_importing("initializing section number to %s",concat(numbers,":"))
+ report_importing("initializing section number to %:t",numbers)
end
productdata.firstsection = firstsection
structures.documents.preset(numbers)
@@ -965,7 +970,7 @@ local function loadproductvariables(product,component,utilitydata)
local number = firstpage and firstpage.number
if number then
if trace_importing then
- report_importing("initializing page number to %s",number)
+ report_importing("initializing page number to %a",number)
end
productdata.firstpage = firstpage
counters.set("userpage",1,number)
@@ -1017,7 +1022,7 @@ function structures.references.loadpresets(product,component) -- we can consider
local utilitydata = job.loadother(fullname)
if utilitydata then
if trace_importing then
- report_importing("loading references for component %s of product %s from %s",component,product,fullname)
+ report_importing("loading references for component %a of product %a from %a",component,product,fullname)
end
loadproductvariables (product,component,utilitydata)
loadproductreferences(product,component,utilitydata)
@@ -1040,7 +1045,7 @@ if useproduct then
local component = justacomponent()
if component then
if trace_referencing or trace_importing then
- report_references("loading presets for component '%s' of product '%s'",component,product)
+ report_references("loading presets for component %a of product %a",component,product)
end
structures.references.loadpresets(product,component)
end
@@ -1059,9 +1064,9 @@ local function report_identify_special(set,var,i,type)
local error = var.error
local kind = var.kind
if error then
- report_identifying("type %s: %s, n: %s, prefix: %s, special: %s, error: %s",type,reference,i,prefix,special,error)
+ report_identifying("type %a, reference %a, index %a, prefix %a, special %a, error %a",type,reference,i,prefix,special,error)
else
- report_identifying("type %s: %s, n: %s, prefix: %s, special: %s, kind: %s",type,reference,i,prefix,special,kind)
+ report_identifying("type %a, reference %a, index %a, prefix %a, special %a, kind %a",type,reference,i,prefix,special,kind)
end
end
@@ -1072,9 +1077,9 @@ local function report_identify_arguments(set,var,i,type)
local error = var.error
local kind = var.kind
if error then
- report_identifying("type %s: %s, n: %s, prefix: %s, arguments: %s, error: %s",type,reference,i,prefix,arguments,error)
+ report_identifying("type %a, reference %a, index %a, prefix %a, arguments %a, error %a",type,reference,i,prefix,arguments,error)
else
- report_identifying("type %s: %s, n: %s, prefix: %s, arguments: %s, kind: %s",type,reference,i,prefix,arguments,kind)
+ report_identifying("type %a, reference %a, index %a, prefix %a, arguments %a, kind %a",type,reference,i,prefix,arguments,kind)
end
end
@@ -1086,15 +1091,15 @@ local function report_identify_outer(set,var,i,type)
local kind = var.kind
if outer then
if error then
- report_identifying("type %s: %s, n: %s, prefix: %s, outer: %s, error: %s",type,reference,i,prefix,outer,error)
+ report_identifying("type %a, reference %a, index %a, prefix %a, outer %a, error %a",type,reference,i,prefix,outer,error)
else
- report_identifying("type %s: %s, n: %s, prefix: %s, outer: %s, kind: %s",type,reference,i,prefix,outer,kind)
+ report_identifying("type %a, reference %a, index %a, prefix %a, outer %a, kind %a",type,reference,i,prefix,outer,kind)
end
else
if error then
- report_identifying("type %s: %s, n: %s, prefix: %s, error: %s",type,reference,i,prefix,error)
+ report_identifying("type %a, reference %a, index %a, prefix %a, error %a",type,reference,i,prefix,error)
else
- report_identifying("type %s: %s, n: %s, prefix: %s, kind: %s",type,reference,i,prefix,kind)
+ report_identifying("type %a, reference %a, index %a, prefix %a, kind %a",type,reference,i,prefix,kind)
end
end
end
@@ -1238,7 +1243,7 @@ local function identify_inner(set,var,prefix,collected,derived,tobesaved)
ri(var)
else
-- can't happen as we catch it with a metatable now
- report_references("unknown inner resolver for '%s'",i[1])
+ report_references("unknown inner resolver for %a",i[1])
end
else
-- no prefixes here
@@ -1631,7 +1636,7 @@ function references.setinnermethod(m)
end
end
function references.setinnermethod()
- report_references("inner method is already set and frozen to '%s'",innermethod)
+ report_references("inner method is already set and frozen to %a",innermethod)
end
end
@@ -1741,20 +1746,20 @@ function references.filter(name,...) -- number page title ...
filter = filter and (filter[name] or filter.unknown or filters.generic[name] or filters.generic.unknown)
if filter then
if trace_referencing then
- report_references("name '%s', kind '%s', using dedicated filter",name,kind)
+ report_references("name %a, kind %a, using dedicated filter",name,kind)
end
filter(data,name,...)
elseif trace_referencing then
- report_references("name '%s', kind '%s', using generic filter",name,kind)
+ report_references("name %a, kind %a, using generic filter",name,kind)
end
elseif trace_referencing then
- report_references("name '%s', unknown kind",name)
+ report_references("name %a, unknown kind",name)
end
end
elseif name == "realpage" then
context(0)
elseif trace_referencing then
- report_references("name '%s', no reference",name)
+ report_references("name %a, no reference",name)
end
end
@@ -1870,7 +1875,7 @@ function filters.section.number(data,what,prefixspec)
elseif numberdata.hidenumber then
local references = data.references
if trace_empty then
- report_empty("reference %q has a hidden number",references.reference or "?")
+ report_empty("reference %a has a hidden number",references.reference)
context.emptyreference() -- maybe an option
end
else