diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-05 00:10:47 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-05 00:10:47 +0200 |
commit | 4602ca2fa5e8e2e408713f72ae7e4cd14480bc01 (patch) | |
tree | bfbf75b8afd738f5a036737404f3eafe87586c66 /dio.lua | |
parent | af4e85f99d0ac63127f19640ef47d768d7bed7cd (diff) | |
download | vicious-legacy-4602ca2fa5e8e2e408713f72ae7e4cd14480bc01.tar.xz |
Lots of coding style changes
Diffstat (limited to 'dio.lua')
-rw-r--r-- | dio.lua | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |