summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-27 21:06:35 +0000
committerKarl Berry <karl@freefriends.org>2019-07-27 21:06:35 +0000
commit6bef83deb7557e3f77db24324e41b44b69548a5d (patch)
tree8c233845613b1512435e52d0786ad2fd75dc816f /Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
parentec76c86235312c3a03dc62b40b28398a25cfe975 (diff)
oberdiek (27jul19)
git-svn-id: svn://tug.org/texlive/trunk@51756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua')
-rw-r--r--Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua56
1 files changed, 29 insertions, 27 deletions
diff --git a/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua b/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
index a48a2759e8e..b9381f2a1d6 100644
--- a/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
+++ b/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: pdftexcmds
--- Version: 2018/09/10 v0.29
+-- Version: 2019/07/25 v0.30
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -38,12 +38,14 @@
-- pdftexcmds-test-shell.tex, pdftexcmds-test-escape.tex,
-- oberdiek.pdftexcmds.lua, pdftexcmds.lua.
--
-module("oberdiek.pdftexcmds", package.seeall)
+oberdiek = oberdiek or {}
+local pdftexcmds = oberdiek.pdftexcmds or {}
+oberdiek.pdftexcmds = pdftexcmds
local systemexitstatus
-function getversion()
- tex.write("2018/09/10 v0.29")
+function pdftexcmds.getversion()
+ tex.write("2019/07/25 v0.30")
end
-function strcmp(A, B)
+function pdftexcmds.strcmp(A, B)
if A == B then
tex.write("0")
elseif A < B then
@@ -77,7 +79,7 @@ local function utf8_to_byte(str)
end
return table.concat(t)
end
-function escapehex(str, mode)
+function pdftexcmds.escapehex(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -87,7 +89,7 @@ function escapehex(str, mode)
end
)))
end
-function unescapehex(str, mode, patch)
+function pdftexcmds.unescapehex(str, mode, patch)
local a = 0
local first = true
local result = {}
@@ -151,9 +153,9 @@ function unescapehex(str, mode, patch)
result = utf8
end
local unpack = _G["unpack"] or table.unpack
- tex.settoks(toks, string.char(unpack(result)))
+ tex.settoks(pdftexcmds.toks, string.char(unpack(result)))
end
-function escapestring(str, mode)
+function pdftexcmds.escapestring(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -170,7 +172,7 @@ function escapestring(str, mode)
end
)))
end
-function escapename(str, mode)
+function pdftexcmds.escapename(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -191,7 +193,7 @@ function escapename(str, mode)
end
)))
end
-function filesize(filename)
+function pdftexcmds.filesize(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local size = lfs.attributes(foundfile, "size")
@@ -200,7 +202,7 @@ function filesize(filename)
end
end
end
-function filemoddate(filename)
+function pdftexcmds.filemoddate(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local date = lfs.attributes(foundfile, "modification")
@@ -237,7 +239,7 @@ function filemoddate(filename)
end
end
end
-function filedump(offset, length, filename)
+function pdftexcmds.filedump(offset, length, filename)
length = tonumber(length)
if length and length > 0 then
local foundfile = kpse.find_file(filename, "tex", true)
@@ -252,41 +254,41 @@ function filedump(offset, length, filename)
filehandle:seek("set", offset)
end
local dump = filehandle:read(length)
- escapehex(dump)
+ pdftexcmds.escapehex(dump)
filehandle:close()
end
end
end
end
-function mdfivesum(str, mode)
+function pdftexcmds.mdfivesum(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
- escapehex(md5.sum(str))
+ pdftexcmds.escapehex(md5.sum(str))
end
-function filemdfivesum(filename)
+function pdftexcmds.filemdfivesum(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local filehandle = io.open(foundfile, "rb")
if filehandle then
local contents = filehandle:read("*a")
- escapehex(md5.sum(contents))
+ pdftexcmds.escapehex(md5.sum(contents))
filehandle:close()
end
end
end
local basetime = 0
-function resettimer()
+function pdftexcmds.resettimer()
basetime = os.clock()
end
-function elapsedtime()
+function pdftexcmds.elapsedtime()
local val = (os.clock() - basetime) * 65536 + .5
if val > 2147483647 then
val = 2147483647
end
tex.write(string.format("%d", val))
end
-function shellescape()
+function pdftexcmds.shellescape()
if os.execute then
if status
and status.luatex_version
@@ -308,7 +310,7 @@ function shellescape()
tex.write("0")
end
end
-function system(cmdline)
+function pdftexcmds.system(cmdline)
systemexitstatus = nil
texio.write_nl("log", "system(" .. cmdline .. ") ")
if os.execute then
@@ -318,20 +320,20 @@ function system(cmdline)
texio.write("log", "disabled.")
end
end
-function lastsystemstatus()
+function pdftexcmds.lastsystemstatus()
local result = tonumber(systemexitstatus)
if result then
local x = math.floor(result / 256)
tex.write(result - 256 * math.floor(result / 256))
end
end
-function lastsystemexit()
+function pdftexcmds.lastsystemexit()
local result = tonumber(systemexitstatus)
if result then
tex.write(math.floor(result / 256))
end
end
-function pipe(cmdline, patch)
+function pdftexcmds.pipe(cmdline, patch)
local result
systemexitstatus = nil
texio.write_nl("log", "pipe(" .. cmdline ..") ")
@@ -363,9 +365,9 @@ function pipe(cmdline, patch)
end
result = temp
end
- tex.settoks(toks, result)
+ tex.settoks(pdftexcmds.toks, result)
else
- tex.settoks(toks, "")
+ tex.settoks(pdftexcmds.toks, "")
end
end
--