aboutsummaryrefslogtreecommitdiffstats
path: root/util/human
diff options
context:
space:
mode:
Diffstat (limited to 'util/human')
-rw-r--r--util/human/io.lua5
-rw-r--r--util/human/units.lua10
2 files changed, 2 insertions, 13 deletions
diff --git a/util/human/io.lua b/util/human/io.lua
index 7d7dea97..4fce0e94 100644
--- a/util/human/io.lua
+++ b/util/human/io.lua
@@ -30,10 +30,7 @@ local function getline()
end
local function getpass()
- local stty_ret, _, status_code = os.execute("stty -echo 2>/dev/null");
- if status_code then -- COMPAT w/ Lua 5.1
- stty_ret = status_code;
- end
+ local stty_ret = os.execute("stty -echo 2>/dev/null");
if stty_ret ~= 0 then
io.write("\027[08m"); -- ANSI 'hidden' text attribute
end
diff --git a/util/human/units.lua b/util/human/units.lua
index af233e98..329c8518 100644
--- a/util/human/units.lua
+++ b/util/human/units.lua
@@ -4,15 +4,7 @@ local math_floor = math.floor;
local math_log = math.log;
local math_max = math.max;
local math_min = math.min;
-local unpack = table.unpack or unpack; --luacheck: ignore 113
-
-if math_log(10, 10) ~= 1 then
- -- Lua 5.1 COMPAT
- local log10 = math.log10;
- function math_log(n, base)
- return log10(n) / log10(base);
- end
-end
+local unpack = table.unpack;
local large = {
"k", 1000,