summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-10 08:51:59 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-10 08:51:59 +0200
commitb916cffae098b7bcfb8847fc269460271072d19d (patch)
tree9d603b5ebdf71405017aae01247dde5393bb74f7
parentbe735a865e2bdc6b7ac57161a24e4911741024f1 (diff)
downloadcontext-b916cffae098b7bcfb8847fc269460271072d19d.tar.gz
2016-06-10 08:15:00
-rw-r--r--tex/context/base/context-version.pdfbin4251 -> 4254 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-sel.lua4
-rw-r--r--tex/context/base/mkiv/grph-mem.lua73
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9196 -> 9093 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin269009 -> 269012 bytes
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin821199 -> 821077 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60788 -> 60789 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 47 insertions, 36 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index f67cd8bff..b4501d335 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index aab85b119..4133c2053 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.06.09 19:23}
+\newcontextversion{2016.06.10 08:11}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index a90fecab0..1d5d41a3b 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.06.09 19:23}
+\edef\contextversion{2016.06.10 08:11}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-sel.lua b/tex/context/base/mkiv/font-sel.lua
index 0889d2fcd..4faf7d9bb 100644
--- a/tex/context/base/mkiv/font-sel.lua
+++ b/tex/context/base/mkiv/font-sel.lua
@@ -148,9 +148,9 @@ methods["name"] = function(data,alternative,name)
local fontname = getlookups{ fontname = filename }
local fullname = getlookups{ fullname = filename }
if #fontname > 0 then
- selectfont_savefile(data,alternative,0,"default",fullname[1])
- elseif #fullname > 0 then
selectfont_savefile(data,alternative,0,"default",fontname[1])
+ elseif #fullname > 0 then
+ selectfont_savefile(data,alternative,0,"default",fullname[1])
else
if trace_alternatives then
report_selectfont("Alternative '%s': No font was found for the requested name '%s'",alternative,filename)
diff --git a/tex/context/base/mkiv/grph-mem.lua b/tex/context/base/mkiv/grph-mem.lua
index b1ca1a15d..bb48ae8d5 100644
--- a/tex/context/base/mkiv/grph-mem.lua
+++ b/tex/context/base/mkiv/grph-mem.lua
@@ -15,53 +15,52 @@ if not modules then modules = { } end modules ['grph-mem'] = {
-- \externalfigure[memstream:///t:/sources/cow.pdf]
-- \externalfigure[memstream:///whatever]
+local gsub = string.gsub
+
local report = logs.reporter("memstream")
+local trace = false trackers.register ("graphics.memstreams", function(v) trace = v end)
local data = { }
-local trace = false
-
local opened = { }
-function resolvers.finders.memstream(specification)
- local name = specification.path
- local identifier = data[name]
- if identifier then
+local function setmemstream(name,stream,once)
+ if once and data[name] then
if trace then
- report("reusing %a",identifier)
+ report("not overloading %a",name) --
end
- return identifier
+ return data[name]
end
- local stream = io.loaddata(name)
- if not stream or stream == "" then
- return resolvers.finders.notfound()
- end
- local memstream, identifier = epdf.openMemStream(stream,#stream,original)
+ local memstream, identifier = epdf.openMemStream(stream,#stream,name)
if not identifier then
- report("invalid %a",name)
+ report("no valid stream %a",name)
identifier = "invalid-memstream"
elseif trace then
- report("using %a",identifier)
+ report("setting %a with identifier %a",name,identifier)
end
data [name] = identifier
opened[name] = memstream
return identifier
end
-function resolvers.setmemstream(name,stream,once)
- if once and data[name] then
+resolvers.setmemstream = setmemstream
+
+function resolvers.finders.memstream(specification)
+ local name = specification.path
+ local identifier = data[name]
+ if identifier then
if trace then
- report("not overloading %a",name) --
+ report("reusing %a with identifier %a",name,identifier)
end
- return
+ return identifier
end
- local memstream, identifier = epdf.openMemStream(stream,#stream,name)
- if not identifier then
- report("invalid %a",name)
- identifier = "invalid-memstream"
- elseif trace then
- report("setting %a as %a",name,identifier)
+ local stream = io.loaddata(name)
+ if not stream or stream == "" then
+ if trace then
+ report("no valid file %a",name)
+ end
+ return resolvers.finders.notfound()
+ else
+ return setmemstream(name,stream)
end
- data [name] = identifier
- opened[name] = memstream
end
local flush = { }
@@ -83,12 +82,24 @@ luatex.registerpageactions(function()
end
end)
-
figures.identifiers.list[#figures.identifiers.list+1] = function(specification)
local name = specification.request.name
- if name and data[name] then
- specification.status.status = 1
- specification.used.fullname = name
+ if name then
+ local base = gsub(name,"^memstream:///","")
+ if base ~= name then
+ local identifier = data[base]
+ if identifier then
+ if trace then
+ report("requested %a has identifier %s",name,identifier)
+ end
+ specification.status.status = 1
+ specification.used.fullname = name
+ else
+ if trace then
+ report("requested %a is not found",name)
+ end
+ end
+ end
end
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index d2ea65d65..923ab4966 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 820752067..593f5be44 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index c58d9af06..596361bd5 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 5942fddbc..00ce32411 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 89dcbbc86..bb5109189 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 06/09/16 19:23:43
+-- merge date : 06/10/16 08:11:20
do -- begin closure to overcome local limits and interference