From 27425270c71d8cc0a846f236e7128a2fb80cb403 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 14 Oct 2011 20:43:11 +0200 Subject: No more pairs()/ipairs() --- mkluatexfontdb.lua | 2 +- otfl-font-ltx.lua | 2 +- otfl-font-nms.lua | 6 +++--- 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) -- cgit v1.2.3