diff options
Diffstat (limited to 'src/modules/json')
-rw-r--r-- | src/modules/json/JSONChildren.cpp | 50 | ||||
-rw-r--r-- | src/modules/json/JSONDebug.cpp | 54 | ||||
-rw-r--r-- | src/modules/json/JSONIterators.cpp | 56 | ||||
-rw-r--r-- | src/modules/json/JSONMemory.cpp | 50 | ||||
-rw-r--r-- | src/modules/json/JSONMemory.h | 2 | ||||
-rw-r--r-- | src/modules/json/JSONNode.cpp | 52 | ||||
-rw-r--r-- | src/modules/json/JSONNode.h | 4 | ||||
-rw-r--r-- | src/modules/json/JSONWorker.cpp | 42 | ||||
-rw-r--r-- | src/modules/json/JSONWriter.cpp | 4 | ||||
-rw-r--r-- | src/modules/json/JSON_Base64.cpp | 58 | ||||
-rw-r--r-- | src/modules/json/NumberToString.h | 4 | ||||
-rw-r--r-- | src/modules/json/json.cpp | 8 |
12 files changed, 192 insertions, 192 deletions
diff --git a/src/modules/json/JSONChildren.cpp b/src/modules/json/JSONChildren.cpp index 371c19880a..f55f0fa676 100644 --- a/src/modules/json/JSONChildren.cpp +++ b/src/modules/json/JSONChildren.cpp @@ -1,28 +1,28 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + #include "JSONChildren.h" #include "JSONNode.h" diff --git a/src/modules/json/JSONDebug.cpp b/src/modules/json/JSONDebug.cpp index 7e13c11a85..990a594679 100644 --- a/src/modules/json/JSONDebug.cpp +++ b/src/modules/json/JSONDebug.cpp @@ -1,30 +1,30 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
-#include "libJSON.h"
-#include "m_json.h"
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + +#include "libJSON.h" +#include "m_json.h" #ifdef JSON_DEBUG diff --git a/src/modules/json/JSONIterators.cpp b/src/modules/json/JSONIterators.cpp index edb8ff7618..716be5f8e1 100644 --- a/src/modules/json/JSONIterators.cpp +++ b/src/modules/json/JSONIterators.cpp @@ -1,28 +1,28 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + #include "JSONNode.h" #ifdef JSON_ITERATORS @@ -119,7 +119,7 @@ JSONNode::json_iterator JSONNode::insertFFF(json_iterator pos, JSONNode ** const json_auto<JSONNode *> mem(num); JSONNode ** runner = mem.ptr; for (JSONNode ** po = _start; po < _end; ++po){ - *runner++ = newJSONNode(*(*po) JSON_MUTEX_COPY2); + *runner++=newJSONNode(*(*po) JSON_MUTEX_COPY2); } internal -> Children.insert(json_iterator_ptr(pos), mem.ptr, num); return pos; @@ -213,7 +213,7 @@ JSONNode::json_iterator JSONNode::insertFFF(json_iterator pos, JSONNode ** const json_auto<JSONNode *> mem(num); JSONNode ** runner = mem.ptr; for (JSONNode ** po = _start; po > _end; --po){ - *runner++ = newJSONNode(*(*po) JSON_MUTEX_COPY2); + *runner++=newJSONNode(*(*po) JSON_MUTEX_COPY2); } internal -> Children.insert(pos.it, mem.ptr, num); return pos; @@ -229,7 +229,7 @@ JSONNode::json_iterator JSONNode::insertFFF(json_iterator pos, JSONNode ** const json_auto<JSONNode *> mem(num); JSONNode ** runner = mem.ptr; for (JSONNode ** po = _start; po > _end; --po){ - *runner++ = newJSONNode(*(*po) JSON_MUTEX_COPY2); + *runner++=newJSONNode(*(*po) JSON_MUTEX_COPY2); } internal -> Children.insert(++pos.it, mem.ptr, num); return pos - num + 1; diff --git a/src/modules/json/JSONMemory.cpp b/src/modules/json/JSONMemory.cpp index 08b6d7fd70..4c2c851022 100644 --- a/src/modules/json/JSONMemory.cpp +++ b/src/modules/json/JSONMemory.cpp @@ -1,28 +1,28 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + #include "JSONMemory.h" #include "JSONNode.h" diff --git a/src/modules/json/JSONMemory.h b/src/modules/json/JSONMemory.h index c04c45eff5..899d73b6fc 100644 --- a/src/modules/json/JSONMemory.h +++ b/src/modules/json/JSONMemory.h @@ -119,7 +119,7 @@ class json_auto { T * ptr; private: json_auto(const json_auto &); - json_auto & operator =(const json_auto &); + json_auto & operator = (const json_auto &); }; //Clears a string, if required, frees the memory diff --git a/src/modules/json/JSONNode.cpp b/src/modules/json/JSONNode.cpp index 8d2a046f69..8e4ca34678 100644 --- a/src/modules/json/JSONNode.cpp +++ b/src/modules/json/JSONNode.cpp @@ -1,28 +1,28 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + #include "JSONNode.h" #ifdef JSON_UNIT_TEST @@ -158,7 +158,7 @@ void JSONNode::merge(JSONNode &) { #ifdef JSON_REF_COUNT va_list args; va_start(args, num); - for(unsigned int i = 0; i < num; ++i){ + for(unsigned int i=0; i < num; ++i){ merge(va_arg(args, JSONNode*)); } va_end(args); diff --git a/src/modules/json/JSONNode.h b/src/modules/json/JSONNode.h index 36ebcd6145..3552f9f73c 100644 --- a/src/modules/json/JSONNode.h +++ b/src/modules/json/JSONNode.h @@ -158,7 +158,7 @@ public: JSONNode JSON_PTR_LIB pop_back_nocase(const json_string & name_t); #endif - DECLARE_FOR_ALL_TYPES(JSONNode & operator =) + DECLARE_FOR_ALL_TYPES(JSONNode & operator = ) JSONNode & operator = (const JSONNode &); DECLARE_FOR_ALL_TYPES_CONST(bool operator ==) @@ -253,7 +253,7 @@ public: inline bool operator >= (const const_iterator & other) const { return it >= other.it; } inline bool operator < (const const_iterator & other) const { return it < other.it; } inline bool operator <= (const const_iterator & other) const { return it <= other.it; } - inline const_iterator & operator =(const const_iterator & orig){ it = orig.it; return *this; } + inline const_iterator & operator = (const const_iterator & orig){ it = orig.it; return *this; } const_iterator (const const_iterator & orig) : it(orig.it) {} private: JSONNode ** it; diff --git a/src/modules/json/JSONWorker.cpp b/src/modules/json/JSONWorker.cpp index 25589a8d2f..488089345f 100644 --- a/src/modules/json/JSONWorker.cpp +++ b/src/modules/json/JSONWorker.cpp @@ -143,12 +143,12 @@ size_t JSONWorker::FindNextRelevant(json_char ch, const json_string & value_t, c } #ifdef JSON_COMMENTS - #define COMMENT_DELIMITER() *runner++ = '\5' + #define COMMENT_DELIMITER() *runner++='\5' #define AND_RUNNER ,runner inline void SingleLineComment(const json_char * & p, json_char * & runner){ COMMENT_DELIMITER(); while((*(++p)) && (*p != JSON_TEXT('\n'))) { - *runner++ = *p; + *runner++=*p; } COMMENT_DELIMITER(); } @@ -183,7 +183,7 @@ inline void SingleLineComment(const json_char * & p){ COMMENT_DELIMITER(); while ((*(++p) != JSON_TEXT('*')) || (*(p + 1) != JSON_TEXT('/'))) { JSON_ASSERT_SAFE(*p, JSON_TEXT("Null terminator inside of a multiline quote"), COMMENT_DELIMITER(); goto endofloop;); - *runner++ = *p; + *runner++=*p; } ++p; COMMENT_DELIMITER(); @@ -195,16 +195,16 @@ inline void SingleLineComment(const json_char * & p){ SingleLineComment(p AND_RUNNER); break; case JSON_TEXT('\"'): //a quote - *runner++ = JSON_TEXT('\"'); + *runner++=JSON_TEXT('\"'); while(*(++p) != JSON_TEXT('\"')) { //find the end of the quotation, as white space is preserved within it JSON_ASSERT_SAFE(*p, JSON_TEXT("Null terminator inside of a quotation"), goto endofloop;); switch(*p){ case JSON_TEXT('\\'): - *runner++ = JSON_TEXT('\\'); - *runner++ = (*++p == JSON_TEXT('\"')) ? JSON_TEXT('\1') : *p; //an escaped quote will reak havoc will all of my searching functions, so change it into an illegal character in JSON for convertion later on + *runner++=JSON_TEXT('\\'); + *runner++=(*++p == JSON_TEXT('\"')) ? JSON_TEXT('\1') : *p; //an escaped quote will reak havoc will all of my searching functions, so change it into an illegal character in JSON for convertion later on break; default: - *runner++ = *p; + *runner++=*p; break; } } @@ -212,7 +212,7 @@ inline void SingleLineComment(const json_char * & p){ default: JSON_ASSERT_SAFE((json_uchar)*p >= 32, JSON_TEXT("Invalid JSON character detected (lo)"), goto endofloop;); JSON_ASSERT_SAFE((json_uchar)*p <= 126, JSON_TEXT("Invalid JSON character detected (hi)"), goto endofloop;); - *runner++ = *p; + *runner++=*p; break; } ++p; @@ -333,8 +333,8 @@ json_char* JSONWorker::UTF8_2(const json_char * & pos){ ++pos; json_uchar temp = Hex(pos) << 8; ++pos; - *szU8Buffer= temp | Hex(pos); - szU8Buffer[1]=0; + *szU8Buffer = temp | Hex(pos); + szU8Buffer[1] = 0; return szU8Buffer; #else union { @@ -343,20 +343,20 @@ json_char* JSONWorker::UTF8_2(const json_char * & pos){ }; pos++; strncpy(szU8Buffer+5,pos,4); - szU8Buffer[9]=0; - uChar=strtoul(szU8Buffer+5,NULL,16); + szU8Buffer[9] = 0; + uChar = strtoul(szU8Buffer+5,NULL,16); if (uChar<0x80) { - szU8Buffer[0]=uChar; - szU8Buffer[1]=0; + szU8Buffer[0] = uChar; + szU8Buffer[1] = 0; } else if (uChar<0x7ff) { - szU8Buffer[0]=0xc0+(uByte[1]<<2)+(uByte[0]>>6); - szU8Buffer[1]=0x80+(uByte[0]&0x3f); - szU8Buffer[2]=0; + szU8Buffer[0] = 0xc0+(uByte[1]<<2)+(uByte[0]>>6); + szU8Buffer[1] = 0x80+(uByte[0]&0x3f); + szU8Buffer[2] = 0; } else { - szU8Buffer[0]=0xe0+(uByte[1]>>4); - szU8Buffer[1]=0x80+((uByte[1]&0x0f)<<2)+(uByte[0]>>6); - szU8Buffer[2]=0x80+(uByte[0]&0x3f); - szU8Buffer[3]=0; + szU8Buffer[0] = 0xe0+(uByte[1]>>4); + szU8Buffer[1] = 0x80+((uByte[1]&0x0f)<<2)+(uByte[0]>>6); + szU8Buffer[2] = 0x80+(uByte[0]&0x3f); + szU8Buffer[3] = 0; } pos += 3; diff --git a/src/modules/json/JSONWriter.cpp b/src/modules/json/JSONWriter.cpp index ae95773f6d..550a03dadd 100644 --- a/src/modules/json/JSONWriter.cpp +++ b/src/modules/json/JSONWriter.cpp @@ -41,7 +41,7 @@ const static json_string WRITER_EMPTY; if (amount == 0xFFFFFFFF) return WRITER_EMPTY; json_string result; result.reserve(amount); - for(unsigned int i = 0; i < amount; ++i){ + for(unsigned int i=0; i < amount; ++i){ result += INDENT; } return result; @@ -75,7 +75,7 @@ json_string internalJSONNode::WriteChildren(unsigned int indent){ } //else it's not formatted, leave the indentation strings empty const size_t size_minus_one = Children.size() - 1; - size_t i = 0; + size_t i=0; json_foreach(Children, it){ res += indent_plus_one + (*it) -> internal -> Write(indent, type() == JSON_ARRAY); if (i < size_minus_one) res += JSON_TEXT(","); //the last one does not get a comma, but all of the others do diff --git a/src/modules/json/JSON_Base64.cpp b/src/modules/json/JSON_Base64.cpp index 4759b112bb..07147afadc 100644 --- a/src/modules/json/JSON_Base64.cpp +++ b/src/modules/json/JSON_Base64.cpp @@ -1,28 +1,28 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "..\..\core\commonheaders.h"
-
+/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "..\..\core\commonheaders.h" + #include "JSON_Base64.h" #include "JSONDefs.h" @@ -42,7 +42,7 @@ json_string JSONBase64::json_encode64(const unsigned char * binary, size_t bytes result.reserve((size_t)(((float)bytes) * 1.37f) + 4); //do all of the ones that are 3 byte aligned - for (size_t i = 0; i < aligned; ++i){ + for (size_t i=0; i < aligned; ++i){ result += chars64[(binary[0] & 0xFC) >> 2]; result += chars64[((binary[0] & 0x03) << 4) + ((binary[1] & 0xF0) >> 4)]; result += chars64[((binary[1] & 0x0F) << 2) + ((binary[2] & 0xC0) >> 6)]; @@ -53,7 +53,7 @@ json_string JSONBase64::json_encode64(const unsigned char * binary, size_t bytes if (misaligned){ //copy the rest into a temporary buffer unsigned char temp[3]; - for (unsigned int i = 0; i < misaligned; ++i){ + for (unsigned int i=0; i < misaligned; ++i){ temp[i] = *binary++; } for (unsigned int i = (unsigned int)misaligned; i < 3; ++i){ @@ -67,7 +67,7 @@ json_string JSONBase64::json_encode64(const unsigned char * binary, size_t bytes result += chars64[((temp[1] & 0x0F) << 2) + ((temp[2] & 0xC0) >> 6)]; result += JSON_TEXT('='); } else { - result += JSON_TEXT("=="); + result += JSON_TEXT(" = = "); } } JSON_ASSERT((size_t)(((float)bytes) * 1.37f) + 4 >= result.length(), JSON_TEXT("Didn't reserve enough space for a one-time go")); @@ -110,7 +110,7 @@ std::string JSONBase64::json_decode64(const json_string & encoded){ result.reserve((size_t)((float)length / 1.37) + 1); //first do the ones that can not have any padding - for (unsigned int i = 0; i < aligned; ++i){ + for (unsigned int i=0; i < aligned; ++i){ const json_char second = toBinary(runner[1]); const json_char third = toBinary(runner[2]); result += (toBinary(runner[0]) << 2) + ((second & 0x30) >> 4); diff --git a/src/modules/json/NumberToString.h b/src/modules/json/NumberToString.h index a5e93d4302..35c6c98d0a 100644 --- a/src/modules/json/NumberToString.h +++ b/src/modules/json/NumberToString.h @@ -41,7 +41,7 @@ public: //create the string do { - *runner-- = (json_char)(value % 10) + JSON_TEXT('0'); + *runner--=(json_char)(value % 10) + JSON_TEXT('0'); } while(value /= 10); //if it's negative, add the negation @@ -66,7 +66,7 @@ public: //create the string do { - *runner-- = (json_char)(value % 10) + JSON_TEXT('0'); + *runner--=(json_char)(value % 10) + JSON_TEXT('0'); } while(value /= 10); json_string res = runner + 1; diff --git a/src/modules/json/json.cpp b/src/modules/json/json.cpp index ee71ee4ef7..4b3e35d926 100644 --- a/src/modules/json/json.cpp +++ b/src/modules/json/json.cpp @@ -31,12 +31,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR GetInterface(WPARAM wParam, LPARAM lParam)
{
- LPJSONSERVICEINTERFACE lpJSI=(LPJSONSERVICEINTERFACE)wParam;
+ LPJSONSERVICEINTERFACE lpJSI = (LPJSONSERVICEINTERFACE)wParam;
memset(lpJSI,0,sizeof(JSONSERVICEINTERFACE));
-#define SETJSI(x) lpJSI->##x=json_##x
+#define SETJSI(x) lpJSI->##x = json_##x
SETJSI(free);
- lpJSI->delete_=json_delete;
+ lpJSI->delete_ = json_delete;
#ifdef JSON_MEMORY_MANAGE
SETJSI(free_all);
SETJSI(delete_all);
@@ -50,7 +50,7 @@ INT_PTR GetInterface(WPARAM wParam, LPARAM lParam) SETJSI(new_i);
SETJSI(new_f);
SETJSI(new_b);
- lpJSI->new_=json_new;
+ lpJSI->new_ = json_new;
SETJSI(copy);
SETJSI(duplicate);
SETJSI(set_a);
|