aboutsummaryrefslogtreecommitdiff
path: root/dio.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
commit4602ca2fa5e8e2e408713f72ae7e4cd14480bc01 (patch)
treebfbf75b8afd738f5a036737404f3eafe87586c66 /dio.lua
parentaf4e85f99d0ac63127f19640ef47d768d7bed7cd (diff)
downloadvicious-legacy-4602ca2fa5e8e2e408713f72ae7e4cd14480bc01.tar.xz
Lots of coding style changes
Diffstat (limited to 'dio.lua')
-rw-r--r--dio.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/dio.lua b/dio.lua
index dfde90c..9c94134 100644
--- a/dio.lua
+++ b/dio.lua
@@ -10,6 +10,10 @@ local io = { open = io.open }
local setmetatable = setmetatable
local math = { floor = math.floor }
local table = { insert = table.insert }
+local string = {
+ match = string.match,
+ gmatch = string.gmatch
+}
-- }}}
@@ -28,14 +32,14 @@ local function worker(format, disk)
local disk_lines = {}
for line in f:lines() do
- if line:match("("..disk..")%s") then
+ if string.match(line, "("..disk..")%s") then
-- Todo: find a way to do this
- --for stat in line:gmatch("%s([%d]+)") do
+ --for stat in string.gmatch(line, "%s([%d]+)") do
-- table.insert(disk_lines, stat)
--end
--
-- Skip first two matches
- local stat = line:gmatch("%s([%d]+)")
+ local stat = string.gmatch(line, "%s([%d]+)")
stat()
stat()
-- Store the rest