diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-13 21:30:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-13 21:30:36 +0000 |
commit | ce9eb3564e7376e4452732aef5229a8461f52a09 (patch) | |
tree | 421c616b3d0f26ddc6e20e28345c9bd680028708 /Master/texmf-dist/tex/latex/l3kernel/expl3.lua | |
parent | a61c6cf82707ad0e3aab14106179ce8d199284ce (diff) |
l3 (13jan20)
git-svn-id: svn://tug.org/texlive/trunk@53394 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3.lua')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.lua | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index eeafb132f55..35c757a6049 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -6,7 +6,7 @@ -- -- l3luatex.dtx (with options: `package,lua') -- --- Copyright (C) 1990-2019 The LaTeX3 Project +-- Copyright (C) 1990-2020 The LaTeX3 Project -- -- It may be distributed and/or modified under the conditions of -- the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,16 +20,17 @@ -- -- File: l3luatex.dtx l3kernel = l3kernel or { } -local io = io -local kpse = kpse -local lfs = lfs -local math = math -local md5 = md5 -local os = os -local string = string -local tex = tex -local texio = texio -local unicode = unicode +local io = io +local kpse = kpse +local lfs = lfs +local math = math +local md5 = md5 +local os = os +local string = string +local tex = tex +local texio = texio +local tonumber = tonumber +local unicode = unicode local abs = math.abs local byte = string.byte local floor = math.floor @@ -70,6 +71,23 @@ local function resettimer() base_time = os_clock() end l3kernel.resettimer = resettimer +local function filedump(name,offset,length) + local file = kpse_find(name,"tex",true) + if file then + local length = tonumber(length) or lfs_attr(file,"size") + local offset = tonumber(offset) or 0 + local f = open(file,"rb") + if f then + if offset > 0 then + f:seek("set",offset) + end + local data = f:read(length) + escapehex(data) + f:close() + end + end +end +l3kernel.filedump = filedump local function filemdfivesum(name) local file = kpse_find(name, "tex", true) if file then |