summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-05 22:52:10 +0000
committerKarl Berry <karl@freefriends.org>2013-05-05 22:52:10 +0000
commit5f9dd2add16775cc6aece96e2695c7e475ee1834 (patch)
treefba8f32362b01a41db0125ab430fd1962b290b4f /Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua
parentc275a5f0b045f10e93c6a557f2499f3cf7709efc (diff)
lualibs (5may13)
git-svn-id: svn://tug.org/texlive/trunk@30238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua
new file mode 100644
index 00000000000..707f26b8b66
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-compat.lua
@@ -0,0 +1,31 @@
+#!/usr/bin/env texlua
+
+lualibs = lualibs or { }
+
+local stringgsub = string.gsub
+local stringlower = string.lower
+local next = next
+local Ct, splitat = lpeg.Ct, lpeg.splitat
+
+--[[doc
+Needed by legacy luat-dum.lua.
+--doc]]--
+table.reverse_hash = function (h)
+ local r = { }
+ for k,v in next, h do
+ r[v] = stringlower(stringgsub(k," ",""))
+ end
+ return r
+end
+
+--[[doc
+Needed by legacy font-otn.lua.
+--doc]]--
+lpeg.splitters = { [" "] = Ct(splitat" ") }
+
+--[[doc
+Needed by legacy font-nms.lua.
+--doc]]--
+
+file.split_path = file.splitpath
+file.collapse_path = file.collapsepath