1 diff -ur notion-3-2014052800.mangled/contrib/scripts/simple_bindings.lua notion-3-2014052800/contrib/scripts/simple_bindings.lua
2 --- notion-3-2014052800.mangled/contrib/scripts/simple_bindings.lua 2014-05-27 18:00:18.000000000 -0400
3 +++ notion-3-2014052800/contrib/scripts/simple_bindings.lua 2014-08-04 03:54:53.380883374 -0400
6 ioncore = {get_paths = function() return {userdir="/home/deryni/.ion3"} end}
8 - loadstring = function(str) return function() print(str) end end
9 + load = function(str) return function() print(str) end end
12 --}}} Standalone hacks
14 str = str.."\tkpress(\""..bind.keystr..[[", "]]..bind.bindstr.."\"),\n"
21 -- vim: set expandtab sw=4:
22 diff -ur notion-3-2014052800.mangled/contrib/statusbar/statusbar_external.lua notion-3-2014052800/contrib/statusbar/statusbar_external.lua
23 --- notion-3-2014052800.mangled/contrib/statusbar/statusbar_external.lua 2014-05-27 18:00:18.000000000 -0400
24 +++ notion-3-2014052800/contrib/statusbar/statusbar_external.lua 2014-08-04 03:54:53.381313664 -0400
27 for key in pairs(statusbar_external) do
28 timers[key] = ioncore.create_timer()
29 - callbacks[key] = loadstring("start_execute("..key..")")
30 + callbacks[key] = load("start_execute("..key..")")
34 diff -ur notion-3-2014052800.mangled/contrib/statusd/legacy/statusd_sysmon.lua notion-3-2014052800/contrib/statusd/legacy/statusd_sysmon.lua
35 --- notion-3-2014052800.mangled/contrib/statusd/legacy/statusd_sysmon.lua 2014-05-27 18:00:18.000000000 -0400
36 +++ notion-3-2014052800/contrib/statusd/legacy/statusd_sysmon.lua 2014-08-04 03:54:53.381656408 -0400
38 return (metrics[arg1] or "")
40 sysmon_st = string.gsub (sysmon_st, "%$%{(.-)%}", function (arg1)
41 - return loadstring("return "..arg1)()
42 + return load("return "..arg1)()
44 -- replacing the '%%' macros with the '%' symbol
45 sysmon_st = string.gsub (sysmon_st, "%%%%", "%%")
46 diff -ur notion-3-2014052800.mangled/ioncore/ioncore_bindings.lua notion-3-2014052800/ioncore/ioncore_bindings.lua
47 --- notion-3-2014052800.mangled/ioncore/ioncore_bindings.lua 2014-05-27 18:00:18.000000000 -0400
48 +++ notion-3-2014052800/ioncore/ioncore_bindings.lua 2014-08-04 03:54:53.382014910 -0400
51 local gfncode="return function(_, _sub, _chld) "..guardcode.." return true end"
53 - gfn, gerr=loadstring(gfncode, guardcode)
54 + gfn, gerr=load(gfncode, guardcode)
56 ioncore.warn_traced(TR("Error compiling guard: %s", gerr))
59 if type(cmd)=="string" then
60 local fncode=("return function(_, _sub, _chld) local d = "
62 - local fn, err=loadstring(fncode, cmd)
63 + local fn, err=load(fncode, cmd)
65 ioncore.warn_traced(TR("Error in command string: ")..err)
67 diff -ur notion-3-2014052800.mangled/mod_query/mod_query.lua notion-3-2014052800/mod_query/mod_query.lua
68 --- notion-3-2014052800.mangled/mod_query/mod_query.lua 2014-05-27 18:00:18.000000000 -0400
69 +++ notion-3-2014052800/mod_query/mod_query.lua 2014-08-04 03:54:53.382604012 -0400
74 - local f, err=loadstring(code)
75 + local f, err=load(code)
77 mod_query.warn(mplex, err)
79 diff -ur notion-3-2014052800.mangled/mod_xinerama/mod_xinerama.lua notion-3-2014052800/mod_xinerama/mod_xinerama.lua
80 --- notion-3-2014052800.mangled/mod_xinerama/mod_xinerama.lua 2014-05-27 18:00:18.000000000 -0400
81 +++ notion-3-2014052800/mod_xinerama/mod_xinerama.lua 2014-08-04 04:24:22.371015820 -0400
86 +-- table.maxn doesn't exist in lua 5.2
87 +local function table_maxn(t)
89 + for k, v in pairs(t) do
98 -- Merges overlapping screens. I.e. it finds set of smallest rectangles,
99 -- such that these rectangles do not overlap and such that they contain
104 - if not pos then pos = table.maxn(ret)+1 end
105 - table.insert(ret, pos, newscreen)
106 + if not pos then pos = table_maxn(ret)+1 end
107 + ret[pos] = newscreen
109 fix_representations(ret)
113 -- pos keeps index of first set that we merged in this loop,
114 -- we want to insert the product of this merge to pos.
115 - if not pos then pos = table.maxn(screensets)+1 end
116 + if not pos then pos = table_maxn(screensets)+1 end
117 table.insert(screensets, pos, mergedset)