diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-05-10 17:16:44 +0400 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-05-10 17:16:44 +0400 |
commit | 132e8757bc800d51058e3e1e4d2d73a0279ca0ac (patch) | |
tree | c430b456662027b7a20a9a819940a064e7d62a14 | |
parent | 896fb92fd5a288352d697cddf0a1869b5b955a4a (diff) |
Remove trailing whitespace1.0.1
-rw-r--r-- | lua-cjson.spec | 2 | ||||
-rw-r--r-- | lua_cjson.c | 18 | ||||
-rw-r--r-- | strbuf.c | 6 | ||||
-rw-r--r-- | strbuf.h | 6 | ||||
-rw-r--r-- | tests/common.lua | 2 | ||||
-rwxr-xr-x | tests/test.lua | 6 |
6 files changed, 20 insertions, 20 deletions
diff --git a/lua-cjson.spec b/lua-cjson.spec index a86ee20..874a6bc 100644 --- a/lua-cjson.spec +++ b/lua-cjson.spec @@ -18,7 +18,7 @@ Requires: lua >= %{luaver} %description CJSON provides fast JSON parsing and encoding functions for Lua. It allows a Lua application to quickly serialise a data structure to -JSON, or deserialise from JSON to Lua. +JSON, or deserialise from JSON to Lua. %prep %setup -q diff --git a/lua_cjson.c b/lua_cjson.c index 50f27c2..2228fee 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -1,7 +1,7 @@ /* CJSON - JSON support for Lua * * Copyright (c) 2010-2011 Mark Pulford <mark@kyne.com.au> - * + * * 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 @@ -9,10 +9,10 @@ * 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. @@ -105,7 +105,7 @@ typedef struct { int encode_keep_buffer; } json_config_t; -typedef struct { +typedef struct { const char *data; int index; strbuf_t *tmp; /* Temporary storage for strings */ @@ -306,7 +306,7 @@ static int json_cfg_refuse_invalid_numbers(lua_State *l) static int json_destroy_config(lua_State *l) { json_config_t *cfg; - + cfg = lua_touserdata(l, 1); if (cfg) strbuf_free(&cfg->encode_buf); @@ -720,7 +720,7 @@ static int codepoint_to_utf8(char *utf8, int codepoint) utf8[0] = codepoint; return 1; } - + /* 110xxxxx 10xxxxxx */ if (codepoint <= 0x7FF) { utf8[0] = (codepoint >> 6) | 0xC0; @@ -843,7 +843,7 @@ static void json_next_string_token(json_parse_t *json, json_token_t *token) json_set_token_error(token, json, "unexpected end of string"); return; } - + /* Handle escapes */ if (ch == '\\') { /* Fetch escape character */ @@ -1102,7 +1102,7 @@ static void json_parse_object_context(lua_State *l, json_parse_t *json) json_throw_parse_error(l, json, "comma or object end", &token); json_next_token(json, &token); - } + } } /* Handle the array context */ @@ -1141,7 +1141,7 @@ static void json_parse_array_context(lua_State *l, json_parse_t *json) /* Handle the "value" context */ static void json_process_value(lua_State *l, json_parse_t *json, - json_token_t *token) + json_token_t *token) { switch (token->type) { case T_STRING: @@ -1,7 +1,7 @@ /* strbuf - string buffer routines * * Copyright (c) 2010-2011 Mark Pulford <mark@kyne.com.au> - * + * * 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 @@ -9,10 +9,10 @@ * 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. @@ -1,7 +1,7 @@ /* strbuf - String buffer routines * * Copyright (c) 2010-2011 Mark Pulford <mark@kyne.com.au> - * + * * 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 @@ -9,10 +9,10 @@ * 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. diff --git a/tests/common.lua b/tests/common.lua index 48b4197..156f882 100644 --- a/tests/common.lua +++ b/tests/common.lua @@ -31,7 +31,7 @@ end function serialise_table(value, indent, depth) local spacing, spacing2, indent2 - if indent then + if indent then spacing = "\n" .. indent spacing2 = spacing .. " " indent2 = indent .. " " diff --git a/tests/test.lua b/tests/test.lua index 4bb62be..bfa4f66 100755 --- a/tests/test.lua +++ b/tests/test.lua @@ -43,7 +43,7 @@ local function gen_utf16_escaped() end end table.insert(utf16_escaped, '"') - + return table.concat(utf16_escaped) end @@ -120,10 +120,10 @@ local encode_table_tests = { true, { '[null,null,"sparse test"]' } }, { json.encode, { { [1] = "one", [4] = "sparse test" } }, - true, { '["one",null,null,"sparse test"]' } }, + true, { '["one",null,null,"sparse test"]' } }, { json.encode, { { [1] = "one", [5] = "sparse test" } }, - true, { '{"1":"one","5":"sparse test"}' } }, + true, { '{"1":"one","5":"sparse test"}' } }, { json.encode, { nested5 }, true, { '[[[[["nested"]]]]]' } }, { json.encode, { { nested5 } }, |