make functions in MD5 implementation local

also get rid of mostly unused helper libraries and some stylistic
oddities in the MD5 code
This commit is contained in:
Hans-Werner Hilse
2014-11-11 15:33:41 +01:00
parent c8edd020f1
commit 78b098e47d
5 changed files with 168 additions and 629 deletions

View File

@@ -1,7 +1,7 @@
--[[
A global LRU cache
]]--
require("MD5")
local md5 = require("MD5")
local lfs = require("libs/libkoreader-lfs")
local DEBUG = require("dbg")
@@ -35,7 +35,7 @@ local cache_path = lfs.currentdir().."/cache/"
--[[
-- return a snapshot of disk cached items for subsequent check
--]]
function getDiskCache()
local function getDiskCache()
local cached = {}
for key_md5 in lfs.dir(cache_path) do
local file = cache_path..key_md5