summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2011-10-14 20:43:11 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2011-10-14 20:43:11 +0200
commit27425270c71d8cc0a846f236e7128a2fb80cb403 (patch)
treeb612f60cac4bf9aa0a33fe5f0edd6e7f736bdde7
parentee1fab567ddf9949c01459a22f7dcb1053e3c48a (diff)
downloadluaotfload-27425270c71d8cc0a846f236e7128a2fb80cb403.tar.gz
No more pairs()/ipairs()
-rwxr-xr-xmkluatexfontdb.lua2
-rw-r--r--otfl-font-ltx.lua2
-rw-r--r--otfl-font-nms.lua6
3 files changed, 5 insertions, 5 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 99d1552..21d3cce 100755
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -64,7 +64,7 @@ local force_reload = nil
local function process_cmdline()
local opts, optind, optarg = alt_getopt.get_ordered_opts (arg, short_opts, long_opts)
local log_level = 1
- for i,v in ipairs(opts) do
+ for i,v in next, opts do
if v == "q" then
log_level = 0
elseif v == "v" then
diff --git a/otfl-font-ltx.lua b/otfl-font-ltx.lua
index 8e64f38..e52360c 100644
--- a/otfl-font-ltx.lua
+++ b/otfl-font-ltx.lua
@@ -25,7 +25,7 @@ local list = { }
local function isstyle(s)
local style = string.lower(s):split("/")
- for _,v in ipairs(style) do
+ for _,v in next, style do
if v == "b" then
list.style = "bold"
elseif v == "i" then
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 8c4a077..889c5aa 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -467,14 +467,14 @@ local function read_blacklist()
end
end
end
- for fontname,_ in pairs(whitelist) do
+ for _,fontname in next, whitelist do
blacklist[fontname] = nil
end
end
local font_extensions = { "otf", "ttf", "ttc", "dfont" }
local font_extensions_set = {}
-for key, value in ipairs(font_extensions) do
+for key, value in next, font_extensions do
font_extensions_set[value] = true
end
@@ -490,7 +490,7 @@ local function scan_installed_fonts(fontnames, newfontnames)
if trace_search then
logs.report("operating system fonts found", "%d", #fonts)
end
- for key, value in ipairs(fonts) do
+ for key, value in next, fonts do
local file = value.path
if file then
local ext = extname(file)