Squirrel patches can be applied again.
authorWolfgang Becker <uafr@gmx.de>
Sat, 14 Mar 2015 19:52:55 +0000 (20:52 +0100)
committerWolfgang Becker <uafr@gmx.de>
Sat, 14 Mar 2015 19:58:07 +0000 (20:58 +0100)
They were rejected due to different line endings.

external/squirrel/patches/patch2.patch
external/squirrel/patches/squirrel_coverity.patch

index cadb341..21133bb 100644 (file)
@@ -2,21 +2,21 @@ diff --git a/external/squirrel/squirrel/sqclosure.h b/external/squirrel/squirrel
 index 07b3efc..dc108de 100644
 --- a/external/squirrel/squirrel/sqclosure.h
 +++ b/external/squirrel/squirrel/sqclosure.h
-@@ -10,7 +10,7 @@ struct SQClass;
- struct SQClosure : public CHAINABLE_OBJ
- {
- private:
--      SQClosure(SQSharedState *ss,SQFunctionProto *func){_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
-+    SQClosure(SQSharedState *ss,SQFunctionProto *func): _outervalues(NULL), _defaultparams(NULL) {_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
- public:
-       static SQClosure *Create(SQSharedState *ss,SQFunctionProto *func){
-               SQInteger size = _CALC_CLOSURE_SIZE(func);
-@@ -139,7 +139,7 @@ public:
- struct SQNativeClosure : public CHAINABLE_OBJ
- {
- private:
--      SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
-+      SQNativeClosure(SQSharedState *ss,SQFUNCTION func): _nparamscheck(0), _outervalues(NULL), _noutervalues(0){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
- public:
-       static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func,SQInteger nouters)
-       {
+@@ -10,7 +10,7 @@ struct SQClass;\r
+ struct SQClosure : public CHAINABLE_OBJ\r
+ {\r
+ private:\r
+-      SQClosure(SQSharedState *ss,SQFunctionProto *func){_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}\r
++    SQClosure(SQSharedState *ss,SQFunctionProto *func): _outervalues(NULL), _defaultparams(NULL) {_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}\r
+ public:\r
+       static SQClosure *Create(SQSharedState *ss,SQFunctionProto *func){\r
+               SQInteger size = _CALC_CLOSURE_SIZE(func);\r
+@@ -139,7 +139,7 @@ public:\r
+ struct SQNativeClosure : public CHAINABLE_OBJ\r
+ {\r
+ private:\r
+-      SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}\r
++      SQNativeClosure(SQSharedState *ss,SQFUNCTION func): _nparamscheck(0), _outervalues(NULL), _noutervalues(0){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}\r
+ public:\r
+       static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func,SQInteger nouters)\r
+       {\r
index c077b3f..4d1e637 100644 (file)
@@ -2,105 +2,105 @@ diff --git a/external/squirrel/sqstdlib/sqstdstring.cpp b/external/squirrel/sqst
 index 33316fa..a213135 100644
 --- a/external/squirrel/sqstdlib/sqstdstring.cpp
 +++ b/external/squirrel/sqstdlib/sqstdstring.cpp
-@@ -116,6 +116,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
-                               fmt[fpos++] = _SC('\0');
-                               }
- #endif
-+                break;
-                       case 'c':
-                               if(SQ_FAILED(sq_getinteger(v,nparam,&ti))) 
-                                       return sq_throwerror(v,_SC("integer expected for the specified format"));
+@@ -116,6 +116,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen\r
+                               fmt[fpos++] = _SC('\0');\r
+                               }\r
+ #endif\r
++                break;\r
+                       case 'c':\r
+                               if(SQ_FAILED(sq_getinteger(v,nparam,&ti))) \r
+                                       return sq_throwerror(v,_SC("integer expected for the specified format"));\r
 diff --git a/external/squirrel/squirrel/sqfuncstate.cpp b/external/squirrel/squirrel/sqfuncstate.cpp
 index aff80e5..1667815 100644
 --- a/external/squirrel/squirrel/sqfuncstate.cpp
 +++ b/external/squirrel/squirrel/sqfuncstate.cpp
-@@ -460,6 +460,7 @@ void SQFuncState::AddInstruction(SQInstruction &i)
-                               pi._arg1 = i._arg1;
-                               return;
-                       }
-+            break;
-               case _OP_SET:
-               case _OP_NEWSLOT:
-                       if(i._arg0 == i._arg3) {
+@@ -460,6 +460,7 @@ void SQFuncState::AddInstruction(SQInstruction &i)\r
+                               pi._arg1 = i._arg1;\r
+                               return;\r
+                       }\r
++            break;\r
+               case _OP_SET:\r
+               case _OP_NEWSLOT:\r
+                       if(i._arg0 == i._arg3) {\r
 diff --git a/external/squirrel/squirrel/sqlexer.cpp b/external/squirrel/squirrel/sqlexer.cpp
 index 547835b..f4d4d04 100644
 --- a/external/squirrel/squirrel/sqlexer.cpp
 +++ b/external/squirrel/squirrel/sqlexer.cpp
-@@ -18,7 +18,24 @@
- #define TERMINATE_BUFFER() {_longstr.push_back(_SC('\0'));}
- #define ADD_KEYWORD(key,id) _keywords->NewSlot( SQString::Create(ss, _SC(#key)) ,SQInteger(id))
--SQLexer::SQLexer(){}
-+SQLexer::SQLexer() :
-+  _curtoken(0),
-+  _keywords(NULL),
-+  _reached_eof(false),
-+  _prevtoken(0),
-+  _currentline(0),
-+  _lasttokenline(0),
-+  _currentcolumn(0),
-+  _svalue(NULL),
-+  _nvalue(0),
-+  _fvalue(0.0),
-+  _readf(NULL),
-+  _up(NULL),
-+  _currdata('\0'),
-+  _sharedstate(NULL),
-+  _errfunc(NULL),
-+  _errtarget(NULL)
-+{}
- SQLexer::~SQLexer()
- {
-       _keywords->Release();
-@@ -192,6 +209,7 @@ SQInteger SQLexer::Lex()
-                       NEXT();
-                       if (CUR_CHAR != _SC('=')){ RETURN_TOKEN('!')}
-                       else { NEXT(); RETURN_TOKEN(TK_NE); }
-+            break;
-               case _SC('@'): {
-                       SQInteger stype;
-                       NEXT();
-@@ -203,6 +221,7 @@ SQInteger SQLexer::Lex()
-                       }
-                       Error(_SC("error parsing the string"));
-                                          }
-+            break;
-               case _SC('"'):
-               case _SC('\''): {
-                       SQInteger stype;
-@@ -211,6 +230,7 @@ SQInteger SQLexer::Lex()
-                       }
-                       Error(_SC("error parsing the string"));
-                       }
-+            break;
-               case _SC('{'): case _SC('}'): case _SC('('): case _SC(')'): case _SC('['): case _SC(']'):
-               case _SC(';'): case _SC(','): case _SC('?'): case _SC('^'): case _SC('~'):
-                       {SQInteger ret = CUR_CHAR;
+@@ -18,7 +18,24 @@\r
+ #define TERMINATE_BUFFER() {_longstr.push_back(_SC('\0'));}\r
+ #define ADD_KEYWORD(key,id) _keywords->NewSlot( SQString::Create(ss, _SC(#key)) ,SQInteger(id))\r
\r
+-SQLexer::SQLexer(){}\r
++SQLexer::SQLexer() :\r
++  _curtoken(0),\r
++  _keywords(NULL),\r
++  _reached_eof(false),\r
++  _prevtoken(0),\r
++  _currentline(0),\r
++  _lasttokenline(0),\r
++  _currentcolumn(0),\r
++  _svalue(NULL),\r
++  _nvalue(0),\r
++  _fvalue(0.0),\r
++  _readf(NULL),\r
++  _up(NULL),\r
++  _currdata('\0'),\r
++  _sharedstate(NULL),\r
++  _errfunc(NULL),\r
++  _errtarget(NULL)\r
++{}\r
+ SQLexer::~SQLexer()\r
+ {\r
+       _keywords->Release();\r
+@@ -192,6 +209,7 @@ SQInteger SQLexer::Lex()\r
+                       NEXT();\r
+                       if (CUR_CHAR != _SC('=')){ RETURN_TOKEN('!')}\r
+                       else { NEXT(); RETURN_TOKEN(TK_NE); }\r
++            break;\r
+               case _SC('@'): {\r
+                       SQInteger stype;\r
+                       NEXT();\r
+@@ -203,6 +221,7 @@ SQInteger SQLexer::Lex()\r
+                       }\r
+                       Error(_SC("error parsing the string"));\r
+                                          }\r
++            break;\r
+               case _SC('"'):\r
+               case _SC('\''): {\r
+                       SQInteger stype;\r
+@@ -211,6 +230,7 @@ SQInteger SQLexer::Lex()\r
+                       }\r
+                       Error(_SC("error parsing the string"));\r
+                       }\r
++            break;\r
+               case _SC('{'): case _SC('}'): case _SC('('): case _SC(')'): case _SC('['): case _SC(']'):\r
+               case _SC(';'): case _SC(','): case _SC('?'): case _SC('^'): case _SC('~'):\r
+                       {SQInteger ret = CUR_CHAR;\r
 diff --git a/external/squirrel/squirrel/sqvm.cpp b/external/squirrel/squirrel/sqvm.cpp
 index de0927f..e941231 100644
 --- a/external/squirrel/squirrel/sqvm.cpp
 +++ b/external/squirrel/squirrel/sqvm.cpp
-@@ -306,6 +306,7 @@ bool SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)
-                               }
-                       }
-               }
-+        break;
-       default:
-               scsprintf(_sp(rsl(sizeof(void*)+20)),_SC("(%s : 0x%p)"),GetTypeName(o),(void*)_rawval(o));
-       }
-@@ -561,6 +562,7 @@ bool SQVM::FOREACH_OP(SQObjectPtr &o1,SQObjectPtr &o2,SQObjectPtr
-                       _generator(o1)->Resume(this, o3);
-                       _FINISH(0);
-               }
-+        break;
-       default: 
-               Raise_Error(_SC("cannot iterate %s"), GetTypeName(o1));
-       }
-@@ -724,6 +726,7 @@ exception_restore:
-                                       continue;
-                               }
-                                                         }
-+                break;
-                       case _OP_CALL: {
-                                       SQObjectPtr clo = STK(arg1);
-                                       switch (type(clo)) {
+@@ -306,6 +306,7 @@ bool SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)\r
+                               }\r
+                       }\r
+               }\r
++        break;\r
+       default:\r
+               scsprintf(_sp(rsl(sizeof(void*)+20)),_SC("(%s : 0x%p)"),GetTypeName(o),(void*)_rawval(o));\r
+       }\r
+@@ -561,6 +562,7 @@ bool SQVM::FOREACH_OP(SQObjectPtr &o1,SQObjectPtr &o2,SQObjectPtr\r
+                       _generator(o1)->Resume(this, o3);\r
+                       _FINISH(0);\r
+               }\r
++        break;\r
+       default: \r
+               Raise_Error(_SC("cannot iterate %s"), GetTypeName(o1));\r
+       }\r
+@@ -724,6 +726,7 @@ exception_restore:\r
+                                       continue;\r
+                               }\r
+                                                         }\r
++                break;\r
+                       case _OP_CALL: {\r
+                                       SQObjectPtr clo = STK(arg1);\r
+                                       switch (type(clo)) {\r