summaryrefslogtreecommitdiff
path: root/luaotfload-database.lua
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-05-15 09:02:32 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-05-15 09:02:32 -0700
commit087a990dc8581be3a2980034e70f874d52f9577b (patch)
tree5a7d38a8e5cf55cceb6dd51becf102950819beb4 /luaotfload-database.lua
parent8a67b384a597b9af16ea915fe7e323d4328cdd3e (diff)
parent52f6ea217175fd1a39e6f80ea7a0f98fbf1364f6 (diff)
downloadluaotfload-087a990dc8581be3a2980034e70f874d52f9577b.tar.gz
Merge pull request #75 from phi-gamma/master
address feature request #74
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r--luaotfload-database.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index f4c6fdc..0e46874 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -202,8 +202,10 @@ local fontnames_init = function (keep_cache) --- returns dbobj
}
end
-local make_name = function (path)
- return filereplacesuffix(path, "lua"), filereplacesuffix(path, "luc")
+--- string -> (string * string)
+local make_savenames = function (path)
+ return filereplacesuffix(path, "lua"),
+ filereplacesuffix(path, "luc")
end
--- When loading a lua file we try its binary complement first, which
@@ -1493,7 +1495,7 @@ save_lookups = function ( )
local lookups = names.lookups
local path = ensure_names_path()
if fileiswritable(path) then
- local luaname, lucname = make_name(names.path.lookup_path)
+ local luaname, lucname = make_savenames(names.path.lookup_path)
if luaname then
tabletofile(luaname, lookups, true)
if lucname and type(caches.compile) == "function" then
@@ -1514,7 +1516,7 @@ save_names = function (fontnames)
if not fontnames then fontnames = names.data end
local path = ensure_names_path()
if fileiswritable(path) then
- local luaname, lucname = make_name(names.path.path)
+ local luaname, lucname = make_savenames(names.path.path)
if luaname then
--tabletofile(luaname, fontnames, true, { reduce=true })
tabletofile(luaname, fontnames, true)