summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroux <elie.roux@telecom-bretagne.eu>2010-02-26 10:39:30 +0100
committereroux <elie.roux@telecom-bretagne.eu>2010-02-26 10:39:30 +0100
commit265b0fbc7342295e3596253c3b3d0282797bea0e (patch)
tree95e0564768046d75731eeafe9541c8f86b41a9da
parente927dc3d77cd4317cefb07a6831abe1654734e42 (diff)
downloadluaotfload-265b0fbc7342295e3596253c3b3d0282797bea0e.tar.gz
Making the log function available elsewhere
+ Ooops, I missed one commit...
-rw-r--r--luaotfload-fonts.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index 8e4b81b..d137d97 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -50,13 +50,15 @@ luaotfload.fonts.log_level = 1
local lastislog = 0
-local function log(lvl, fmt, ...)
+function luaotfload.fonts.log(lvl, fmt, ...)
if lvl <= luaotfload.fonts.log_level then
lastislog = 1
texio.write_nl(format("luaotfload | %s", format(fmt,...)))
end
end
+local log = luaotfload.fonts.log
+
-- The progress bar
local function progress(current, total)
if luaotfload.fonts.log_level == 1 then
@@ -341,7 +343,3 @@ end
luaotfload.fonts.scan = scan_dir
luaotfload.fonts.generate = generate
-
-if arg[0] == "luaotfload-fonts.lua" then
- generate()
-end