diff options
| author | dvs1 | 2024-10-28 15:48:54 +1000 |
|---|---|---|
| committer | dvs1 | 2024-10-28 15:48:54 +1000 |
| commit | 1d75fbb58a1313ff402a987903ea4593eb0b91a2 (patch) | |
| tree | 235389a6a5ef10321b431220c731331bdf225a85 | |
| parent | Hello -> G'day, coz I'm an Aussie, and it helps test embedded quote marks. (diff) | |
| download | JackOnAllDevices-1d75fbb58a1313ff402a987903ea4593eb0b91a2.zip JackOnAllDevices-1d75fbb58a1313ff402a987903ea4593eb0b91a2.tar.gz JackOnAllDevices-1d75fbb58a1313ff402a987903ea4593eb0b91a2.tar.bz2 JackOnAllDevices-1d75fbb58a1313ff402a987903ea4593eb0b91a2.tar.xz | |
Minor tweaks.
Diffstat (limited to '')
| -rwxr-xr-x | PolygLua.lua | 18 | ||||
| -rwxr-xr-x | aataaj.lua | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/PolygLua.lua b/PolygLua.lua index 727e62c..20925b7 100755 --- a/PolygLua.lua +++ b/PolygLua.lua | |||
| @@ -29,13 +29,13 @@ local log = function(v, t, s) | |||
| 29 | io.flush() | 29 | io.flush() |
| 30 | end | 30 | end |
| 31 | 31 | ||
| 32 | -- This sets the global values, here and in the caller. | 32 | -- This sets the global values, here and in the caller. The "_G." part isn't needed, it's just there to make things more obvious to the reader. |
| 33 | D = function(s) log(4, 'DEBUG ', s) end | 33 | _G.D = function(s) log(4, 'DEBUG ', s) end |
| 34 | I = function(s) log(3, 'INFO ', s) end | 34 | _G.I = function(s) log(3, 'INFO ', s) end |
| 35 | T = function(s) log(2, 'TIMEOUT ', s) end | 35 | _G.T = function(s) log(2, 'TIMEOUT ', s) end |
| 36 | W = function(s) log(1, 'WARNING ', s) end | 36 | _G.W = function(s) log(1, 'WARNING ', s) end |
| 37 | E = function(s) log(0, 'ERROR ', s) end | 37 | _G.E = function(s) log(0, 'ERROR ', s) end |
| 38 | C = function(s) log(-1, 'CRITICAL ', s) end | 38 | _G.C = function(s) log(-1, 'CRITICAL ', s) end |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | local optionsCommon = | 41 | local optionsCommon = |
| @@ -190,7 +190,7 @@ _.readCmd = function(cmd) | |||
| 190 | end | 190 | end |
| 191 | 191 | ||
| 192 | 192 | ||
| 193 | __ = function(c) | 193 | _G.__ = function(c) |
| 194 | local exe = {status = 0, lines = {}, logging = false, showing = false, cmd = '', command = c, isScript = false, script = ''} | 194 | local exe = {status = 0, lines = {}, logging = false, showing = false, cmd = '', command = c, isScript = false, script = ''} |
| 195 | local n = 0 | 195 | local n = 0 |
| 196 | 196 | ||
| @@ -201,7 +201,7 @@ __ = function(c) | |||
| 201 | exe.cmd = exe.cmd .. l .. ' ; ' | 201 | exe.cmd = exe.cmd .. l .. ' ; ' |
| 202 | end | 202 | end |
| 203 | elseif 'string' == type(c) then | 203 | elseif 'string' == type(c) then |
| 204 | exe.isScript = ('#!' == c:sub(1,2)) and (n == 0) | 204 | exe.isScript = (n == 0) and ('#!' == c:sub(1,2)) |
| 205 | for l in string.gmatch(c, '\n*([^\n]+)\n*') do | 205 | for l in string.gmatch(c, '\n*([^\n]+)\n*') do |
| 206 | if '' ~= l then | 206 | if '' ~= l then |
| 207 | if exe.isScript then | 207 | if exe.isScript then |
| @@ -175,7 +175,7 @@ end | |||
| 175 | print('') | 175 | print('') |
| 176 | io.flush() | 176 | io.flush() |
| 177 | 177 | ||
| 178 | -- TODO - No idea why the fuck #Cards kept telling me 0. No number indexes? | 178 | -- #Cards kept telling me 0, no number indexes. |
| 179 | local cnt = 0 | 179 | local cnt = 0 |
| 180 | for i,C in pairs(Cards) do | 180 | for i,C in pairs(Cards) do |
| 181 | cnt = cnt + 1 | 181 | cnt = cnt + 1 |
