summaryrefslogtreecommitdiff
path: root/scripts/context/stubs
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-06-09 14:00:18 +0300
committerMarius <mariausol@gmail.com>2011-06-09 14:00:18 +0300
commit247a7c0fccc1f980a837daf19e0ef2be6102a18f (patch)
treef93d990960ddd77373b30fc2437c240cf05c1f0a /scripts/context/stubs
parentfa92f9c6079291c35f057dbb687e65e70b80f535 (diff)
downloadcontext-247a7c0fccc1f980a837daf19e0ef2be6102a18f.tar.gz
beta 2011.06.09 12:49
Diffstat (limited to 'scripts/context/stubs')
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua11
-rw-r--r--scripts/context/stubs/unix/mtxrun11
2 files changed, 18 insertions, 4 deletions
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index abd4f964c..d0cf3d46d 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -6693,7 +6693,9 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
+print(">1",str,a)
a = resolve_predefined and predefined_simplified[str]
+print(">2",str,a)
if a then
-- one of the predefined
elseif type(resolve) == "function" then
@@ -6701,15 +6703,20 @@ local function handle_any_entity(str)
else
a = entities[str]
end
+print(">3",str,a)
if a then
if type(a) == "function" then
- report_xml("expanding entity &%s; (function)",str)
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
a = a(str) or ""
end
+print(">4",str,a)
+ a = lpegmatch(parsedentity,a) or a
+print(">5",str,a)
if trace_entities then
report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
- a = lpegmatch(parsedentity,a) or a
else
local unknown_any_entity = placeholders.unknown_any_entity
if unknown_any_entity then
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index abd4f964c..d0cf3d46d 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -6693,7 +6693,9 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
+print(">1",str,a)
a = resolve_predefined and predefined_simplified[str]
+print(">2",str,a)
if a then
-- one of the predefined
elseif type(resolve) == "function" then
@@ -6701,15 +6703,20 @@ local function handle_any_entity(str)
else
a = entities[str]
end
+print(">3",str,a)
if a then
if type(a) == "function" then
- report_xml("expanding entity &%s; (function)",str)
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
a = a(str) or ""
end
+print(">4",str,a)
+ a = lpegmatch(parsedentity,a) or a
+print(">5",str,a)
if trace_entities then
report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
- a = lpegmatch(parsedentity,a) or a
else
local unknown_any_entity = placeholders.unknown_any_entity
if unknown_any_entity then