X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fztact.lua;h=40aa8843c7e46dd493f54e4ac143152d6f30cc6b;hb=5e83520797da53d4e204ab76c7d169d7b5400405;hp=15bcffad6c0a7ef8911d62b2ffe549c808d9b6cc;hpb=6d9f97378cd7d73cc22ac102e546c52799bb8615;p=prosody.git diff --git a/util/ztact.lua b/util/ztact.lua index 15bcffad..40aa8843 100644 --- a/util/ztact.lua +++ b/util/ztact.lua @@ -1,4 +1,6 @@ - +-- Prosody IM +-- This file is included with Prosody IM. It has modifications, +-- which are hereby placed in the public domain. -- public domain 20080410 lua@ztact.com @@ -112,7 +114,7 @@ function tohex (s) -- - - - - - - - - - - - - - - - - - - - - - - - - tohex function tostring_r (d, indent, tab0) -- - - - - - - - - - - - - tostring_r - tab1 = tab0 or {} + local tab1 = tab0 or {} local rep = string.rep (' ', indent or 0) if type (d) == 'table' then for k,v in pairs (d) do @@ -208,7 +210,7 @@ function enqueue (queue, element) -- - - - - - - - - - - - - - - - - enqueue local function test_queue () - t = {} + local t = {} enqueue (t, 1) enqueue (t, 2) enqueue (t, 3) @@ -345,7 +347,7 @@ function lson_encode (mixed, f, indent, indents) --------------- lson_encode f ('[') f (lson_encode (k)) f ('] = ') lson_encode (v, f, indent+1, indents) f (',') - end + end f (' }') end end end