diff options
author | chai <chaifix@163.com> | 2018-12-23 14:24:49 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-23 14:24:49 +0800 |
commit | d5bd4d53dfcda03558be24e8c353fc042802c085 (patch) | |
tree | a9109b68e529a49314154f5511fe53bb0e74fc0f /src | |
parent | 5b8b5c95589e615afda3f0d67db612b64297c2a0 (diff) |
* json\xml扩展
Diffstat (limited to 'src')
-rw-r--r-- | src/libjin-lua/je_lua_embed.h | 13 | ||||
-rw-r--r-- | src/libjin-lua/modules/time/je_lua_time.cpp | 13 | ||||
-rw-r--r-- | src/libjin-lua/scripts/app.lua | 8 | ||||
-rw-r--r-- | src/libjin-lua/scripts/app.lua.h | 153 | ||||
-rw-r--r-- | src/libjin-lua/scripts/log.lua | 93 | ||||
-rw-r--r-- | src/libjin-lua/scripts/log.lua.h | 129 | ||||
-rw-r--r-- | src/libjin-lua/scripts/utils/json.lua | 406 | ||||
-rw-r--r-- | src/libjin-lua/scripts/utils/json.lua.h | 578 | ||||
-rw-r--r-- | src/libjin-lua/scripts/utils/xml.lua | 175 | ||||
-rw-r--r-- | src/libjin-lua/scripts/utils/xml.lua.h | 320 |
10 files changed, 1799 insertions, 89 deletions
diff --git a/src/libjin-lua/je_lua_embed.h b/src/libjin-lua/je_lua_embed.h index f99ff35..067e296 100644 --- a/src/libjin-lua/je_lua_embed.h +++ b/src/libjin-lua/je_lua_embed.h @@ -16,6 +16,10 @@ namespace JinEngine #include "scripts/mouse/mouse.lua.h" #include "scripts/path/path.lua.h" #include "scripts/time/time.lua.h" + #include "scripts/utils/json.lua.h" + #include "scripts/utils/xml.lua.h" + #include "scripts/log.lua.h" + #include "scripts/app.lua.h" // Embed structure. @@ -23,7 +27,7 @@ namespace JinEngine { const char* file, *source; }; - + // In order. static const jin_Embed modules[] = { // ai @@ -34,9 +38,13 @@ namespace JinEngine { "graphics.lua", graphics_lua }, { "path.lua", path_lua }, { "time.lua", time_lua }, + { "json.lua", json_lua }, + { "xml.lua", xml_lua }, + // + { "log.lua", log_lua }, { 0, 0 } }; - + static const jin_Embed bootscript = { "app.lua", app_lua }; static void run(lua_State* L) @@ -52,7 +60,6 @@ namespace JinEngine if (luax_loadbuffer(L, source, strlen(source), file) == 0) { luax_call(L, 0, 0); - jin_log_info("Done."); } else { diff --git a/src/libjin-lua/modules/time/je_lua_time.cpp b/src/libjin-lua/modules/time/je_lua_time.cpp index 764cf9d..b0468ec 100644 --- a/src/libjin-lua/modules/time/je_lua_time.cpp +++ b/src/libjin-lua/modules/time/je_lua_time.cpp @@ -12,12 +12,6 @@ namespace JinEngine namespace Lua { - static struct - { - float previous; - float current; - } context; - LUA_IMPLEMENT int l_sec(lua_State* L) { luax_pushnumber(L, getSecond()); @@ -40,22 +34,21 @@ namespace JinEngine LUA_IMPLEMENT int l_getDelta(lua_State* L) { - luax_pushnumber(L, context.current - context.previous); + luax_pushnumber(L, Time::getDeltaTime()); return 1; } LUA_IMPLEMENT int l_step(lua_State* L) { - context.previous = context.current; - context.current = getSecond(); - // Update jin time counter. Time::step(); return 0; } LUA_EXPORT int luaopen_time(lua_State* L) { + // Types. luaopen_Timer(L); + // Functions. luaL_Reg methods[] = { { "second", l_sec }, { "sleep", l_sleep }, diff --git a/src/libjin-lua/scripts/app.lua b/src/libjin-lua/scripts/app.lua index 1e55857..d4f2e59 100644 --- a/src/libjin-lua/scripts/app.lua +++ b/src/libjin-lua/scripts/app.lua @@ -58,9 +58,9 @@ end -- Display error message. local function onError(msg) - jin.audio.destroy() + local err = "Error occurred:\n" .. msg .. "\n" .. debug.traceback() + jin.log.error(err) jin.graphics.showWindow() - local err = "Error:\n" .. msg .. "\n" .. debug.traceback() jin.graphics.reset() jin.graphics.setClearColor(100, 100, 100, 255) jin.graphics.clear() @@ -113,6 +113,8 @@ jin.audio.init() jin.graphics.init(jin.config) +jin.log.info("Start game...") + ------------------------------------------------------------------------- -- Boot game ------------------------------------------------------------------------- @@ -123,6 +125,8 @@ xpcall(boot, onError) -- Destroy sub-systems ------------------------------------------------------------------------- +jin.log.info("Quit...") + jin.graphics.destroy() jin.audio.destroy() diff --git a/src/libjin-lua/scripts/app.lua.h b/src/libjin-lua/scripts/app.lua.h index 34da98b..ab2975b 100644 --- a/src/libjin-lua/scripts/app.lua.h +++ b/src/libjin-lua/scripts/app.lua.h @@ -99,108 +99,113 @@ static char app_lua[] = { 45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,45,45, 32,68,105,115,112,108,97,121,32,101,114,114,111,114,32,109,101,115,115,97, 103,101,46,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32, -111,110,69,114,114,111,114,40,109,115,103,41,32,13,10,32,32,32,32,106, -105,110,46,97,117,100,105,111,46,100,101,115,116,114,111,121,40,41,13,10, -32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,115,104,111, -119,87,105,110,100,111,119,40,41,13,10,32,32,32,32,108,111,99,97,108, -32,101,114,114,32,61,32,34,69,114,114,111,114,58,92,110,34,32,46,46, -32,109,115,103,32,46,46,32,34,92,110,34,32,46,46,32,100,101,98,117, -103,46,116,114,97,99,101,98,97,99,107,40,41,13,10,32,32,32,32,106, +111,110,69,114,114,111,114,40,109,115,103,41,32,13,10,32,32,32,32,108, +111,99,97,108,32,101,114,114,32,61,32,34,69,114,114,111,114,32,111,99, +99,117,114,114,101,100,58,92,110,34,32,46,46,32,109,115,103,32,46,46, +32,34,92,110,34,32,46,46,32,100,101,98,117,103,46,116,114,97,99,101, +98,97,99,107,40,41,13,10,32,32,32,32,45,45,32,76,111,103,32,111, +117,116,46,13,10,32,32,32,32,106,105,110,46,108,111,103,46,101,114,114, +111,114,40,101,114,114,41,13,10,32,32,32,32,106,105,110,46,103,114,97, +112,104,105,99,115,46,115,104,111,119,87,105,110,100,111,119,40,41,13,10, +32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,114,101,115, +101,116,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105, +99,115,46,115,101,116,67,108,101,97,114,67,111,108,111,114,40,49,48,48, +44,32,49,48,48,44,32,49,48,48,44,32,50,53,53,41,13,10,32,32, +32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,99,108,101,97,114, +40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115, +46,112,114,105,110,116,40,101,114,114,44,32,53,44,32,53,41,13,10,32, +32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,112,114,101,115, +101,110,116,40,41,13,10,32,32,32,32,119,104,105,108,101,32,106,105,110, +46,99,111,114,101,46,114,117,110,110,105,110,103,40,41,32,100,111,32,13, +10,32,32,32,32,32,32,32,32,102,111,114,32,95,44,32,101,32,105,110, +32,112,97,105,114,115,40,106,105,110,46,101,118,101,110,116,46,112,111,108, +108,40,41,41,32,100,111,32,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,105,102,32,101,46,116,121,112,101,32,61,61,32,34,81,117,105,116, +34,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,106,105,110,46,99,111,114,101,46,115,116,111,112,40,41, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32, +106,105,110,46,116,105,109,101,46,115,108,101,101,112,40,48,46,48,48,49, +41,13,10,32,32,32,32,101,110,100,13,10,101,110,100,13,10,13,10,45, +45,32,78,111,32,103,97,109,101,32,115,99,114,101,101,110,46,13,10,108, +111,99,97,108,32,102,117,110,99,116,105,111,110,32,110,111,71,97,109,101, +40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115, +46,115,104,111,119,87,105,110,100,111,119,40,41,13,10,32,32,32,32,106, 105,110,46,103,114,97,112,104,105,99,115,46,114,101,115,101,116,40,41,13, 10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,115,101, 116,67,108,101,97,114,67,111,108,111,114,40,49,48,48,44,32,49,48,48, 44,32,49,48,48,44,32,50,53,53,41,13,10,32,32,32,32,106,105,110, 46,103,114,97,112,104,105,99,115,46,99,108,101,97,114,40,41,13,10,32, 32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,112,114,105,110, -116,40,101,114,114,44,32,53,44,32,53,41,13,10,32,32,32,32,106,105, -110,46,103,114,97,112,104,105,99,115,46,112,114,101,115,101,110,116,40,41, -13,10,32,32,32,32,119,104,105,108,101,32,106,105,110,46,99,111,114,101, -46,114,117,110,110,105,110,103,40,41,32,100,111,32,13,10,32,32,32,32, -32,32,32,32,102,111,114,32,95,44,32,101,32,105,110,32,112,97,105,114, -115,40,106,105,110,46,101,118,101,110,116,46,112,111,108,108,40,41,41,32, -100,111,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32, -101,46,116,121,112,101,32,61,61,32,34,81,117,105,116,34,32,116,104,101, -110,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, -106,105,110,46,99,111,114,101,46,115,116,111,112,40,41,13,10,32,32,32, -32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32, -32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,106,105,110,46,116, -105,109,101,46,115,108,101,101,112,40,48,46,48,48,49,41,13,10,32,32, -32,32,101,110,100,13,10,101,110,100,13,10,13,10,45,45,32,78,111,32, -103,97,109,101,32,115,99,114,101,101,110,46,13,10,108,111,99,97,108,32, -102,117,110,99,116,105,111,110,32,110,111,71,97,109,101,40,41,13,10,32, -32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,115,104,111,119, -87,105,110,100,111,119,40,41,13,10,32,32,32,32,106,105,110,46,103,114, -97,112,104,105,99,115,46,114,101,115,101,116,40,41,13,10,32,32,32,32, -106,105,110,46,103,114,97,112,104,105,99,115,46,115,101,116,67,108,101,97, -114,67,111,108,111,114,40,49,48,48,44,32,49,48,48,44,32,49,48,48, -44,32,50,53,53,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112, -104,105,99,115,46,99,108,101,97,114,40,41,13,10,32,32,32,32,106,105, -110,46,103,114,97,112,104,105,99,115,46,112,114,105,110,116,40,34,78,111, -32,71,97,109,101,34,44,32,53,44,32,53,41,32,13,10,32,32,32,32, -106,105,110,46,103,114,97,112,104,105,99,115,46,112,114,101,115,101,110,116, -40,41,13,10,32,32,32,32,119,104,105,108,101,32,106,105,110,46,99,111, -114,101,46,114,117,110,110,105,110,103,40,41,32,100,111,32,13,10,32,32, -32,32,32,32,32,32,102,111,114,32,95,44,32,101,32,105,110,32,112,97, -105,114,115,40,106,105,110,46,101,118,101,110,116,46,112,111,108,108,40,41, -41,32,100,111,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, -102,32,101,46,116,121,112,101,32,61,61,32,34,81,117,105,116,34,32,116, -104,101,110,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, -32,32,106,105,110,46,99,111,114,101,46,115,116,111,112,40,41,13,10,32, -32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, -32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,106,105,110, -46,116,105,109,101,46,115,108,101,101,112,40,48,46,48,48,49,41,13,10, -32,32,32,32,101,110,100,13,10,101,110,100,13,10,13,10,108,111,99,97, -108,32,102,117,110,99,116,105,111,110,32,98,111,111,116,40,41,32,13,10, -32,32,32,32,105,102,32,106,105,110,46,102,105,108,101,115,121,115,116,101, -109,46,101,120,105,115,116,40,34,109,97,105,110,46,108,117,97,34,41,32, -116,104,101,110,32,13,10,32,32,32,32,32,32,32,32,99,97,108,108,40, -102,117,110,99,116,105,111,110,40,41,32,13,10,32,32,32,32,32,32,32, -32,32,32,32,32,114,101,113,117,105,114,101,34,109,97,105,110,34,32,13, -10,32,32,32,32,32,32,32,32,32,32,32,32,106,105,110,46,99,111,114, -101,46,114,117,110,40,41,13,10,32,32,32,32,32,32,32,32,101,110,100, -41,13,10,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32, -32,110,111,71,97,109,101,40,41,13,10,32,32,32,32,101,110,100,13,10, -101,110,100,13,10,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45, +116,40,34,78,111,32,71,97,109,101,34,44,32,53,44,32,53,41,32,13, +10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,112,114, +101,115,101,110,116,40,41,13,10,32,32,32,32,119,104,105,108,101,32,106, +105,110,46,99,111,114,101,46,114,117,110,110,105,110,103,40,41,32,100,111, +32,13,10,32,32,32,32,32,32,32,32,102,111,114,32,95,44,32,101,32, +105,110,32,112,97,105,114,115,40,106,105,110,46,101,118,101,110,116,46,112, +111,108,108,40,41,41,32,100,111,32,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,105,102,32,101,46,116,121,112,101,32,61,61,32,34,81,117, +105,116,34,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,106,105,110,46,99,111,114,101,46,115,116,111,112, +40,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13, +10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32, +32,32,106,105,110,46,116,105,109,101,46,115,108,101,101,112,40,48,46,48, +48,49,41,13,10,32,32,32,32,101,110,100,13,10,101,110,100,13,10,13, +10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,98,111,111,116, +40,41,32,13,10,32,32,32,32,105,102,32,106,105,110,46,102,105,108,101, +115,121,115,116,101,109,46,101,120,105,115,116,40,34,109,97,105,110,46,108, +117,97,34,41,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32, +99,97,108,108,40,102,117,110,99,116,105,111,110,40,41,32,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,114,101,113,117,105,114,101,34,109,97, +105,110,34,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,105, +110,46,99,111,114,101,46,114,117,110,40,41,13,10,32,32,32,32,32,32, +32,32,101,110,100,41,13,10,32,32,32,32,101,108,115,101,13,10,32,32, +32,32,32,32,32,32,110,111,71,97,109,101,40,41,13,10,32,32,32,32, +101,110,100,13,10,101,110,100,13,10,13,10,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -13,10,45,45,32,73,110,105,116,105,97,108,105,122,101,32,115,117,98,32, -115,121,115,116,101,109,115,13,10,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,13,10,45,45,32,73,110,105,116,105,97,108,105,122,101, +32,115,117,98,32,115,121,115,116,101,109,115,13,10,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,13,10,13,10,106,105,110,46,97,117,100,105,111,46,105,110,105,116, -40,41,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99,115,46,105, -110,105,116,40,106,105,110,46,99,111,110,102,105,103,41,13,10,13,10,45, +45,45,45,45,45,45,45,13,10,13,10,106,105,110,46,97,117,100,105,111, +46,105,110,105,116,40,41,13,10,13,10,106,105,110,46,103,114,97,112,104, +105,99,115,46,105,110,105,116,40,106,105,110,46,99,111,110,102,105,103,41, +13,10,13,10,106,105,110,46,108,111,103,46,105,110,102,111,40,34,83,116, +97,114,116,32,103,97,109,101,46,46,46,34,41,13,10,13,10,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,66,111,111, -116,32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,66,111,111,116,32, +103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13, +10,13,10,120,112,99,97,108,108,40,98,111,111,116,44,32,111,110,69,114, +114,111,114,41,13,10,13,10,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,13,10,13,10,120,112,99,97,108,108,40,98,111,111,116,44,32,111,110, -69,114,114,111,114,41,13,10,13,10,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,13,10,45,45,32,68,101,115,116,114,111,121,32,115,117,98,45,115,121, +115,116,101,109,115,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,13,10,45,45,32,68,101,115,116,114,111,121,32,115,117,98,45, -115,121,115,116,101,109,115,13,10,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +13,10,13,10,106,105,110,46,108,111,103,46,105,110,102,111,40,34,81,117, +105,116,46,46,46,34,41,13,10,13,10,106,105,110,46,103,114,97,112,104, +105,99,115,46,100,101,115,116,114,111,121,40,41,13,10,13,10,106,105,110, +46,97,117,100,105,111,46,100,101,115,116,114,111,121,40,41,13,10,13,10, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99,115,46,100, -101,115,116,114,111,121,40,41,13,10,13,10,106,105,110,46,97,117,100,105, -111,46,100,101,115,116,114,111,121,40,41,13,10,13,10,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,81,117, +105,116,32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,13,10,45,45,32,81,117,105,116,32,103,97, -109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13, -10,106,105,110,46,99,111,114,101,46,113,117,105,116,40,41,13,10 +45,45,13,10,13,10,106,105,110,46,99,111,114,101,46,113,117,105,116,40, +41,13,10 }; diff --git a/src/libjin-lua/scripts/log.lua b/src/libjin-lua/scripts/log.lua new file mode 100644 index 0000000..bf88399 --- /dev/null +++ b/src/libjin-lua/scripts/log.lua @@ -0,0 +1,93 @@ +-- +-- https://github.com/rxi/log.lua +-- +-- log.lua +-- +-- Copyright (c) 2016 rxi +-- +-- This library is free software; you can redistribute it and/or modify it +-- under the terms of the MIT license. See LICENSE for details. +-- + +local log = { _version = "0.1.0" } + +log.usecolor = true +log.outfile = nil +log.level = "trace" + + +local modes = { + { name = "trace", color = "\27[34m", }, + { name = "debug", color = "\27[36m", }, + { name = "info", color = "\27[32m", }, + { name = "warn", color = "\27[33m", }, + { name = "error", color = "\27[31m", }, + { name = "fatal", color = "\27[35m", }, +} + + +local levels = {} +for i, v in ipairs(modes) do + levels[v.name] = i +end + + +local round = function(x, increment) + increment = increment or 1 + x = x / increment + return (x > 0 and math.floor(x + .5) or math.ceil(x - .5)) * increment +end + + +local _tostring = tostring + +local tostring = function(...) + local t = {} + for i = 1, select('#', ...) do + local x = select(i, ...) + if type(x) == "number" then + x = round(x, .01) + end + t[#t + 1] = _tostring(x) + end + return table.concat(t, " ") +end + + +for i, x in ipairs(modes) do + local nameupper = x.name:upper() + log[x.name] = function(...) + + -- Return early if we're below the log level + if i < levels[log.level] then + return + end + + local msg = tostring(...) + local info = debug.getinfo(2, "Sl") + local lineinfo = info.short_src .. ":" .. info.currentline + + -- Output to console + print(string.format("%s[%-6s%s]%s %s: %s", + log.usecolor and x.color or "", + nameupper, + os.date("%H:%M:%S"), + log.usecolor and "\27[0m" or "", + lineinfo, + msg)) + + -- Output to log file + if log.outfile then + local fp = io.open(log.outfile, "a") + local str = string.format("[%-6s%s] %s: %s\n", + nameupper, os.date(), lineinfo, msg) + fp:write(str) + fp:close() + end + + end +end + +-- Export to Jin. + +jin.log = log diff --git a/src/libjin-lua/scripts/log.lua.h b/src/libjin-lua/scripts/log.lua.h new file mode 100644 index 0000000..266975c --- /dev/null +++ b/src/libjin-lua/scripts/log.lua.h @@ -0,0 +1,129 @@ +/*Auto generated, don't modify by hand.*/ +static char log_lua[] = { +45,45,13,10,45,45,32,104,116,116,112,115,58,47,47,103,105,116,104,117, +98,46,99,111,109,47,114,120,105,47,108,111,103,46,108,117,97,13,10,45, +45,32,13,10,45,45,32,108,111,103,46,108,117,97,13,10,45,45,13,10, +45,45,32,67,111,112,121,114,105,103,104,116,32,40,99,41,32,50,48,49, +54,32,114,120,105,13,10,45,45,13,10,45,45,32,84,104,105,115,32,108, +105,98,114,97,114,121,32,105,115,32,102,114,101,101,32,115,111,102,116,119, +97,114,101,59,32,121,111,117,32,99,97,110,32,114,101,100,105,115,116,114, +105,98,117,116,101,32,105,116,32,97,110,100,47,111,114,32,109,111,100,105, +102,121,32,105,116,13,10,45,45,32,117,110,100,101,114,32,116,104,101,32, +116,101,114,109,115,32,111,102,32,116,104,101,32,77,73,84,32,108,105,99, +101,110,115,101,46,32,83,101,101,32,76,73,67,69,78,83,69,32,102,111, +114,32,100,101,116,97,105,108,115,46,13,10,45,45,13,10,13,10,108,111, +99,97,108,32,108,111,103,32,61,32,123,32,95,118,101,114,115,105,111,110, +32,61,32,34,48,46,49,46,48,34,32,125,13,10,13,10,108,111,103,46, +117,115,101,99,111,108,111,114,32,61,32,116,114,117,101,13,10,108,111,103, +46,111,117,116,102,105,108,101,32,61,32,110,105,108,13,10,108,111,103,46, +108,101,118,101,108,32,61,32,34,116,114,97,99,101,34,13,10,13,10,13, +10,108,111,99,97,108,32,109,111,100,101,115,32,61,32,123,13,10,32,32, +32,32,123,32,110,97,109,101,32,61,32,34,116,114,97,99,101,34,44,32, +99,111,108,111,114,32,61,32,34,92,50,55,91,51,52,109,34,44,32,125, +44,13,10,32,32,32,32,123,32,110,97,109,101,32,61,32,34,100,101,98, +117,103,34,44,32,99,111,108,111,114,32,61,32,34,92,50,55,91,51,54, +109,34,44,32,125,44,13,10,32,32,32,32,123,32,110,97,109,101,32,61, +32,34,105,110,102,111,34,44,32,32,32,32,99,111,108,111,114,32,61,32, +34,92,50,55,91,51,50,109,34,44,32,125,44,13,10,32,32,32,32,123, +32,110,97,109,101,32,61,32,34,119,97,114,110,34,44,32,32,32,32,99, +111,108,111,114,32,61,32,34,92,50,55,91,51,51,109,34,44,32,125,44, +13,10,32,32,32,32,123,32,110,97,109,101,32,61,32,34,101,114,114,111, +114,34,44,32,99,111,108,111,114,32,61,32,34,92,50,55,91,51,49,109, +34,44,32,125,44,13,10,32,32,32,32,123,32,110,97,109,101,32,61,32, +34,102,97,116,97,108,34,44,32,99,111,108,111,114,32,61,32,34,92,50, +55,91,51,53,109,34,44,32,125,44,13,10,125,13,10,13,10,13,10,108, +111,99,97,108,32,108,101,118,101,108,115,32,61,32,123,125,13,10,102,111, +114,32,105,44,32,118,32,105,110,32,105,112,97,105,114,115,40,109,111,100, +101,115,41,32,100,111,13,10,32,32,32,32,108,101,118,101,108,115,91,118, +46,110,97,109,101,93,32,61,32,105,13,10,101,110,100,13,10,13,10,13, +10,108,111,99,97,108,32,114,111,117,110,100,32,61,32,102,117,110,99,116, +105,111,110,40,120,44,32,105,110,99,114,101,109,101,110,116,41,13,10,32, +32,32,32,105,110,99,114,101,109,101,110,116,32,61,32,105,110,99,114,101, +109,101,110,116,32,111,114,32,49,13,10,32,32,32,32,120,32,61,32,120, +32,47,32,105,110,99,114,101,109,101,110,116,13,10,32,32,32,32,114,101, +116,117,114,110,32,40,120,32,62,32,48,32,97,110,100,32,109,97,116,104, +46,102,108,111,111,114,40,120,32,43,32,46,53,41,32,111,114,32,109,97, +116,104,46,99,101,105,108,40,120,32,45,32,46,53,41,41,32,42,32,105, +110,99,114,101,109,101,110,116,13,10,101,110,100,13,10,13,10,13,10,108, +111,99,97,108,32,95,116,111,115,116,114,105,110,103,32,61,32,116,111,115, +116,114,105,110,103,13,10,13,10,108,111,99,97,108,32,116,111,115,116,114, +105,110,103,32,61,32,102,117,110,99,116,105,111,110,40,46,46,46,41,13, +10,32,32,32,32,108,111,99,97,108,32,116,32,61,32,123,125,13,10,32, +32,32,32,102,111,114,32,105,32,61,32,49,44,32,115,101,108,101,99,116, +40,39,35,39,44,32,46,46,46,41,32,100,111,13,10,32,32,32,32,32, +32,32,32,108,111,99,97,108,32,120,32,61,32,115,101,108,101,99,116,40, +105,44,32,46,46,46,41,13,10,32,32,32,32,32,32,32,32,105,102,32, +116,121,112,101,40,120,41,32,61,61,32,34,110,117,109,98,101,114,34,32, +116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,120,32, +61,32,114,111,117,110,100,40,120,44,32,46,48,49,41,13,10,32,32,32, +32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,116,91, +35,116,32,43,32,49,93,32,61,32,95,116,111,115,116,114,105,110,103,40, +120,41,13,10,32,32,32,32,101,110,100,13,10,32,32,32,32,114,101,116, +117,114,110,32,116,97,98,108,101,46,99,111,110,99,97,116,40,116,44,32, +34,32,34,41,13,10,101,110,100,13,10,13,10,13,10,102,111,114,32,105, +44,32,120,32,105,110,32,105,112,97,105,114,115,40,109,111,100,101,115,41, +32,100,111,13,10,32,32,32,32,108,111,99,97,108,32,110,97,109,101,117, +112,112,101,114,32,61,32,120,46,110,97,109,101,58,117,112,112,101,114,40, +41,13,10,32,32,32,32,108,111,103,91,120,46,110,97,109,101,93,32,61, +32,102,117,110,99,116,105,111,110,40,46,46,46,41,13,10,32,32,32,32, +32,32,32,32,13,10,32,32,32,32,32,32,32,32,45,45,32,82,101,116, +117,114,110,32,101,97,114,108,121,32,105,102,32,119,101,39,114,101,32,98, +101,108,111,119,32,116,104,101,32,108,111,103,32,108,101,118,101,108,13,10, +32,32,32,32,32,32,32,32,105,102,32,105,32,60,32,108,101,118,101,108, +115,91,108,111,103,46,108,101,118,101,108,93,32,116,104,101,110,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,13,10,32, +32,32,32,32,32,32,32,101,110,100,13,10,13,10,32,32,32,32,32,32, +32,32,108,111,99,97,108,32,109,115,103,32,61,32,116,111,115,116,114,105, +110,103,40,46,46,46,41,13,10,32,32,32,32,32,32,32,32,108,111,99, +97,108,32,105,110,102,111,32,61,32,100,101,98,117,103,46,103,101,116,105, +110,102,111,40,50,44,32,34,83,108,34,41,13,10,32,32,32,32,32,32, +32,32,108,111,99,97,108,32,108,105,110,101,105,110,102,111,32,61,32,105, +110,102,111,46,115,104,111,114,116,95,115,114,99,32,46,46,32,34,58,34, +32,46,46,32,105,110,102,111,46,99,117,114,114,101,110,116,108,105,110,101, +13,10,13,10,32,32,32,32,32,32,32,32,45,45,32,79,117,116,112,117, +116,32,116,111,32,99,111,110,115,111,108,101,13,10,32,32,32,32,32,32, +32,32,112,114,105,110,116,40,115,116,114,105,110,103,46,102,111,114,109,97, +116,40,34,37,115,91,37,45,54,115,37,115,93,37,115,32,37,115,58,32, +37,115,34,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,108,111,103,46,117,115, +101,99,111,108,111,114,32,97,110,100,32,120,46,99,111,108,111,114,32,111, +114,32,34,34,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,117, +112,112,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,115,46,100,97, +116,101,40,34,37,72,58,37,77,58,37,83,34,41,44,13,10,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,108,111,103,46,117,115,101,99,111,108,111,114,32,97,110, +100,32,34,92,50,55,91,48,109,34,32,111,114,32,34,34,44,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,108,105,110,101,105,110,102,111,44,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,109,115,103,41,41,13,10,13,10,32,32,32,32,32, +32,32,32,45,45,32,79,117,116,112,117,116,32,116,111,32,108,111,103,32, +102,105,108,101,13,10,32,32,32,32,32,32,32,32,105,102,32,108,111,103, +46,111,117,116,102,105,108,101,32,116,104,101,110,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,108,111,99,97,108,32,102,112,32,61,32,105,111, +46,111,112,101,110,40,108,111,103,46,111,117,116,102,105,108,101,44,32,34, +97,34,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,108,111,99, +97,108,32,115,116,114,32,61,32,115,116,114,105,110,103,46,102,111,114,109, +97,116,40,34,91,37,45,54,115,37,115,93,32,37,115,58,32,37,115,92, +110,34,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,110,97,109,101,117,112,112,101,114,44,32, +111,115,46,100,97,116,101,40,41,44,32,108,105,110,101,105,110,102,111,44, +32,109,115,103,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102, +112,58,119,114,105,116,101,40,115,116,114,41,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,102,112,58,99,108,111,115,101,40,41,13,10,32,32, +32,32,32,32,32,32,101,110,100,13,10,13,10,32,32,32,32,101,110,100, +13,10,101,110,100,13,10,13,10,45,45,32,69,120,112,111,114,116,32,116, +111,32,74,105,110,46,32,13,10,13,10,106,105,110,46,108,111,103,32,61, +32,108,111,103,13,10 +}; + diff --git a/src/libjin-lua/scripts/utils/json.lua b/src/libjin-lua/scripts/utils/json.lua new file mode 100644 index 0000000..7bbaa7c --- /dev/null +++ b/src/libjin-lua/scripts/utils/json.lua @@ -0,0 +1,406 @@ + +jin.utils = jin.utils or {} + +-- +-- https://github.com/rxi/json.lua +-- +-- json.lua +-- +-- Copyright (c) 2018 rxi +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of +-- this software and associated documentation files (the "Software"), to deal in +-- the Software without restriction, including without limitation the rights to +-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. +-- + +local json = { _version = "0.1.1" } + +------------------------------------------------------------------------------- +-- Encode +------------------------------------------------------------------------------- + +local encode + +local escape_char_map = { + [ "\\" ] = "\\\\", + [ "\"" ] = "\\\"", + [ "\b" ] = "\\b", + [ "\f" ] = "\\f", + [ "\n" ] = "\\n", + [ "\r" ] = "\\r", + [ "\t" ] = "\\t", +} + +local escape_char_map_inv = { [ "\\/" ] = "/" } +for k, v in pairs(escape_char_map) do + escape_char_map_inv[v] = k +end + + +local function escape_char(c) + return escape_char_map[c] or string.format("\\u%04x", c:byte()) +end + + +local function encode_nil(val) + return "null" +end + + +local function encode_table(val, stack) + local res = {} + stack = stack or {} + + -- Circular reference? + if stack[val] then error("circular reference") end + + stack[val] = true + + if val[1] ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= "number" then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then + error("invalid table: sparse array") + end + -- Encode + for i, v in ipairs(val) do + table.insert(res, encode(v, stack)) + end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" + + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= "string" then + error("invalid table: mixed or invalid key types") + end + table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end +end + + +local function encode_string(val) + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' +end + + +local function encode_number(val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) +end + + +local type_func_map = { + [ "nil" ] = encode_nil, + [ "table" ] = encode_table, + [ "string" ] = encode_string, + [ "number" ] = encode_number, + [ "boolean" ] = tostring, +} + + +encode = function(val, stack) + local t = type(val) + local f = type_func_map[t] + if f then + return f(val, stack) + end + error("unexpected type '" .. t .. "'") +end + + +function json.encode(val) + return ( encode(val) ) +end + + +------------------------------------------------------------------------------- +-- Decode +------------------------------------------------------------------------------- + +local parse + +local function create_set(...) + local res = {} + for i = 1, select("#", ...) do + res[ select(i, ...) ] = true + end + return res +end + +local space_chars = create_set(" ", "\t", "\r", "\n") +local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") +local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") +local literals = create_set("true", "false", "null") + +local literal_map = { + [ "true" ] = true, + [ "false" ] = false, + [ "null" ] = nil, +} + + +local function next_char(str, idx, set, negate) + for i = idx, #str do + if set[str:sub(i, i)] ~= negate then + return i + end + end + return #str + 1 +end + + +local function decode_error(str, idx, msg) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error( string.format("%s at line %d col %d", msg, line_count, col_count) ) +end + + +local function codepoint_to_utf8(n) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = math.floor + if n <= 0x7f then + return string.char(n) + elseif n <= 0x7ff then + return string.char(f(n / 64) + 192, n % 64 + 128) + elseif n <= 0xffff then + return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, + f(n % 4096 / 64) + 128, n % 64 + 128) + end + error( string.format("invalid unicode codepoint '%x'", n) ) +end + + +local function parse_unicode_escape(s) + local n1 = tonumber( s:sub(3, 6), 16 ) + local n2 = tonumber( s:sub(9, 12), 16 ) + -- Surrogate pair? + if n2 then + return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end +end + + +local function parse_string(str, i) + local has_unicode_escape = false + local has_surrogate_escape = false + local has_escape = false + local last + for j = i + 1, #str do + local x = str:byte(j) + + if x < 32 then + decode_error(str, j, "control character in string") + end + + if last == 92 then -- "\\" (escape char) + if x == 117 then -- "u" (unicode escape sequence) + local hex = str:sub(j + 1, j + 5) + if not hex:find("%x%x%x%x") then + decode_error(str, j, "invalid unicode escape in string") + end + if hex:find("^[dD][89aAbB]") then + has_surrogate_escape = true + else + has_unicode_escape = true + end + else + local c = string.char(x) + if not escape_chars[c] then + decode_error(str, j, "invalid escape char '" .. c .. "' in string") + end + has_escape = true + end + last = nil + + elseif x == 34 then -- '"' (end of string) + local s = str:sub(i + 1, j - 1) + if has_surrogate_escape then + s = s:gsub("\\u[dD][89aAbB]..\\u....", parse_unicode_escape) + end + if has_unicode_escape then + s = s:gsub("\\u....", parse_unicode_escape) + end + if has_escape then + s = s:gsub("\\.", escape_char_map_inv) + end + return s, j + 1 + + else + last = x + end + end + decode_error(str, i, "expected closing quote for string") +end + + +local function parse_number(str, i) + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then + decode_error(str, i, "invalid number '" .. s .. "'") + end + return n, x +end + + +local function parse_literal(str, i) + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x +end + + +local function parse_array(str, i) + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then break end + if chr ~= "," then decode_error(str, i, "expected ']' or ','") end + end + return res, i +end + + +local function parse_object(str, i) + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then break end + if chr ~= "," then decode_error(str, i, "expected '}' or ','") end + end + return res, i +end + + +local char_func_map = { + [ '"' ] = parse_string, + [ "0" ] = parse_number, + [ "1" ] = parse_number, + [ "2" ] = parse_number, + [ "3" ] = parse_number, + [ "4" ] = parse_number, + [ "5" ] = parse_number, + [ "6" ] = parse_number, + [ "7" ] = parse_number, + [ "8" ] = parse_number, + [ "9" ] = parse_number, + [ "-" ] = parse_number, + [ "t" ] = parse_literal, + [ "f" ] = parse_literal, + [ "n" ] = parse_literal, + [ "[" ] = parse_array, + [ "{" ] = parse_object, +} + + +parse = function(str, idx) + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then + return f(str, idx) + end + decode_error(str, idx, "unexpected character '" .. chr .. "'") +end + + +function json.decode(str) + if type(str) ~= "string" then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then + decode_error(str, idx, "trailing garbage") + end + return res +end + +-- Export to Jin. + +jin.utils.json = json diff --git a/src/libjin-lua/scripts/utils/json.lua.h b/src/libjin-lua/scripts/utils/json.lua.h new file mode 100644 index 0000000..e630488 --- /dev/null +++ b/src/libjin-lua/scripts/utils/json.lua.h @@ -0,0 +1,578 @@ +/*Auto generated, don't modify by hand.*/ +static char json_lua[] = { +13,10,106,105,110,46,117,116,105,108,115,32,61,32,106,105,110,46,117,116, +105,108,115,32,111,114,32,123,125,13,10,13,10,45,45,13,10,45,45,32, +104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,114, +120,105,47,106,115,111,110,46,108,117,97,13,10,45,45,13,10,45,45,32, +106,115,111,110,46,108,117,97,13,10,45,45,13,10,45,45,32,67,111,112, +121,114,105,103,104,116,32,40,99,41,32,50,48,49,56,32,114,120,105,13, +10,45,45,13,10,45,45,32,80,101,114,109,105,115,115,105,111,110,32,105, +115,32,104,101,114,101,98,121,32,103,114,97,110,116,101,100,44,32,102,114, +101,101,32,111,102,32,99,104,97,114,103,101,44,32,116,111,32,97,110,121, +32,112,101,114,115,111,110,32,111,98,116,97,105,110,105,110,103,32,97,32, +99,111,112,121,32,111,102,13,10,45,45,32,116,104,105,115,32,115,111,102, +116,119,97,114,101,32,97,110,100,32,97,115,115,111,99,105,97,116,101,100, +32,100,111,99,117,109,101,110,116,97,116,105,111,110,32,102,105,108,101,115, +32,40,116,104,101,32,34,83,111,102,116,119,97,114,101,34,41,44,32,116, +111,32,100,101,97,108,32,105,110,13,10,45,45,32,116,104,101,32,83,111, +102,116,119,97,114,101,32,119,105,116,104,111,117,116,32,114,101,115,116,114, +105,99,116,105,111,110,44,32,105,110,99,108,117,100,105,110,103,32,119,105, +116,104,111,117,116,32,108,105,109,105,116,97,116,105,111,110,32,116,104,101, +32,114,105,103,104,116,115,32,116,111,13,10,45,45,32,117,115,101,44,32, +99,111,112,121,44,32,109,111,100,105,102,121,44,32,109,101,114,103,101,44, +32,112,117,98,108,105,115,104,44,32,100,105,115,116,114,105,98,117,116,101, +44,32,115,117,98,108,105,99,101,110,115,101,44,32,97,110,100,47,111,114, +32,115,101,108,108,32,99,111,112,105,101,115,13,10,45,45,32,111,102,32, +116,104,101,32,83,111,102,116,119,97,114,101,44,32,97,110,100,32,116,111, +32,112,101,114,109,105,116,32,112,101,114,115,111,110,115,32,116,111,32,119, +104,111,109,32,116,104,101,32,83,111,102,116,119,97,114,101,32,105,115,32, +102,117,114,110,105,115,104,101,100,32,116,111,32,100,111,13,10,45,45,32, +115,111,44,32,115,117,98,106,101,99,116,32,116,111,32,116,104,101,32,102, +111,108,108,111,119,105,110,103,32,99,111,110,100,105,116,105,111,110,115,58, +13,10,45,45,13,10,45,45,32,84,104,101,32,97,98,111,118,101,32,99, +111,112,121,114,105,103,104,116,32,110,111,116,105,99,101,32,97,110,100,32, +116,104,105,115,32,112,101,114,109,105,115,115,105,111,110,32,110,111,116,105, +99,101,32,115,104,97,108,108,32,98,101,32,105,110,99,108,117,100,101,100, +32,105,110,32,97,108,108,13,10,45,45,32,99,111,112,105,101,115,32,111, +114,32,115,117,98,115,116,97,110,116,105,97,108,32,112,111,114,116,105,111, +110,115,32,111,102,32,116,104,101,32,83,111,102,116,119,97,114,101,46,13, +10,45,45,13,10,45,45,32,84,72,69,32,83,79,70,84,87,65,82,69, +32,73,83,32,80,82,79,86,73,68,69,68,32,34,65,83,32,73,83,34, +44,32,87,73,84,72,79,85,84,32,87,65,82,82,65,78,84,89,32,79, +70,32,65,78,89,32,75,73,78,68,44,32,69,88,80,82,69,83,83,32, +79,82,13,10,45,45,32,73,77,80,76,73,69,68,44,32,73,78,67,76, +85,68,73,78,71,32,66,85,84,32,78,79,84,32,76,73,77,73,84,69, +68,32,84,79,32,84,72,69,32,87,65,82,82,65,78,84,73,69,83,32, +79,70,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,44,13, +10,45,45,32,70,73,84,78,69,83,83,32,70,79,82,32,65,32,80,65, +82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,32,65,78,68, +32,78,79,78,73,78,70,82,73,78,71,69,77,69,78,84,46,32,73,78, +32,78,79,32,69,86,69,78,84,32,83,72,65,76,76,32,84,72,69,13, +10,45,45,32,65,85,84,72,79,82,83,32,79,82,32,67,79,80,89,82, +73,71,72,84,32,72,79,76,68,69,82,83,32,66,69,32,76,73,65,66, +76,69,32,70,79,82,32,65,78,89,32,67,76,65,73,77,44,32,68,65, +77,65,71,69,83,32,79,82,32,79,84,72,69,82,13,10,45,45,32,76, +73,65,66,73,76,73,84,89,44,32,87,72,69,84,72,69,82,32,73,78, +32,65,78,32,65,67,84,73,79,78,32,79,70,32,67,79,78,84,82,65, +67,84,44,32,84,79,82,84,32,79,82,32,79,84,72,69,82,87,73,83, +69,44,32,65,82,73,83,73,78,71,32,70,82,79,77,44,13,10,45,45, +32,79,85,84,32,79,70,32,79,82,32,73,78,32,67,79,78,78,69,67, +84,73,79,78,32,87,73,84,72,32,84,72,69,32,83,79,70,84,87,65, +82,69,32,79,82,32,84,72,69,32,85,83,69,32,79,82,32,79,84,72, +69,82,32,68,69,65,76,73,78,71,83,32,73,78,32,84,72,69,13,10, +45,45,32,83,79,70,84,87,65,82,69,46,13,10,45,45,13,10,13,10, +108,111,99,97,108,32,106,115,111,110,32,61,32,123,32,95,118,101,114,115, +105,111,110,32,61,32,34,48,46,49,46,49,34,32,125,13,10,13,10,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10, +45,45,32,69,110,99,111,100,101,13,10,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,13,10,13,10,108,111,99,97,108,32, +101,110,99,111,100,101,13,10,13,10,108,111,99,97,108,32,101,115,99,97, +112,101,95,99,104,97,114,95,109,97,112,32,61,32,123,13,10,32,32,32, +32,91,32,34,92,92,34,32,93,32,61,32,34,92,92,92,92,34,44,13, +10,32,32,32,32,91,32,34,92,34,34,32,93,32,61,32,34,92,92,92, +34,34,44,13,10,32,32,32,32,91,32,34,92,98,34,32,93,32,61,32, +34,92,92,98,34,44,13,10,32,32,32,32,91,32,34,92,102,34,32,93, +32,61,32,34,92,92,102,34,44,13,10,32,32,32,32,91,32,34,92,110, +34,32,93,32,61,32,34,92,92,110,34,44,13,10,32,32,32,32,91,32, +34,92,114,34,32,93,32,61,32,34,92,92,114,34,44,13,10,32,32,32, +32,91,32,34,92,116,34,32,93,32,61,32,34,92,92,116,34,44,13,10, +125,13,10,13,10,108,111,99,97,108,32,101,115,99,97,112,101,95,99,104, +97,114,95,109,97,112,95,105,110,118,32,61,32,123,32,91,32,34,92,92, +47,34,32,93,32,61,32,34,47,34,32,125,13,10,102,111,114,32,107,44, +32,118,32,105,110,32,112,97,105,114,115,40,101,115,99,97,112,101,95,99, +104,97,114,95,109,97,112,41,32,100,111,13,10,32,32,32,32,101,115,99, +97,112,101,95,99,104,97,114,95,109,97,112,95,105,110,118,91,118,93,32, +61,32,107,13,10,101,110,100,13,10,13,10,13,10,108,111,99,97,108,32, +102,117,110,99,116,105,111,110,32,101,115,99,97,112,101,95,99,104,97,114, +40,99,41,13,10,32,32,32,32,114,101,116,117,114,110,32,101,115,99,97, +112,101,95,99,104,97,114,95,109,97,112,91,99,93,32,111,114,32,115,116, +114,105,110,103,46,102,111,114,109,97,116,40,34,92,92,117,37,48,52,120, +34,44,32,99,58,98,121,116,101,40,41,41,13,10,101,110,100,13,10,13, +10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,101,110, +99,111,100,101,95,110,105,108,40,118,97,108,41,13,10,32,32,32,32,114, +101,116,117,114,110,32,34,110,117,108,108,34,13,10,101,110,100,13,10,13, +10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,101,110, +99,111,100,101,95,116,97,98,108,101,40,118,97,108,44,32,115,116,97,99, +107,41,13,10,32,32,32,32,108,111,99,97,108,32,114,101,115,32,61,32, +123,125,13,10,32,32,32,32,115,116,97,99,107,32,61,32,115,116,97,99, +107,32,111,114,32,123,125,13,10,13,10,32,32,32,32,45,45,32,67,105, +114,99,117,108,97,114,32,114,101,102,101,114,101,110,99,101,63,13,10,32, +32,32,32,105,102,32,115,116,97,99,107,91,118,97,108,93,32,116,104,101, +110,32,101,114,114,111,114,40,34,99,105,114,99,117,108,97,114,32,114,101, +102,101,114,101,110,99,101,34,41,32,101,110,100,13,10,13,10,32,32,32, +32,115,116,97,99,107,91,118,97,108,93,32,61,32,116,114,117,101,13,10, +13,10,32,32,32,32,105,102,32,118,97,108,91,49,93,32,126,61,32,110, +105,108,32,111,114,32,110,101,120,116,40,118,97,108,41,32,61,61,32,110, +105,108,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,45,45,32, +84,114,101,97,116,32,97,115,32,97,114,114,97,121,32,45,45,32,99,104, +101,99,107,32,107,101,121,115,32,97,114,101,32,118,97,108,105,100,32,97, +110,100,32,105,116,32,105,115,32,110,111,116,32,115,112,97,114,115,101,13, +10,32,32,32,32,32,32,32,32,108,111,99,97,108,32,110,32,61,32,48, +13,10,32,32,32,32,32,32,32,32,102,111,114,32,107,32,105,110,32,112, +97,105,114,115,40,118,97,108,41,32,100,111,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,105,102,32,116,121,112,101,40,107,41,32,126,61,32, +34,110,117,109,98,101,114,34,32,116,104,101,110,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,101,114,114,111,114,40,34,105,110, +118,97,108,105,100,32,116,97,98,108,101,58,32,109,105,120,101,100,32,111, +114,32,105,110,118,97,108,105,100,32,107,101,121,32,116,121,112,101,115,34, +41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,110,32,61,32,110,32,43,32, +49,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,105,102,32,110,32,126,61,32,35,118,97,108,32,116,104,101, +110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,114,114,111,114, +40,34,105,110,118,97,108,105,100,32,116,97,98,108,101,58,32,115,112,97, +114,115,101,32,97,114,114,97,121,34,41,13,10,32,32,32,32,32,32,32, +32,101,110,100,13,10,32,32,32,32,32,32,32,32,45,45,32,69,110,99, +111,100,101,13,10,32,32,32,32,32,32,32,32,102,111,114,32,105,44,32, +118,32,105,110,32,105,112,97,105,114,115,40,118,97,108,41,32,100,111,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105, +110,115,101,114,116,40,114,101,115,44,32,101,110,99,111,100,101,40,118,44, +32,115,116,97,99,107,41,41,13,10,32,32,32,32,32,32,32,32,101,110, +100,13,10,32,32,32,32,32,32,32,32,115,116,97,99,107,91,118,97,108, +93,32,61,32,110,105,108,13,10,32,32,32,32,32,32,32,32,114,101,116, +117,114,110,32,34,91,34,32,46,46,32,116,97,98,108,101,46,99,111,110, +99,97,116,40,114,101,115,44,32,34,44,34,41,32,46,46,32,34,93,34, +13,10,13,10,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32, +32,32,45,45,32,84,114,101,97,116,32,97,115,32,97,110,32,111,98,106, +101,99,116,13,10,32,32,32,32,32,32,32,32,102,111,114,32,107,44,32, +118,32,105,110,32,112,97,105,114,115,40,118,97,108,41,32,100,111,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,116,121,112,101,40, +107,41,32,126,61,32,34,115,116,114,105,110,103,34,32,116,104,101,110,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,114,114, +111,114,40,34,105,110,118,97,108,105,100,32,116,97,98,108,101,58,32,109, +105,120,101,100,32,111,114,32,105,110,118,97,108,105,100,32,107,101,121,32, +116,121,112,101,115,34,41,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,101,110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97, +98,108,101,46,105,110,115,101,114,116,40,114,101,115,44,32,101,110,99,111, +100,101,40,107,44,32,115,116,97,99,107,41,32,46,46,32,34,58,34,32, +46,46,32,101,110,99,111,100,101,40,118,44,32,115,116,97,99,107,41,41, +13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32, +32,32,32,115,116,97,99,107,91,118,97,108,93,32,61,32,110,105,108,13, +10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,123,34,32, +46,46,32,116,97,98,108,101,46,99,111,110,99,97,116,40,114,101,115,44, +32,34,44,34,41,32,46,46,32,34,125,34,13,10,32,32,32,32,101,110, +100,13,10,101,110,100,13,10,13,10,13,10,108,111,99,97,108,32,102,117, +110,99,116,105,111,110,32,101,110,99,111,100,101,95,115,116,114,105,110,103, +40,118,97,108,41,13,10,32,32,32,32,114,101,116,117,114,110,32,39,34, +39,32,46,46,32,118,97,108,58,103,115,117,98,40,39,91,37,122,92,49, +45,92,51,49,92,92,34,93,39,44,32,101,115,99,97,112,101,95,99,104, +97,114,41,32,46,46,32,39,34,39,13,10,101,110,100,13,10,13,10,13, +10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,101,110,99,111, +100,101,95,110,117,109,98,101,114,40,118,97,108,41,13,10,32,32,32,32, +45,45,32,67,104,101,99,107,32,102,111,114,32,78,97,78,44,32,45,105, +110,102,32,97,110,100,32,105,110,102,13,10,32,32,32,32,105,102,32,118, +97,108,32,126,61,32,118,97,108,32,111,114,32,118,97,108,32,60,61,32, +45,109,97,116,104,46,104,117,103,101,32,111,114,32,118,97,108,32,62,61, +32,109,97,116,104,46,104,117,103,101,32,116,104,101,110,13,10,32,32,32, +32,32,32,32,32,101,114,114,111,114,40,34,117,110,101,120,112,101,99,116, +101,100,32,110,117,109,98,101,114,32,118,97,108,117,101,32,39,34,32,46, +46,32,116,111,115,116,114,105,110,103,40,118,97,108,41,32,46,46,32,34, +39,34,41,13,10,32,32,32,32,101,110,100,13,10,32,32,32,32,114,101, +116,117,114,110,32,115,116,114,105,110,103,46,102,111,114,109,97,116,40,34, +37,46,49,52,103,34,44,32,118,97,108,41,13,10,101,110,100,13,10,13, +10,13,10,108,111,99,97,108,32,116,121,112,101,95,102,117,110,99,95,109, +97,112,32,61,32,123,13,10,32,32,32,32,91,32,34,110,105,108,34,32, +32,32,32,32,32,32,32,32,93,32,61,32,101,110,99,111,100,101,95,110, +105,108,44,13,10,32,32,32,32,91,32,34,116,97,98,108,101,34,32,32, +32,32,32,93,32,61,32,101,110,99,111,100,101,95,116,97,98,108,101,44, +13,10,32,32,32,32,91,32,34,115,116,114,105,110,103,34,32,32,32,32, +93,32,61,32,101,110,99,111,100,101,95,115,116,114,105,110,103,44,13,10, +32,32,32,32,91,32,34,110,117,109,98,101,114,34,32,32,32,32,93,32, +61,32,101,110,99,111,100,101,95,110,117,109,98,101,114,44,13,10,32,32, +32,32,91,32,34,98,111,111,108,101,97,110,34,32,93,32,61,32,116,111, +115,116,114,105,110,103,44,13,10,125,13,10,13,10,13,10,101,110,99,111, +100,101,32,61,32,102,117,110,99,116,105,111,110,40,118,97,108,44,32,115, +116,97,99,107,41,13,10,32,32,32,32,108,111,99,97,108,32,116,32,61, +32,116,121,112,101,40,118,97,108,41,13,10,32,32,32,32,108,111,99,97, +108,32,102,32,61,32,116,121,112,101,95,102,117,110,99,95,109,97,112,91, +116,93,13,10,32,32,32,32,105,102,32,102,32,116,104,101,110,13,10,32, +32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,40,118,97,108,44, +32,115,116,97,99,107,41,13,10,32,32,32,32,101,110,100,13,10,32,32, +32,32,101,114,114,111,114,40,34,117,110,101,120,112,101,99,116,101,100,32, +116,121,112,101,32,39,34,32,46,46,32,116,32,46,46,32,34,39,34,41, +13,10,101,110,100,13,10,13,10,13,10,102,117,110,99,116,105,111,110,32, +106,115,111,110,46,101,110,99,111,100,101,40,118,97,108,41,13,10,32,32, +32,32,114,101,116,117,114,110,32,40,32,101,110,99,111,100,101,40,118,97, +108,41,32,41,13,10,101,110,100,13,10,13,10,13,10,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,68, +101,99,111,100,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,13,10,13,10,108,111,99,97,108,32,112,97,114,115, +101,13,10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32, +99,114,101,97,116,101,95,115,101,116,40,46,46,46,41,13,10,32,32,32, +32,108,111,99,97,108,32,114,101,115,32,61,32,123,125,13,10,32,32,32, +32,102,111,114,32,105,32,61,32,49,44,32,115,101,108,101,99,116,40,34, +35,34,44,32,46,46,46,41,32,100,111,13,10,32,32,32,32,32,32,32, +32,114,101,115,91,32,115,101,108,101,99,116,40,105,44,32,46,46,46,41, +32,93,32,61,32,116,114,117,101,13,10,32,32,32,32,101,110,100,13,10, +32,32,32,32,114,101,116,117,114,110,32,114,101,115,13,10,101,110,100,13, +10,13,10,108,111,99,97,108,32,115,112,97,99,101,95,99,104,97,114,115, +32,32,32,32,32,61,32,99,114,101,97,116,101,95,115,101,116,40,34,32, +34,44,32,34,92,116,34,44,32,34,92,114,34,44,32,34,92,110,34,41, +13,10,108,111,99,97,108,32,100,101,108,105,109,95,99,104,97,114,115,32, +32,32,32,32,61,32,99,114,101,97,116,101,95,115,101,116,40,34,32,34, +44,32,34,92,116,34,44,32,34,92,114,34,44,32,34,92,110,34,44,32, +34,93,34,44,32,34,125,34,44,32,34,44,34,41,13,10,108,111,99,97, +108,32,101,115,99,97,112,101,95,99,104,97,114,115,32,32,32,32,61,32, +99,114,101,97,116,101,95,115,101,116,40,34,92,92,34,44,32,34,47,34, +44,32,39,34,39,44,32,34,98,34,44,32,34,102,34,44,32,34,110,34, +44,32,34,114,34,44,32,34,116,34,44,32,34,117,34,41,13,10,108,111, +99,97,108,32,108,105,116,101,114,97,108,115,32,32,32,32,32,32,32,32, +32,32,32,32,61,32,99,114,101,97,116,101,95,115,101,116,40,34,116,114, +117,101,34,44,32,34,102,97,108,115,101,34,44,32,34,110,117,108,108,34, +41,13,10,13,10,108,111,99,97,108,32,108,105,116,101,114,97,108,95,109, +97,112,32,61,32,123,13,10,32,32,32,32,91,32,34,116,114,117,101,34, +32,32,32,32,93,32,61,32,116,114,117,101,44,13,10,32,32,32,32,91, +32,34,102,97,108,115,101,34,32,93,32,61,32,102,97,108,115,101,44,13, +10,32,32,32,32,91,32,34,110,117,108,108,34,32,32,32,32,93,32,61, +32,110,105,108,44,13,10,125,13,10,13,10,13,10,108,111,99,97,108,32, +102,117,110,99,116,105,111,110,32,110,101,120,116,95,99,104,97,114,40,115, +116,114,44,32,105,100,120,44,32,115,101,116,44,32,110,101,103,97,116,101, +41,13,10,32,32,32,32,102,111,114,32,105,32,61,32,105,100,120,44,32, +35,115,116,114,32,100,111,13,10,32,32,32,32,32,32,32,32,105,102,32, +115,101,116,91,115,116,114,58,115,117,98,40,105,44,32,105,41,93,32,126, +61,32,110,101,103,97,116,101,32,116,104,101,110,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,114,101,116,117,114,110,32,105,13,10,32,32,32, +32,32,32,32,32,101,110,100,13,10,32,32,32,32,101,110,100,13,10,32, +32,32,32,114,101,116,117,114,110,32,35,115,116,114,32,43,32,49,13,10, +101,110,100,13,10,13,10,13,10,108,111,99,97,108,32,102,117,110,99,116, +105,111,110,32,100,101,99,111,100,101,95,101,114,114,111,114,40,115,116,114, +44,32,105,100,120,44,32,109,115,103,41,13,10,32,32,32,32,108,111,99, +97,108,32,108,105,110,101,95,99,111,117,110,116,32,61,32,49,13,10,32, +32,32,32,108,111,99,97,108,32,99,111,108,95,99,111,117,110,116,32,61, +32,49,13,10,32,32,32,32,102,111,114,32,105,32,61,32,49,44,32,105, +100,120,32,45,32,49,32,100,111,13,10,32,32,32,32,32,32,32,32,99, +111,108,95,99,111,117,110,116,32,61,32,99,111,108,95,99,111,117,110,116, +32,43,32,49,13,10,32,32,32,32,32,32,32,32,105,102,32,115,116,114, +58,115,117,98,40,105,44,32,105,41,32,61,61,32,34,92,110,34,32,116, +104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,108,105,110, +101,95,99,111,117,110,116,32,61,32,108,105,110,101,95,99,111,117,110,116, +32,43,32,49,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111, +108,95,99,111,117,110,116,32,61,32,49,13,10,32,32,32,32,32,32,32, +32,101,110,100,13,10,32,32,32,32,101,110,100,13,10,32,32,32,32,101, +114,114,111,114,40,32,115,116,114,105,110,103,46,102,111,114,109,97,116,40, +34,37,115,32,97,116,32,108,105,110,101,32,37,100,32,99,111,108,32,37, +100,34,44,32,109,115,103,44,32,108,105,110,101,95,99,111,117,110,116,44, +32,99,111,108,95,99,111,117,110,116,41,32,41,13,10,101,110,100,13,10, +13,10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,99, +111,100,101,112,111,105,110,116,95,116,111,95,117,116,102,56,40,110,41,13, +10,32,32,32,32,45,45,32,104,116,116,112,58,47,47,115,99,114,105,112, +116,115,46,115,105,108,46,111,114,103,47,99,109,115,47,115,99,114,105,112, +116,115,47,112,97,103,101,46,112,104,112,63,115,105,116,101,95,105,100,61, +110,114,115,105,38,105,100,61,105,119,115,45,97,112,112,101,110,100,105,120, +97,13,10,32,32,32,32,108,111,99,97,108,32,102,32,61,32,109,97,116, +104,46,102,108,111,111,114,13,10,32,32,32,32,105,102,32,110,32,60,61, +32,48,120,55,102,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32, +114,101,116,117,114,110,32,115,116,114,105,110,103,46,99,104,97,114,40,110, +41,13,10,32,32,32,32,101,108,115,101,105,102,32,110,32,60,61,32,48, +120,55,102,102,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,114, +101,116,117,114,110,32,115,116,114,105,110,103,46,99,104,97,114,40,102,40, +110,32,47,32,54,52,41,32,43,32,49,57,50,44,32,110,32,37,32,54, +52,32,43,32,49,50,56,41,13,10,32,32,32,32,101,108,115,101,105,102, +32,110,32,60,61,32,48,120,102,102,102,102,32,116,104,101,110,13,10,32, +32,32,32,32,32,32,32,114,101,116,117,114,110,32,115,116,114,105,110,103, +46,99,104,97,114,40,102,40,110,32,47,32,52,48,57,54,41,32,43,32, +50,50,52,44,32,102,40,110,32,37,32,52,48,57,54,32,47,32,54,52, +41,32,43,32,49,50,56,44,32,110,32,37,32,54,52,32,43,32,49,50, +56,41,13,10,32,32,32,32,101,108,115,101,105,102,32,110,32,60,61,32, +48,120,49,48,102,102,102,102,32,116,104,101,110,13,10,32,32,32,32,32, +32,32,32,114,101,116,117,114,110,32,115,116,114,105,110,103,46,99,104,97, +114,40,102,40,110,32,47,32,50,54,50,49,52,52,41,32,43,32,50,52, +48,44,32,102,40,110,32,37,32,50,54,50,49,52,52,32,47,32,52,48, +57,54,41,32,43,32,49,50,56,44,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,40,110, +32,37,32,52,48,57,54,32,47,32,54,52,41,32,43,32,49,50,56,44, +32,110,32,37,32,54,52,32,43,32,49,50,56,41,13,10,32,32,32,32, +101,110,100,13,10,32,32,32,32,101,114,114,111,114,40,32,115,116,114,105, +110,103,46,102,111,114,109,97,116,40,34,105,110,118,97,108,105,100,32,117, +110,105,99,111,100,101,32,99,111,100,101,112,111,105,110,116,32,39,37,120, +39,34,44,32,110,41,32,41,13,10,101,110,100,13,10,13,10,13,10,108, +111,99,97,108,32,102,117,110,99,116,105,111,110,32,112,97,114,115,101,95, +117,110,105,99,111,100,101,95,101,115,99,97,112,101,40,115,41,13,10,32, +32,32,32,108,111,99,97,108,32,110,49,32,61,32,116,111,110,117,109,98, +101,114,40,32,115,58,115,117,98,40,51,44,32,54,41,44,32,32,32,32, +49,54,32,41,13,10,32,32,32,32,108,111,99,97,108,32,110,50,32,61, +32,116,111,110,117,109,98,101,114,40,32,115,58,115,117,98,40,57,44,32, +49,50,41,44,32,49,54,32,41,13,10,32,32,32,32,45,45,32,83,117, +114,114,111,103,97,116,101,32,112,97,105,114,63,13,10,32,32,32,32,105, +102,32,110,50,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,114, +101,116,117,114,110,32,99,111,100,101,112,111,105,110,116,95,116,111,95,117, +116,102,56,40,40,110,49,32,45,32,48,120,100,56,48,48,41,32,42,32, +48,120,52,48,48,32,43,32,40,110,50,32,45,32,48,120,100,99,48,48, +41,32,43,32,48,120,49,48,48,48,48,41,13,10,32,32,32,32,101,108, +115,101,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99, +111,100,101,112,111,105,110,116,95,116,111,95,117,116,102,56,40,110,49,41, +13,10,32,32,32,32,101,110,100,13,10,101,110,100,13,10,13,10,13,10, +108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,112,97,114,115,101, +95,115,116,114,105,110,103,40,115,116,114,44,32,105,41,13,10,32,32,32, +32,108,111,99,97,108,32,104,97,115,95,117,110,105,99,111,100,101,95,101, +115,99,97,112,101,32,61,32,102,97,108,115,101,13,10,32,32,32,32,108, +111,99,97,108,32,104,97,115,95,115,117,114,114,111,103,97,116,101,95,101, +115,99,97,112,101,32,61,32,102,97,108,115,101,13,10,32,32,32,32,108, +111,99,97,108,32,104,97,115,95,101,115,99,97,112,101,32,61,32,102,97, +108,115,101,13,10,32,32,32,32,108,111,99,97,108,32,108,97,115,116,13, +10,32,32,32,32,102,111,114,32,106,32,61,32,105,32,43,32,49,44,32, +35,115,116,114,32,100,111,13,10,32,32,32,32,32,32,32,32,108,111,99, +97,108,32,120,32,61,32,115,116,114,58,98,121,116,101,40,106,41,13,10, +13,10,32,32,32,32,32,32,32,32,105,102,32,120,32,60,32,51,50,32, +116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101, +99,111,100,101,95,101,114,114,111,114,40,115,116,114,44,32,106,44,32,34, +99,111,110,116,114,111,108,32,99,104,97,114,97,99,116,101,114,32,105,110, +32,115,116,114,105,110,103,34,41,13,10,32,32,32,32,32,32,32,32,101, +110,100,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,108,97,115, +116,32,61,61,32,57,50,32,116,104,101,110,32,45,45,32,34,92,92,34, +32,40,101,115,99,97,112,101,32,99,104,97,114,41,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,105,102,32,120,32,61,61,32,49,49,55,32, +116,104,101,110,32,45,45,32,34,117,34,32,40,117,110,105,99,111,100,101, +32,101,115,99,97,112,101,32,115,101,113,117,101,110,99,101,41,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,108,111,99,97,108, +32,104,101,120,32,61,32,115,116,114,58,115,117,98,40,106,32,43,32,49, +44,32,106,32,43,32,53,41,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,105,102,32,110,111,116,32,104,101,120,58,102,105,110, +100,40,34,37,120,37,120,37,120,37,120,34,41,32,116,104,101,110,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +100,101,99,111,100,101,95,101,114,114,111,114,40,115,116,114,44,32,106,44, +32,34,105,110,118,97,108,105,100,32,117,110,105,99,111,100,101,32,101,115, +99,97,112,101,32,105,110,32,115,116,114,105,110,103,34,41,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,104,101, +120,58,102,105,110,100,40,34,94,91,100,68,93,91,56,57,97,65,98,66, +93,34,41,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,104,97,115,95,115,117,114,114,111,103, +97,116,101,95,101,115,99,97,112,101,32,61,32,116,114,117,101,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,104,97,115,95,117,110,105,99,111,100,101,95,101,115,99,97,112,101,32, +61,32,116,114,117,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,108,111,99,97,108,32,99,32,61,32,115,116,114,105,110,103,46, +99,104,97,114,40,120,41,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,105,102,32,110,111,116,32,101,115,99,97,112,101,95,99, +104,97,114,115,91,99,93,32,116,104,101,110,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,99,111,100,101, +95,101,114,114,111,114,40,115,116,114,44,32,106,44,32,34,105,110,118,97, +108,105,100,32,101,115,99,97,112,101,32,99,104,97,114,32,39,34,32,46, +46,32,99,32,46,46,32,34,39,32,105,110,32,115,116,114,105,110,103,34, +41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101, +110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +104,97,115,95,101,115,99,97,112,101,32,61,32,116,114,117,101,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,108,97,115,116,32,61,32,110,105,108,13,10, +13,10,32,32,32,32,32,32,32,32,101,108,115,101,105,102,32,120,32,61, +61,32,51,52,32,116,104,101,110,32,45,45,32,39,34,39,32,40,101,110, +100,32,111,102,32,115,116,114,105,110,103,41,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,108,111,99,97,108,32,115,32,61,32,115,116,114,58, +115,117,98,40,105,32,43,32,49,44,32,106,32,45,32,49,41,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,105,102,32,104,97,115,95,115,117, +114,114,111,103,97,116,101,95,101,115,99,97,112,101,32,116,104,101,110,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,32,61, +32,115,58,103,115,117,98,40,34,92,92,117,91,100,68,93,91,56,57,97, +65,98,66,93,46,46,92,92,117,46,46,46,46,34,44,32,112,97,114,115, +101,95,117,110,105,99,111,100,101,95,101,115,99,97,112,101,41,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,105,102,32,104,97,115,95,117,110,105,99,111, +100,101,95,101,115,99,97,112,101,32,116,104,101,110,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,115,32,61,32,115,58,103,115, +117,98,40,34,92,92,117,46,46,46,46,34,44,32,112,97,114,115,101,95, +117,110,105,99,111,100,101,95,101,115,99,97,112,101,41,13,10,32,32,32, +32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,105,102,32,104,97,115,95,101,115,99,97,112,101,32, +116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,115,32,61,32,115,58,103,115,117,98,40,34,92,92,46,34,44,32, +101,115,99,97,112,101,95,99,104,97,114,95,109,97,112,95,105,110,118,41, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,115,44, +32,106,32,43,32,49,13,10,13,10,32,32,32,32,32,32,32,32,101,108, +115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,108,97,115,116, +32,61,32,120,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,101,110,100,13,10,32,32,32,32,100,101,99,111,100,101,95,101, +114,114,111,114,40,115,116,114,44,32,105,44,32,34,101,120,112,101,99,116, +101,100,32,99,108,111,115,105,110,103,32,113,117,111,116,101,32,102,111,114, +32,115,116,114,105,110,103,34,41,13,10,101,110,100,13,10,13,10,13,10, +108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,112,97,114,115,101, +95,110,117,109,98,101,114,40,115,116,114,44,32,105,41,13,10,32,32,32, +32,108,111,99,97,108,32,120,32,61,32,110,101,120,116,95,99,104,97,114, +40,115,116,114,44,32,105,44,32,100,101,108,105,109,95,99,104,97,114,115, +41,13,10,32,32,32,32,108,111,99,97,108,32,115,32,61,32,115,116,114, +58,115,117,98,40,105,44,32,120,32,45,32,49,41,13,10,32,32,32,32, +108,111,99,97,108,32,110,32,61,32,116,111,110,117,109,98,101,114,40,115, +41,13,10,32,32,32,32,105,102,32,110,111,116,32,110,32,116,104,101,110, +13,10,32,32,32,32,32,32,32,32,100,101,99,111,100,101,95,101,114,114, +111,114,40,115,116,114,44,32,105,44,32,34,105,110,118,97,108,105,100,32, +110,117,109,98,101,114,32,39,34,32,46,46,32,115,32,46,46,32,34,39, +34,41,13,10,32,32,32,32,101,110,100,13,10,32,32,32,32,114,101,116, +117,114,110,32,110,44,32,120,13,10,101,110,100,13,10,13,10,13,10,108, +111,99,97,108,32,102,117,110,99,116,105,111,110,32,112,97,114,115,101,95, +108,105,116,101,114,97,108,40,115,116,114,44,32,105,41,13,10,32,32,32, +32,108,111,99,97,108,32,120,32,61,32,110,101,120,116,95,99,104,97,114, +40,115,116,114,44,32,105,44,32,100,101,108,105,109,95,99,104,97,114,115, +41,13,10,32,32,32,32,108,111,99,97,108,32,119,111,114,100,32,61,32, +115,116,114,58,115,117,98,40,105,44,32,120,32,45,32,49,41,13,10,32, +32,32,32,105,102,32,110,111,116,32,108,105,116,101,114,97,108,115,91,119, +111,114,100,93,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,100, +101,99,111,100,101,95,101,114,114,111,114,40,115,116,114,44,32,105,44,32, +34,105,110,118,97,108,105,100,32,108,105,116,101,114,97,108,32,39,34,32, +46,46,32,119,111,114,100,32,46,46,32,34,39,34,41,13,10,32,32,32, +32,101,110,100,13,10,32,32,32,32,114,101,116,117,114,110,32,108,105,116, +101,114,97,108,95,109,97,112,91,119,111,114,100,93,44,32,120,13,10,101, +110,100,13,10,13,10,13,10,108,111,99,97,108,32,102,117,110,99,116,105, +111,110,32,112,97,114,115,101,95,97,114,114,97,121,40,115,116,114,44,32, +105,41,13,10,32,32,32,32,108,111,99,97,108,32,114,101,115,32,61,32, +123,125,13,10,32,32,32,32,108,111,99,97,108,32,110,32,61,32,49,13, +10,32,32,32,32,105,32,61,32,105,32,43,32,49,13,10,32,32,32,32, +119,104,105,108,101,32,49,32,100,111,13,10,32,32,32,32,32,32,32,32, +108,111,99,97,108,32,120,13,10,32,32,32,32,32,32,32,32,105,32,61, +32,110,101,120,116,95,99,104,97,114,40,115,116,114,44,32,105,44,32,115, +112,97,99,101,95,99,104,97,114,115,44,32,116,114,117,101,41,13,10,32, +32,32,32,32,32,32,32,45,45,32,69,109,112,116,121,32,47,32,101,110, +100,32,111,102,32,97,114,114,97,121,63,13,10,32,32,32,32,32,32,32, +32,105,102,32,115,116,114,58,115,117,98,40,105,44,32,105,41,32,61,61, +32,34,93,34,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32, +32,32,32,105,32,61,32,105,32,43,32,49,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,98,114,101,97,107,13,10,32,32,32,32,32,32,32, +32,101,110,100,13,10,32,32,32,32,32,32,32,32,45,45,32,82,101,97, +100,32,116,111,107,101,110,13,10,32,32,32,32,32,32,32,32,120,44,32, +105,32,61,32,112,97,114,115,101,40,115,116,114,44,32,105,41,13,10,32, +32,32,32,32,32,32,32,114,101,115,91,110,93,32,61,32,120,13,10,32, +32,32,32,32,32,32,32,110,32,61,32,110,32,43,32,49,13,10,32,32, +32,32,32,32,32,32,45,45,32,78,101,120,116,32,116,111,107,101,110,13, +10,32,32,32,32,32,32,32,32,105,32,61,32,110,101,120,116,95,99,104, +97,114,40,115,116,114,44,32,105,44,32,115,112,97,99,101,95,99,104,97, +114,115,44,32,116,114,117,101,41,13,10,32,32,32,32,32,32,32,32,108, +111,99,97,108,32,99,104,114,32,61,32,115,116,114,58,115,117,98,40,105, +44,32,105,41,13,10,32,32,32,32,32,32,32,32,105,32,61,32,105,32, +43,32,49,13,10,32,32,32,32,32,32,32,32,105,102,32,99,104,114,32, +61,61,32,34,93,34,32,116,104,101,110,32,98,114,101,97,107,32,101,110, +100,13,10,32,32,32,32,32,32,32,32,105,102,32,99,104,114,32,126,61, +32,34,44,34,32,116,104,101,110,32,100,101,99,111,100,101,95,101,114,114, +111,114,40,115,116,114,44,32,105,44,32,34,101,120,112,101,99,116,101,100, +32,39,93,39,32,111,114,32,39,44,39,34,41,32,101,110,100,13,10,32, +32,32,32,101,110,100,13,10,32,32,32,32,114,101,116,117,114,110,32,114, +101,115,44,32,105,13,10,101,110,100,13,10,13,10,13,10,108,111,99,97, +108,32,102,117,110,99,116,105,111,110,32,112,97,114,115,101,95,111,98,106, +101,99,116,40,115,116,114,44,32,105,41,13,10,32,32,32,32,108,111,99, +97,108,32,114,101,115,32,61,32,123,125,13,10,32,32,32,32,105,32,61, +32,105,32,43,32,49,13,10,32,32,32,32,119,104,105,108,101,32,49,32, +100,111,13,10,32,32,32,32,32,32,32,32,108,111,99,97,108,32,107,101, +121,44,32,118,97,108,13,10,32,32,32,32,32,32,32,32,105,32,61,32, +110,101,120,116,95,99,104,97,114,40,115,116,114,44,32,105,44,32,115,112, +97,99,101,95,99,104,97,114,115,44,32,116,114,117,101,41,13,10,32,32, +32,32,32,32,32,32,45,45,32,69,109,112,116,121,32,47,32,101,110,100, +32,111,102,32,111,98,106,101,99,116,63,13,10,32,32,32,32,32,32,32, +32,105,102,32,115,116,114,58,115,117,98,40,105,44,32,105,41,32,61,61, +32,34,125,34,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32, +32,32,32,105,32,61,32,105,32,43,32,49,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,98,114,101,97,107,13,10,32,32,32,32,32,32,32, +32,101,110,100,13,10,32,32,32,32,32,32,32,32,45,45,32,82,101,97, +100,32,107,101,121,13,10,32,32,32,32,32,32,32,32,105,102,32,115,116, +114,58,115,117,98,40,105,44,32,105,41,32,126,61,32,39,34,39,32,116, +104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,99, +111,100,101,95,101,114,114,111,114,40,115,116,114,44,32,105,44,32,34,101, +120,112,101,99,116,101,100,32,115,116,114,105,110,103,32,102,111,114,32,107, +101,121,34,41,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,107,101,121,44,32,105,32,61,32,112,97,114,115, +101,40,115,116,114,44,32,105,41,13,10,32,32,32,32,32,32,32,32,45, +45,32,82,101,97,100,32,39,58,39,32,100,101,108,105,109,105,116,101,114, +13,10,32,32,32,32,32,32,32,32,105,32,61,32,110,101,120,116,95,99, +104,97,114,40,115,116,114,44,32,105,44,32,115,112,97,99,101,95,99,104, +97,114,115,44,32,116,114,117,101,41,13,10,32,32,32,32,32,32,32,32, +105,102,32,115,116,114,58,115,117,98,40,105,44,32,105,41,32,126,61,32, +34,58,34,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,100,101,99,111,100,101,95,101,114,114,111,114,40,115,116,114,44,32, +105,44,32,34,101,120,112,101,99,116,101,100,32,39,58,39,32,97,102,116, +101,114,32,107,101,121,34,41,13,10,32,32,32,32,32,32,32,32,101,110, +100,13,10,32,32,32,32,32,32,32,32,105,32,61,32,110,101,120,116,95, +99,104,97,114,40,115,116,114,44,32,105,32,43,32,49,44,32,115,112,97, +99,101,95,99,104,97,114,115,44,32,116,114,117,101,41,13,10,32,32,32, +32,32,32,32,32,45,45,32,82,101,97,100,32,118,97,108,117,101,13,10, +32,32,32,32,32,32,32,32,118,97,108,44,32,105,32,61,32,112,97,114, +115,101,40,115,116,114,44,32,105,41,13,10,32,32,32,32,32,32,32,32, +45,45,32,83,101,116,13,10,32,32,32,32,32,32,32,32,114,101,115,91, +107,101,121,93,32,61,32,118,97,108,13,10,32,32,32,32,32,32,32,32, +45,45,32,78,101,120,116,32,116,111,107,101,110,13,10,32,32,32,32,32, +32,32,32,105,32,61,32,110,101,120,116,95,99,104,97,114,40,115,116,114, +44,32,105,44,32,115,112,97,99,101,95,99,104,97,114,115,44,32,116,114, +117,101,41,13,10,32,32,32,32,32,32,32,32,108,111,99,97,108,32,99, +104,114,32,61,32,115,116,114,58,115,117,98,40,105,44,32,105,41,13,10, +32,32,32,32,32,32,32,32,105,32,61,32,105,32,43,32,49,13,10,32, +32,32,32,32,32,32,32,105,102,32,99,104,114,32,61,61,32,34,125,34, +32,116,104,101,110,32,98,114,101,97,107,32,101,110,100,13,10,32,32,32, +32,32,32,32,32,105,102,32,99,104,114,32,126,61,32,34,44,34,32,116, +104,101,110,32,100,101,99,111,100,101,95,101,114,114,111,114,40,115,116,114, +44,32,105,44,32,34,101,120,112,101,99,116,101,100,32,39,125,39,32,111, +114,32,39,44,39,34,41,32,101,110,100,13,10,32,32,32,32,101,110,100, +13,10,32,32,32,32,114,101,116,117,114,110,32,114,101,115,44,32,105,13, +10,101,110,100,13,10,13,10,13,10,108,111,99,97,108,32,99,104,97,114, +95,102,117,110,99,95,109,97,112,32,61,32,123,13,10,32,32,32,32,91, +32,39,34,39,32,93,32,61,32,112,97,114,115,101,95,115,116,114,105,110, +103,44,13,10,32,32,32,32,91,32,34,48,34,32,93,32,61,32,112,97, +114,115,101,95,110,117,109,98,101,114,44,13,10,32,32,32,32,91,32,34, +49,34,32,93,32,61,32,112,97,114,115,101,95,110,117,109,98,101,114,44, +13,10,32,32,32,32,91,32,34,50,34,32,93,32,61,32,112,97,114,115, +101,95,110,117,109,98,101,114,44,13,10,32,32,32,32,91,32,34,51,34, +32,93,32,61,32,112,97,114,115,101,95,110,117,109,98,101,114,44,13,10, +32,32,32,32,91,32,34,52,34,32,93,32,61,32,112,97,114,115,101,95, +110,117,109,98,101,114,44,13,10,32,32,32,32,91,32,34,53,34,32,93, +32,61,32,112,97,114,115,101,95,110,117,109,98,101,114,44,13,10,32,32, +32,32,91,32,34,54,34,32,93,32,61,32,112,97,114,115,101,95,110,117, +109,98,101,114,44,13,10,32,32,32,32,91,32,34,55,34,32,93,32,61, +32,112,97,114,115,101,95,110,117,109,98,101,114,44,13,10,32,32,32,32, +91,32,34,56,34,32,93,32,61,32,112,97,114,115,101,95,110,117,109,98, +101,114,44,13,10,32,32,32,32,91,32,34,57,34,32,93,32,61,32,112, +97,114,115,101,95,110,117,109,98,101,114,44,13,10,32,32,32,32,91,32, +34,45,34,32,93,32,61,32,112,97,114,115,101,95,110,117,109,98,101,114, +44,13,10,32,32,32,32,91,32,34,116,34,32,93,32,61,32,112,97,114, +115,101,95,108,105,116,101,114,97,108,44,13,10,32,32,32,32,91,32,34, +102,34,32,93,32,61,32,112,97,114,115,101,95,108,105,116,101,114,97,108, +44,13,10,32,32,32,32,91,32,34,110,34,32,93,32,61,32,112,97,114, +115,101,95,108,105,116,101,114,97,108,44,13,10,32,32,32,32,91,32,34, +91,34,32,93,32,61,32,112,97,114,115,101,95,97,114,114,97,121,44,13, +10,32,32,32,32,91,32,34,123,34,32,93,32,61,32,112,97,114,115,101, +95,111,98,106,101,99,116,44,13,10,125,13,10,13,10,13,10,112,97,114, +115,101,32,61,32,102,117,110,99,116,105,111,110,40,115,116,114,44,32,105, +100,120,41,13,10,32,32,32,32,108,111,99,97,108,32,99,104,114,32,61, +32,115,116,114,58,115,117,98,40,105,100,120,44,32,105,100,120,41,13,10, +32,32,32,32,108,111,99,97,108,32,102,32,61,32,99,104,97,114,95,102, +117,110,99,95,109,97,112,91,99,104,114,93,13,10,32,32,32,32,105,102, +32,102,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,114,101,116, +117,114,110,32,102,40,115,116,114,44,32,105,100,120,41,13,10,32,32,32, +32,101,110,100,13,10,32,32,32,32,100,101,99,111,100,101,95,101,114,114, +111,114,40,115,116,114,44,32,105,100,120,44,32,34,117,110,101,120,112,101, +99,116,101,100,32,99,104,97,114,97,99,116,101,114,32,39,34,32,46,46, +32,99,104,114,32,46,46,32,34,39,34,41,13,10,101,110,100,13,10,13, +10,13,10,102,117,110,99,116,105,111,110,32,106,115,111,110,46,100,101,99, +111,100,101,40,115,116,114,41,13,10,32,32,32,32,105,102,32,116,121,112, +101,40,115,116,114,41,32,126,61,32,34,115,116,114,105,110,103,34,32,116, +104,101,110,13,10,32,32,32,32,32,32,32,32,101,114,114,111,114,40,34, +101,120,112,101,99,116,101,100,32,97,114,103,117,109,101,110,116,32,111,102, +32,116,121,112,101,32,115,116,114,105,110,103,44,32,103,111,116,32,34,32, +46,46,32,116,121,112,101,40,115,116,114,41,41,13,10,32,32,32,32,101, +110,100,13,10,32,32,32,32,108,111,99,97,108,32,114,101,115,44,32,105, +100,120,32,61,32,112,97,114,115,101,40,115,116,114,44,32,110,101,120,116, +95,99,104,97,114,40,115,116,114,44,32,49,44,32,115,112,97,99,101,95, +99,104,97,114,115,44,32,116,114,117,101,41,41,13,10,32,32,32,32,105, +100,120,32,61,32,110,101,120,116,95,99,104,97,114,40,115,116,114,44,32, +105,100,120,44,32,115,112,97,99,101,95,99,104,97,114,115,44,32,116,114, +117,101,41,13,10,32,32,32,32,105,102,32,105,100,120,32,60,61,32,35, +115,116,114,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,100,101, +99,111,100,101,95,101,114,114,111,114,40,115,116,114,44,32,105,100,120,44, +32,34,116,114,97,105,108,105,110,103,32,103,97,114,98,97,103,101,34,41, +13,10,32,32,32,32,101,110,100,13,10,32,32,32,32,114,101,116,117,114, +110,32,114,101,115,13,10,101,110,100,13,10,13,10,45,45,32,69,120,112, +111,114,116,32,116,111,32,74,105,110,46,13,10,13,10,106,105,110,46,117, +116,105,108,115,46,106,115,111,110,32,61,32,106,115,111,110,13,10 +}; + diff --git a/src/libjin-lua/scripts/utils/xml.lua b/src/libjin-lua/scripts/utils/xml.lua new file mode 100644 index 0000000..2250773 --- /dev/null +++ b/src/libjin-lua/scripts/utils/xml.lua @@ -0,0 +1,175 @@ + +jin.utils = jin.utils or {} +jin.utils.xml = jin.utils.xml or {} + +--------------------------------------------------------------------------------- +--------------------------------------------------------------------------------- +-- https://github.com/Cluain/Lua-Simple-XML-Parser +-- +-- xml.lua - XML parser for use with the Corona SDK. +-- +-- version: 1.2 +-- +-- CHANGELOG: +-- +-- 1.2 - Created new structure for returned table +-- 1.1 - Fixed base directory issue with the loadFile() function. +-- +-- NOTE: This is a modified version of Alexander Makeev's Lua-only XML parser +-- found here: http://lua-users.org/wiki/LuaXml +-- +--------------------------------------------------------------------------------- +--------------------------------------------------------------------------------- +local function newParser() + + XmlParser = {}; + + function XmlParser:ToXmlString(value) + value = string.gsub(value, "&", "&"); -- '&' -> "&" + value = string.gsub(value, "<", "<"); -- '<' -> "<" + value = string.gsub(value, ">", ">"); -- '>' -> ">" + value = string.gsub(value, "\"", """); -- '"' -> """ + value = string.gsub(value, "([^%w%&%;%p%\t% ])", + function(c) + return string.format("&#x%X;", string.byte(c)) + end); + return value; + end + + function XmlParser:FromXmlString(value) + value = string.gsub(value, "&#x([%x]+)%;", + function(h) + return string.char(tonumber(h, 16)) + end); + value = string.gsub(value, "&#([0-9]+)%;", + function(h) + return string.char(tonumber(h, 10)) + end); + value = string.gsub(value, """, "\""); + value = string.gsub(value, "'", "'"); + value = string.gsub(value, ">", ">"); + value = string.gsub(value, "<", "<"); + value = string.gsub(value, "&", "&"); + return value; + end + + function XmlParser:ParseArgs(node, s) + string.gsub(s, "(%w+)=([\"'])(.-)%2", function(w, _, a) + node:addProperty(w, self:FromXmlString(a)) + end) + end + + local function newNode(name) + local node = {} + node.___value = nil + node.___name = name + node.___children = {} + node.___props = {} + + function node:value() return self.___value end + function node:setValue(val) self.___value = val end + function node:name() return self.___name end + function node:setName(name) self.___name = name end + function node:children() return self.___children end + function node:numChildren() return #self.___children end + function node:addChild(child) + if self[child:name()] ~= nil then + if type(self[child:name()].name) == "function" then + local tempTable = {} + table.insert(tempTable, self[child:name()]) + self[child:name()] = tempTable + end + table.insert(self[child:name()], child) + else + self[child:name()] = child + end + table.insert(self.___children, child) + end + + function node:properties() return self.___props end + function node:numProperties() return #self.___props end + function node:addProperty(name, value) + local lName = "@" .. name + if self[lName] ~= nil then + if type(self[lName]) == "string" then + local tempTable = {} + table.insert(tempTable, self[lName]) + self[lName] = tempTable + end + table.insert(self[lName], value) + else + self[lName] = value + end + table.insert(self.___props, { name = name, value = self[name] }) + end + + return node + end + function XmlParser:ParseXmlText(xmlText) + local stack = {} + local top = newNode() + table.insert(stack, top) + local ni, c, label, xarg, empty + local i, j = 1, 1 + while true do + ni, j, c, label, xarg, empty = string.find(xmlText, "<(%/?)([%w_:]+)(.-)(%/?)>", i) + if not ni then break end + local text = string.sub(xmlText, i, ni - 1); + if not string.find(text, "^%s*$") then + local lVal = (top:value() or "") .. self:FromXmlString(text) + stack[#stack]:setValue(lVal) + end + if empty == "/" then -- empty element tag + local lNode = newNode(label) + self:ParseArgs(lNode, xarg) + top:addChild(lNode) + elseif c == "" then -- start tag + local lNode = newNode(label) + self:ParseArgs(lNode, xarg) + table.insert(stack, lNode) + top = lNode + else -- end tag + local toclose = table.remove(stack) -- remove top + + top = stack[#stack] + if #stack < 1 then + error("XmlParser: nothing to close with " .. label) + end + if toclose:name() ~= label then + error("XmlParser: trying to close " .. toclose.name .. " with " .. label) + end + top:addChild(toclose) + end + i = j + 1 + end + local text = string.sub(xmlText, i); + if #stack > 1 then + error("XmlParser: unclosed " .. stack[#stack]:name()) + end + return top + end + + function XmlParser:loadFile(xmlFilename, base) + if not base then + base = system.ResourceDirectory + end + + local path = system.pathForFile(xmlFilename, base) + local hFile, err = io.open(path, "r"); + + if hFile and not err then + local xmlText = hFile:read("*a"); -- read file content + io.close(hFile); + return self:ParseXmlText(xmlText), nil; + else + print(err) + return nil + end + end + + return XmlParser +end + +-- Export to Jin. + +jin.utils.xml.newParser = newParser diff --git a/src/libjin-lua/scripts/utils/xml.lua.h b/src/libjin-lua/scripts/utils/xml.lua.h new file mode 100644 index 0000000..4f17c7a --- /dev/null +++ b/src/libjin-lua/scripts/utils/xml.lua.h @@ -0,0 +1,320 @@ +/*Auto generated, don't modify by hand.*/ +static char xml_lua[] = { +13,10,106,105,110,46,117,116,105,108,115,32,61,32,106,105,110,46,117,116, +105,108,115,32,111,114,32,123,125,13,10,106,105,110,46,117,116,105,108,115, +46,120,109,108,32,61,32,106,105,110,46,117,116,105,108,115,46,120,109,108, +32,111,114,32,123,125,13,10,13,10,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,104, +116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,67,108, +117,97,105,110,47,76,117,97,45,83,105,109,112,108,101,45,88,77,76,45, +80,97,114,115,101,114,13,10,45,45,13,10,45,45,32,120,109,108,46,108, +117,97,32,45,32,88,77,76,32,112,97,114,115,101,114,32,102,111,114,32, +117,115,101,32,119,105,116,104,32,116,104,101,32,67,111,114,111,110,97,32, +83,68,75,46,13,10,45,45,13,10,45,45,32,118,101,114,115,105,111,110, +58,32,49,46,50,13,10,45,45,13,10,45,45,32,67,72,65,78,71,69, +76,79,71,58,13,10,45,45,13,10,45,45,32,49,46,50,32,45,32,67, +114,101,97,116,101,100,32,110,101,119,32,115,116,114,117,99,116,117,114,101, +32,102,111,114,32,114,101,116,117,114,110,101,100,32,116,97,98,108,101,13, +10,45,45,32,49,46,49,32,45,32,70,105,120,101,100,32,98,97,115,101, +32,100,105,114,101,99,116,111,114,121,32,105,115,115,117,101,32,119,105,116, +104,32,116,104,101,32,108,111,97,100,70,105,108,101,40,41,32,102,117,110, +99,116,105,111,110,46,13,10,45,45,13,10,45,45,32,78,79,84,69,58, +32,84,104,105,115,32,105,115,32,97,32,109,111,100,105,102,105,101,100,32, +118,101,114,115,105,111,110,32,111,102,32,65,108,101,120,97,110,100,101,114, +32,77,97,107,101,101,118,39,115,32,76,117,97,45,111,110,108,121,32,88, +77,76,32,112,97,114,115,101,114,13,10,45,45,32,102,111,117,110,100,32, +104,101,114,101,58,32,104,116,116,112,58,47,47,108,117,97,45,117,115,101, +114,115,46,111,114,103,47,119,105,107,105,47,76,117,97,88,109,108,13,10, +45,45,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,13,10,108,111,99,97,108,32,102,117,110,99, +116,105,111,110,32,110,101,119,80,97,114,115,101,114,40,41,13,10,13,10, +32,32,32,32,88,109,108,80,97,114,115,101,114,32,61,32,123,125,59,13, +10,13,10,32,32,32,32,102,117,110,99,116,105,111,110,32,88,109,108,80, +97,114,115,101,114,58,84,111,88,109,108,83,116,114,105,110,103,40,118,97, +108,117,101,41,13,10,32,32,32,32,32,32,32,32,118,97,108,117,101,32, +61,32,115,116,114,105,110,103,46,103,115,117,98,40,118,97,108,117,101,44, +32,34,38,34,44,32,34,38,97,109,112,59,34,41,59,32,45,45,32,39, +38,39,32,45,62,32,34,38,97,109,112,59,34,13,10,32,32,32,32,32, +32,32,32,118,97,108,117,101,32,61,32,115,116,114,105,110,103,46,103,115, +117,98,40,118,97,108,117,101,44,32,34,60,34,44,32,34,38,108,116,59, +34,41,59,32,45,45,32,39,60,39,32,45,62,32,34,38,108,116,59,34, +13,10,32,32,32,32,32,32,32,32,118,97,108,117,101,32,61,32,115,116, +114,105,110,103,46,103,115,117,98,40,118,97,108,117,101,44,32,34,62,34, +44,32,34,38,103,116,59,34,41,59,32,45,45,32,39,62,39,32,45,62, +32,34,38,103,116,59,34,13,10,32,32,32,32,32,32,32,32,118,97,108, +117,101,32,61,32,115,116,114,105,110,103,46,103,115,117,98,40,118,97,108, +117,101,44,32,34,92,34,34,44,32,34,38,113,117,111,116,59,34,41,59, +32,45,45,32,39,34,39,32,45,62,32,34,38,113,117,111,116,59,34,13, +10,32,32,32,32,32,32,32,32,118,97,108,117,101,32,61,32,115,116,114, +105,110,103,46,103,115,117,98,40,118,97,108,117,101,44,32,34,40,91,94, +37,119,37,38,37,59,37,112,37,92,116,37,32,93,41,34,44,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,40, +99,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +114,101,116,117,114,110,32,115,116,114,105,110,103,46,102,111,114,109,97,116, +40,34,38,35,120,37,88,59,34,44,32,115,116,114,105,110,103,46,98,121, +116,101,40,99,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32, +101,110,100,41,59,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114, +110,32,118,97,108,117,101,59,13,10,32,32,32,32,101,110,100,13,10,13, +10,32,32,32,32,102,117,110,99,116,105,111,110,32,88,109,108,80,97,114, +115,101,114,58,70,114,111,109,88,109,108,83,116,114,105,110,103,40,118,97, +108,117,101,41,13,10,32,32,32,32,32,32,32,32,118,97,108,117,101,32, +61,32,115,116,114,105,110,103,46,103,115,117,98,40,118,97,108,117,101,44, +32,34,38,35,120,40,91,37,120,93,43,41,37,59,34,44,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,40,104, +41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114, +101,116,117,114,110,32,115,116,114,105,110,103,46,99,104,97,114,40,116,111, +110,117,109,98,101,114,40,104,44,32,49,54,41,41,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,101,110,100,41,59,13,10,32,32,32,32,32, +32,32,32,118,97,108,117,101,32,61,32,115,116,114,105,110,103,46,103,115, +117,98,40,118,97,108,117,101,44,32,34,38,35,40,91,48,45,57,93,43, +41,37,59,34,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102, +117,110,99,116,105,111,110,40,104,41,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,115,116,114,105,110, +103,46,99,104,97,114,40,116,111,110,117,109,98,101,114,40,104,44,32,49, +48,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100, +41,59,13,10,32,32,32,32,32,32,32,32,118,97,108,117,101,32,61,32, +115,116,114,105,110,103,46,103,115,117,98,40,118,97,108,117,101,44,32,34, +38,113,117,111,116,59,34,44,32,34,92,34,34,41,59,13,10,32,32,32, +32,32,32,32,32,118,97,108,117,101,32,61,32,115,116,114,105,110,103,46, +103,115,117,98,40,118,97,108,117,101,44,32,34,38,97,112,111,115,59,34, +44,32,34,39,34,41,59,13,10,32,32,32,32,32,32,32,32,118,97,108, +117,101,32,61,32,115,116,114,105,110,103,46,103,115,117,98,40,118,97,108, +117,101,44,32,34,38,103,116,59,34,44,32,34,62,34,41,59,13,10,32, +32,32,32,32,32,32,32,118,97,108,117,101,32,61,32,115,116,114,105,110, +103,46,103,115,117,98,40,118,97,108,117,101,44,32,34,38,108,116,59,34, +44,32,34,60,34,41,59,13,10,32,32,32,32,32,32,32,32,118,97,108, +117,101,32,61,32,115,116,114,105,110,103,46,103,115,117,98,40,118,97,108, +117,101,44,32,34,38,97,109,112,59,34,44,32,34,38,34,41,59,13,10, +32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,118,97,108,117,101, +59,13,10,32,32,32,32,101,110,100,13,10,13,10,32,32,32,32,102,117, +110,99,116,105,111,110,32,88,109,108,80,97,114,115,101,114,58,80,97,114, +115,101,65,114,103,115,40,110,111,100,101,44,32,115,41,13,10,32,32,32, +32,32,32,32,32,115,116,114,105,110,103,46,103,115,117,98,40,115,44,32, +34,40,37,119,43,41,61,40,91,92,34,39,93,41,40,46,45,41,37,50, +34,44,32,102,117,110,99,116,105,111,110,40,119,44,32,95,44,32,97,41, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,111,100,101,58,97, +100,100,80,114,111,112,101,114,116,121,40,119,44,32,115,101,108,102,58,70, +114,111,109,88,109,108,83,116,114,105,110,103,40,97,41,41,13,10,32,32, +32,32,32,32,32,32,101,110,100,41,13,10,32,32,32,32,101,110,100,13, +10,32,32,32,32,13,10,32,32,32,32,108,111,99,97,108,32,102,117,110, +99,116,105,111,110,32,110,101,119,78,111,100,101,40,110,97,109,101,41,13, +10,32,32,32,32,32,32,32,32,108,111,99,97,108,32,110,111,100,101,32, +61,32,123,125,13,10,32,32,32,32,32,32,32,32,110,111,100,101,46,95, +95,95,118,97,108,117,101,32,61,32,110,105,108,13,10,32,32,32,32,32, +32,32,32,110,111,100,101,46,95,95,95,110,97,109,101,32,61,32,110,97, +109,101,13,10,32,32,32,32,32,32,32,32,110,111,100,101,46,95,95,95, +99,104,105,108,100,114,101,110,32,61,32,123,125,13,10,32,32,32,32,32, +32,32,32,110,111,100,101,46,95,95,95,112,114,111,112,115,32,61,32,123, +125,13,10,13,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111, +110,32,110,111,100,101,58,118,97,108,117,101,40,41,32,114,101,116,117,114, +110,32,115,101,108,102,46,95,95,95,118,97,108,117,101,32,101,110,100,13, +10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110,111, +100,101,58,115,101,116,86,97,108,117,101,40,118,97,108,41,32,115,101,108, +102,46,95,95,95,118,97,108,117,101,32,61,32,118,97,108,32,101,110,100, +13,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110, +111,100,101,58,110,97,109,101,40,41,32,114,101,116,117,114,110,32,115,101, +108,102,46,95,95,95,110,97,109,101,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,102,117,110,99,116,105,111,110,32,110,111,100,101,58,115,101, +116,78,97,109,101,40,110,97,109,101,41,32,115,101,108,102,46,95,95,95, +110,97,109,101,32,61,32,110,97,109,101,32,101,110,100,13,10,32,32,32, +32,32,32,32,32,102,117,110,99,116,105,111,110,32,110,111,100,101,58,99, +104,105,108,100,114,101,110,40,41,32,114,101,116,117,114,110,32,115,101,108, +102,46,95,95,95,99,104,105,108,100,114,101,110,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110,111,100,101, +58,110,117,109,67,104,105,108,100,114,101,110,40,41,32,114,101,116,117,114, +110,32,35,115,101,108,102,46,95,95,95,99,104,105,108,100,114,101,110,32, +101,110,100,13,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111, +110,32,110,111,100,101,58,97,100,100,67,104,105,108,100,40,99,104,105,108, +100,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,115, +101,108,102,91,99,104,105,108,100,58,110,97,109,101,40,41,93,32,126,61, +32,110,105,108,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,105,102,32,116,121,112,101,40,115,101,108,102,91, +99,104,105,108,100,58,110,97,109,101,40,41,93,46,110,97,109,101,41,32, +61,61,32,34,102,117,110,99,116,105,111,110,34,32,116,104,101,110,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +108,111,99,97,108,32,116,101,109,112,84,97,98,108,101,32,61,32,123,125, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,116,97,98,108,101,46,105,110,115,101,114,116,40,116,101,109,112,84, +97,98,108,101,44,32,115,101,108,102,91,99,104,105,108,100,58,110,97,109, +101,40,41,93,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,115,101,108,102,91,99,104,105,108,100,58,110,97, +109,101,40,41,93,32,61,32,116,101,109,112,84,97,98,108,101,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108, +101,46,105,110,115,101,114,116,40,115,101,108,102,91,99,104,105,108,100,58, +110,97,109,101,40,41,93,44,32,99,104,105,108,100,41,13,10,32,32,32, +32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,115,101,108,102,91,99,104,105,108, +100,58,110,97,109,101,40,41,93,32,61,32,99,104,105,108,100,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110,115,101,114,116, +40,115,101,108,102,46,95,95,95,99,104,105,108,100,114,101,110,44,32,99, +104,105,108,100,41,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10, +13,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110, +111,100,101,58,112,114,111,112,101,114,116,105,101,115,40,41,32,114,101,116, +117,114,110,32,115,101,108,102,46,95,95,95,112,114,111,112,115,32,101,110, +100,13,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32, +110,111,100,101,58,110,117,109,80,114,111,112,101,114,116,105,101,115,40,41, +32,114,101,116,117,114,110,32,35,115,101,108,102,46,95,95,95,112,114,111, +112,115,32,101,110,100,13,10,32,32,32,32,32,32,32,32,102,117,110,99, +116,105,111,110,32,110,111,100,101,58,97,100,100,80,114,111,112,101,114,116, +121,40,110,97,109,101,44,32,118,97,108,117,101,41,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,108,111,99,97,108,32,108,78,97,109,101,32, +61,32,34,64,34,32,46,46,32,110,97,109,101,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,105,102,32,115,101,108,102,91,108,78,97,109,101, +93,32,126,61,32,110,105,108,32,116,104,101,110,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,105,102,32,116,121,112,101,40,115, +101,108,102,91,108,78,97,109,101,93,41,32,61,61,32,34,115,116,114,105, +110,103,34,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,108,111,99,97,108,32,116,101,109,112, +84,97,98,108,101,32,61,32,123,125,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110, +115,101,114,116,40,116,101,109,112,84,97,98,108,101,44,32,115,101,108,102, +91,108,78,97,109,101,93,41,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,115,101,108,102,91,108,78,97,109,101, +93,32,61,32,116,101,109,112,84,97,98,108,101,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110, +115,101,114,116,40,115,101,108,102,91,108,78,97,109,101,93,44,32,118,97, +108,117,101,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108, +115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +115,101,108,102,91,108,78,97,109,101,93,32,61,32,118,97,108,117,101,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110,115,101, +114,116,40,115,101,108,102,46,95,95,95,112,114,111,112,115,44,32,123,32, +110,97,109,101,32,61,32,110,97,109,101,44,32,118,97,108,117,101,32,61, +32,115,101,108,102,91,110,97,109,101,93,32,125,41,13,10,32,32,32,32, +32,32,32,32,101,110,100,13,10,13,10,32,32,32,32,32,32,32,32,114, +101,116,117,114,110,32,110,111,100,101,13,10,32,32,32,32,101,110,100,13, +10,32,32,32,32,102,117,110,99,116,105,111,110,32,88,109,108,80,97,114, +115,101,114,58,80,97,114,115,101,88,109,108,84,101,120,116,40,120,109,108, +84,101,120,116,41,13,10,32,32,32,32,32,32,32,32,108,111,99,97,108, +32,115,116,97,99,107,32,61,32,123,125,13,10,32,32,32,32,32,32,32, +32,108,111,99,97,108,32,116,111,112,32,61,32,110,101,119,78,111,100,101, +40,41,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110, +115,101,114,116,40,115,116,97,99,107,44,32,116,111,112,41,13,10,32,32, +32,32,32,32,32,32,108,111,99,97,108,32,110,105,44,32,99,44,32,108, +97,98,101,108,44,32,120,97,114,103,44,32,101,109,112,116,121,13,10,32, +32,32,32,32,32,32,32,108,111,99,97,108,32,105,44,32,106,32,61,32, +49,44,32,49,13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32, +116,114,117,101,32,100,111,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,110,105,44,32,106,44,32,99,44,32,108,97,98,101,108,44,32,120,97, +114,103,44,32,101,109,112,116,121,32,61,32,115,116,114,105,110,103,46,102, +105,110,100,40,120,109,108,84,101,120,116,44,32,34,60,40,37,47,63,41, +40,91,37,119,95,58,93,43,41,40,46,45,41,40,37,47,63,41,62,34, +44,32,105,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102, +32,110,111,116,32,110,105,32,116,104,101,110,32,98,114,101,97,107,32,101, +110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,108,111,99,97, +108,32,116,101,120,116,32,61,32,115,116,114,105,110,103,46,115,117,98,40, +120,109,108,84,101,120,116,44,32,105,44,32,110,105,32,45,32,49,41,59, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,110,111,116, +32,115,116,114,105,110,103,46,102,105,110,100,40,116,101,120,116,44,32,34, +94,37,115,42,36,34,41,32,116,104,101,110,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,108,111,99,97,108,32,108,86,97,108, +32,61,32,40,116,111,112,58,118,97,108,117,101,40,41,32,111,114,32,34, +34,41,32,46,46,32,115,101,108,102,58,70,114,111,109,88,109,108,83,116, +114,105,110,103,40,116,101,120,116,41,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,115,116,97,99,107,91,35,115,116,97,99,107, +93,58,115,101,116,86,97,108,117,101,40,108,86,97,108,41,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,105,102,32,101,109,112,116,121,32,61,61,32,34, +47,34,32,116,104,101,110,32,45,45,32,101,109,112,116,121,32,101,108,101, +109,101,110,116,32,116,97,103,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,108,111,99,97,108,32,108,78,111,100,101,32,61,32, +110,101,119,78,111,100,101,40,108,97,98,101,108,41,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,115,101,108,102,58,80,97,114, +115,101,65,114,103,115,40,108,78,111,100,101,44,32,120,97,114,103,41,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,111,112, +58,97,100,100,67,104,105,108,100,40,108,78,111,100,101,41,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,101,108,115,101,105,102,32,99,32,61, +61,32,34,34,32,116,104,101,110,32,45,45,32,115,116,97,114,116,32,116, +97,103,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +108,111,99,97,108,32,108,78,111,100,101,32,61,32,110,101,119,78,111,100, +101,40,108,97,98,101,108,41,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,115,101,108,102,58,80,97,114,115,101,65,114,103,115, +40,108,78,111,100,101,44,32,120,97,114,103,41,13,10,32,32,32,32,32, +32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,46,105,110,115, +101,114,116,40,115,116,97,99,107,44,32,108,78,111,100,101,41,13,10,9, +9,116,111,112,32,61,32,108,78,111,100,101,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,101,108,115,101,32,45,45,32,101,110,100,32,116,97, +103,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,108, +111,99,97,108,32,116,111,99,108,111,115,101,32,61,32,116,97,98,108,101, +46,114,101,109,111,118,101,40,115,116,97,99,107,41,32,45,45,32,114,101, +109,111,118,101,32,116,111,112,13,10,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,116,111,112,32,61,32,115,116,97,99,107,91, +35,115,116,97,99,107,93,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,105,102,32,35,115,116,97,99,107,32,60,32,49,32,116, +104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,101,114,114,111,114,40,34,88,109,108,80,97,114,115,101, +114,58,32,110,111,116,104,105,110,103,32,116,111,32,99,108,111,115,101,32, +119,105,116,104,32,34,32,46,46,32,108,97,98,101,108,41,13,10,32,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,116,111, +99,108,111,115,101,58,110,97,109,101,40,41,32,126,61,32,108,97,98,101, +108,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,32,32,32,32,32,32,101,114,114,111,114,40,34,88,109,108,80,97, +114,115,101,114,58,32,116,114,121,105,110,103,32,116,111,32,99,108,111,115, +101,32,34,32,46,46,32,116,111,99,108,111,115,101,46,110,97,109,101,32, +46,46,32,34,32,119,105,116,104,32,34,32,46,46,32,108,97,98,101,108, +41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101, +110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +116,111,112,58,97,100,100,67,104,105,108,100,40,116,111,99,108,111,115,101, +41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,105,32,61,32,106,32,43,32, +49,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32, +32,32,32,32,108,111,99,97,108,32,116,101,120,116,32,61,32,115,116,114, +105,110,103,46,115,117,98,40,120,109,108,84,101,120,116,44,32,105,41,59, +13,10,32,32,32,32,32,32,32,32,105,102,32,35,115,116,97,99,107,32, +62,32,49,32,116,104,101,110,13,10,32,32,32,32,32,32,32,32,32,32, +32,32,101,114,114,111,114,40,34,88,109,108,80,97,114,115,101,114,58,32, +117,110,99,108,111,115,101,100,32,34,32,46,46,32,115,116,97,99,107,91, +35,115,116,97,99,107,93,58,110,97,109,101,40,41,41,13,10,32,32,32, +32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,114,101, +116,117,114,110,32,116,111,112,13,10,32,32,32,32,101,110,100,13,10,13, +10,32,32,32,32,102,117,110,99,116,105,111,110,32,88,109,108,80,97,114, +115,101,114,58,108,111,97,100,70,105,108,101,40,120,109,108,70,105,108,101, +110,97,109,101,44,32,98,97,115,101,41,13,10,32,32,32,32,32,32,32, +32,105,102,32,110,111,116,32,98,97,115,101,32,116,104,101,110,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,98,97,115,101,32,61,32,115,121, +115,116,101,109,46,82,101,115,111,117,114,99,101,68,105,114,101,99,116,111, +114,121,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,13,10,32, +32,32,32,32,32,32,32,108,111,99,97,108,32,112,97,116,104,32,61,32, +115,121,115,116,101,109,46,112,97,116,104,70,111,114,70,105,108,101,40,120, +109,108,70,105,108,101,110,97,109,101,44,32,98,97,115,101,41,13,10,32, +32,32,32,32,32,32,32,108,111,99,97,108,32,104,70,105,108,101,44,32, +101,114,114,32,61,32,105,111,46,111,112,101,110,40,112,97,116,104,44,32, +34,114,34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32, +104,70,105,108,101,32,97,110,100,32,110,111,116,32,101,114,114,32,116,104, +101,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,108,111,99,97, +108,32,120,109,108,84,101,120,116,32,61,32,104,70,105,108,101,58,114,101, +97,100,40,34,42,97,34,41,59,32,45,45,32,114,101,97,100,32,102,105, +108,101,32,99,111,110,116,101,110,116,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,105,111,46,99,108,111,115,101,40,104,70,105,108,101,41,59, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110, +32,115,101,108,102,58,80,97,114,115,101,88,109,108,84,101,120,116,40,120, +109,108,84,101,120,116,41,44,32,110,105,108,59,13,10,32,32,32,32,32, +32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32, +32,112,114,105,110,116,40,101,114,114,41,13,10,32,32,32,32,32,32,32, +32,32,32,32,32,114,101,116,117,114,110,32,110,105,108,13,10,32,32,32, +32,32,32,32,32,101,110,100,13,10,32,32,32,32,101,110,100,13,10,13, +10,32,32,32,32,114,101,116,117,114,110,32,88,109,108,80,97,114,115,101, +114,13,10,101,110,100,13,10,13,10,45,45,32,69,120,112,111,114,116,32, +116,111,32,74,105,110,46,32,13,10,13,10,106,105,110,46,117,116,105,108, +115,46,120,109,108,46,110,101,119,80,97,114,115,101,114,32,61,32,110,101, +119,80,97,114,115,101,114,13,10 +}; + |