From 97e559f26f8c36027f1e742fc1196f4a394c29e6 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Fri, 5 Jun 2020 23:07:06 +1000 Subject: [PATCH] added type annotations and function documentation to liblz16 and pkgfs --- lib/liblz16.lua | 4 ++-- lib/pkgfs.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/liblz16.lua b/lib/liblz16.lua index a2faaa7..4165bb3 100644 --- a/lib/liblz16.lua +++ b/lib/liblz16.lua @@ -54,14 +54,14 @@ local function writeBuffer(fo) return buffer.new("wb",stream) end -function lz16.buffer(stream) +function lz16.buffer(stream) -- table -- table -- Wrap a stream to read or write LZ16. if stream.mode.w then return writeBuffer(stream) end return readBuffer(stream) end -function lz16.open(fname, mode) +function lz16.open(fname, mode) -- string string -- table -- Open file *fname* to read or write LZ16-compressed data depending on *mode* local f = io.open(fname, mode) if not f then return false end f.mode.b = true diff --git a/lib/pkgfs.lua b/lib/pkgfs.lua index ed6beaa..2a6e019 100644 --- a/lib/pkgfs.lua +++ b/lib/pkgfs.lua @@ -98,7 +98,7 @@ function pkgfs.component.close(handle) return true end -function pkgfs.add(fname,comp) +function pkgfs.add(fname,comp) -- string boolean -- -- Add a package as specified in *fname* to the pkgfs component. If *comp* is true, read it as a LZ16-compressed package. if fname:sub(1,1) ~= "/" then fname = "/"..fnormalize(os.getenv("PWD").."/"..fname) end