From 424fff784211d88a5f1d59debf6832d4796449e8 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Thu, 5 Dec 2019 13:44:35 -0700 Subject: [PATCH] apparently read was added to fs.open "r" mode in 2017 --- sys/modules/opus/fs/ramfs.lua | 4 ++++ sys/modules/opus/fs/urlfs.lua | 4 ++++ sys/modules/opus/ui/transition.lua | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/modules/opus/fs/ramfs.lua b/sys/modules/opus/fs/ramfs.lua index 1ed2f7a..a516d80 100644 --- a/sys/modules/opus/fs/ramfs.lua +++ b/sys/modules/opus/fs/ramfs.lua @@ -77,6 +77,10 @@ function ramfs.open(node, fn, fl) local ctr = 0 local lines return { + read = function() + ctr = ctr + 1 + return node.contents:sub(ctr, ctr) + end, readLine = function() if not lines then lines = Util.split(node.contents) diff --git a/sys/modules/opus/fs/urlfs.lua b/sys/modules/opus/fs/urlfs.lua index 960806e..3595cb3 100644 --- a/sys/modules/opus/fs/urlfs.lua +++ b/sys/modules/opus/fs/urlfs.lua @@ -74,6 +74,10 @@ function urlfs.open(node, fn, fl) if fl == 'r' then return { + read = function() + ctr = ctr + 1 + return c:sub(ctr, ctr) + end, readLine = function() if not lines then lines = Util.split(c) diff --git a/sys/modules/opus/ui/transition.lua b/sys/modules/opus/ui/transition.lua index f8cee0b..4448760 100644 --- a/sys/modules/opus/ui/transition.lua +++ b/sys/modules/opus/ui/transition.lua @@ -39,7 +39,7 @@ function Transition.expandUp(args) local easing = args.easing or 'linear' local pos = { y = args.ey + 1 } local tween = Tween.new(ticks, pos, { y = args.y }, easing) -_syslog(args) + args.canvas:move(args.x, pos.y) return function()