From 00b4d3abd1c18d78e7c7911d49ceb825d75758b3 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 14 Jun 2017 14:09:53 +0200 Subject: [PATCH] Normalize whitespace. Strip trailing whitespace, de-tabify and ensure that each file ends with a newline. --- COMPILE | 2 +- appveyor.yml | 4 ++-- doc/source/reference/api/bytecode_serialization.rst | 2 +- doc/source/reference/api/compiler.rst | 2 +- doc/source/reference/api/debug_interface.rst | 2 +- doc/source/reference/api/garbage_collector.rst | 2 +- doc/source/reference/api/object_manipulation.rst | 2 +- doc/source/reference/api/virtual_machine.rst | 2 +- doc/source/reference/embedding_squirrel.rst | 2 +- doc/source/reference/index.rst | 2 +- doc/source/reference/language.rst | 2 +- doc/source/reference/language/expressions.rst | 2 +- doc/source/stdlib/stdauxlib.rst | 2 +- doc/source/stdlib/stdbloblib.rst | 2 +- doc/source/stdlib/stdsystemlib.rst | 2 +- squirrel/sqapi.cpp | 4 ++-- squirrel/sqcompiler.cpp | 6 +++--- squirrel/sqvm.cpp | 10 +++++----- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/COMPILE b/COMPILE index 4065032..de7d5aa 100644 --- a/COMPILE +++ b/COMPILE @@ -83,4 +83,4 @@ DOCUMENTATION GENERATION To be able to compile the documentation, make sure that you have Python installed and the packages sphinx and sphinx_rtd_theme. Browse into doc/ and use either the Makefile for GCC-based platforms or make.bat for -Windows platforms. \ No newline at end of file +Windows platforms. diff --git a/appveyor.yml b/appveyor.yml index e106a7e..4da9b37 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ version: 0.0.{build} -platform: +platform: - x86 - x64 -configuration: +configuration: - Debug - Release diff --git a/doc/source/reference/api/bytecode_serialization.rst b/doc/source/reference/api/bytecode_serialization.rst index 7a54f77..0e1f586 100644 --- a/doc/source/reference/api/bytecode_serialization.rst +++ b/doc/source/reference/api/bytecode_serialization.rst @@ -29,4 +29,4 @@ serialize (read) a closure and pushes it on top of the stack, the source is user :returns: a SQRESULT :remarks: closures with free variables cannot be serialized -serializes(writes) the closure on top of the stack, the destination is user defined through a write callback. \ No newline at end of file +serializes(writes) the closure on top of the stack, the destination is user defined through a write callback. diff --git a/doc/source/reference/api/compiler.rst b/doc/source/reference/api/compiler.rst index 58bc3ff..7fcb933 100644 --- a/doc/source/reference/api/compiler.rst +++ b/doc/source/reference/api/compiler.rst @@ -76,4 +76,4 @@ enable/disable the error callback notification of handled exceptions. :param SQCOMPILERERROR f: A pointer to the error handler function :remarks: if the parameter f is NULL no function will be called when a compiler error occurs. The compiler error handler is shared between friend VMs. -sets the compiler error handler function \ No newline at end of file +sets the compiler error handler function diff --git a/doc/source/reference/api/debug_interface.rst b/doc/source/reference/api/debug_interface.rst index 4b22511..ac929e1 100644 --- a/doc/source/reference/api/debug_interface.rst +++ b/doc/source/reference/api/debug_interface.rst @@ -69,4 +69,4 @@ sets the native debug hook. When a native hook is set it overrides any previousl :param SQStackInfos * si: pointer to the SQStackInfos structure that will store the stack informations :returns: a SQRESULT. -retrieve the calls stack informations of a ceratain level in the calls stack. \ No newline at end of file +retrieve the calls stack informations of a ceratain level in the calls stack. diff --git a/doc/source/reference/api/garbage_collector.rst b/doc/source/reference/api/garbage_collector.rst index 562f099..cfe03e6 100644 --- a/doc/source/reference/api/garbage_collector.rst +++ b/doc/source/reference/api/garbage_collector.rst @@ -24,4 +24,4 @@ runs the garbage collector and returns the number of reference cycles found (and :param HSQUIRRELVM v: the target VM :remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined) -runs the garbage collector and pushes an array in the stack containing all unreachable object found. If no unreachable object is found, null is pushed instead. This function is meant to help debug reference cycles. \ No newline at end of file +runs the garbage collector and pushes an array in the stack containing all unreachable object found. If no unreachable object is found, null is pushed instead. This function is meant to help debug reference cycles. diff --git a/doc/source/reference/api/object_manipulation.rst b/doc/source/reference/api/object_manipulation.rst index ea00240..435a4e0 100644 --- a/doc/source/reference/api/object_manipulation.rst +++ b/doc/source/reference/api/object_manipulation.rst @@ -448,4 +448,4 @@ pops a value from the stack and sets it as a free variable of the closure at the :returns: a SQRESULT :remarks: if the object at idx position is one of (integer, float, bool, null), the object itself is pushed instead of a weak ref. -pushes a weak reference to the object at position idx in the stack. \ No newline at end of file +pushes a weak reference to the object at position idx in the stack. diff --git a/doc/source/reference/api/virtual_machine.rst b/doc/source/reference/api/virtual_machine.rst index 0256d1e..a63f7af 100644 --- a/doc/source/reference/api/virtual_machine.rst +++ b/doc/source/reference/api/virtual_machine.rst @@ -338,4 +338,4 @@ Suspends the execution of the specified vm. :param SQBool throwerror: if true, the vm will thow an exception as soon as is resumed. the exception payload must be set beforehand invoking sq_thowerror(). :returns: an HRESULT. -wake up the execution a previously suspended virtual machine \ No newline at end of file +wake up the execution a previously suspended virtual machine diff --git a/doc/source/reference/embedding_squirrel.rst b/doc/source/reference/embedding_squirrel.rst index 2f2ad8c..dc8d7fb 100644 --- a/doc/source/reference/embedding_squirrel.rst +++ b/doc/source/reference/embedding_squirrel.rst @@ -26,4 +26,4 @@ All declarations needed for embedding the language in an application are in the embedding/userdata_and_userpointers.rst embedding/the_registry_table.rst embedding/references_from_c.rst - embedding/debug_interface.rst \ No newline at end of file + embedding/debug_interface.rst diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst index 80b6c23..e2d3818 100644 --- a/doc/source/reference/index.rst +++ b/doc/source/reference/index.rst @@ -31,4 +31,4 @@ THE SOFTWARE. introduction.rst language.rst embedding_squirrel.rst - api_reference.rst \ No newline at end of file + api_reference.rst diff --git a/doc/source/reference/language.rst b/doc/source/reference/language.rst index 7e87011..3562119 100644 --- a/doc/source/reference/language.rst +++ b/doc/source/reference/language.rst @@ -20,4 +20,4 @@ language/weak_references.rst language/delegation.rst language/metamethods.rst - language/builtin_functions.rst \ No newline at end of file + language/builtin_functions.rst diff --git a/doc/source/reference/language/expressions.rst b/doc/source/reference/language/expressions.rst index c158219..9e75c7e 100644 --- a/doc/source/reference/language/expressions.rst +++ b/doc/source/reference/language/expressions.rst @@ -371,4 +371,4 @@ Creates a new array.:: Arrays can be initialized with values during the construction:: - a <- [1,"string!",[],{}] //creates an array with 4 elements \ No newline at end of file + a <- [1,"string!",[],{}] //creates an array with 4 elements diff --git a/doc/source/stdlib/stdauxlib.rst b/doc/source/stdlib/stdauxlib.rst index d601a5f..b800c10 100644 --- a/doc/source/stdlib/stdauxlib.rst +++ b/doc/source/stdlib/stdauxlib.rst @@ -28,4 +28,4 @@ C API prints the call stack and stack contents. the function uses the print function set through(:ref:`sq_setprintfunc `) to output - the stack dump. \ No newline at end of file + the stack dump. diff --git a/doc/source/stdlib/stdbloblib.rst b/doc/source/stdlib/stdbloblib.rst index 137a2cf..83d3426 100644 --- a/doc/source/stdlib/stdbloblib.rst +++ b/doc/source/stdlib/stdbloblib.rst @@ -210,4 +210,4 @@ C API :param SQInteger size: the size of the blob payload that has to be created :returns: a pointer to the newly created blob payload - creates a blob with the given payload size and pushes it in the stack. \ No newline at end of file + creates a blob with the given payload size and pushes it in the stack. diff --git a/doc/source/stdlib/stdsystemlib.rst b/doc/source/stdlib/stdsystemlib.rst index f0fee26..5c565fd 100644 --- a/doc/source/stdlib/stdsystemlib.rst +++ b/doc/source/stdlib/stdsystemlib.rst @@ -79,4 +79,4 @@ C API :returns: an SQRESULT :remarks: The function aspects a table on top of the stack where to register the global library functions. - initialize and register the system library in the given VM. \ No newline at end of file + initialize and register the system library in the given VM. diff --git a/squirrel/sqapi.cpp b/squirrel/sqapi.cpp index 21039fc..59b9edd 100644 --- a/squirrel/sqapi.cpp +++ b/squirrel/sqapi.cpp @@ -776,8 +776,8 @@ SQRESULT sq_getobjtypetag(const HSQOBJECT *o,SQUserPointer * typetag) SQRESULT sq_gettypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer *typetag) { SQObjectPtr &o = stack_get(v,idx); - if (SQ_FAILED(sq_getobjtypetag(&o, typetag))) - return SQ_ERROR;// this is not an error it should be a bool but would break backward compatibility + if (SQ_FAILED(sq_getobjtypetag(&o, typetag))) + return SQ_ERROR;// this is not an error it should be a bool but would break backward compatibility return SQ_OK; } diff --git a/squirrel/sqcompiler.cpp b/squirrel/sqcompiler.cpp index b580588..ab86274 100644 --- a/squirrel/sqcompiler.cpp +++ b/squirrel/sqcompiler.cpp @@ -466,7 +466,7 @@ public: INVOKE_EXP(f); SQInteger op1 = _fs->PopTarget();SQInteger op2 = _fs->PopTarget(); _fs->AddInstruction(op, _fs->PushTarget(), op1, op2, op3); - _es.etype = EXPR; + _es.etype = EXPR; } void LogicalOrExp() { @@ -483,7 +483,7 @@ public: if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); _fs->SnoozeOpt(); _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos)); - _es.etype = EXPR; + _es.etype = EXPR; break; }else return; } @@ -503,7 +503,7 @@ public: if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); _fs->SnoozeOpt(); _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos)); - _es.etype = EXPR; + _es.etype = EXPR; break; } diff --git a/squirrel/sqvm.cpp b/squirrel/sqvm.cpp index b20df9a..220d363 100644 --- a/squirrel/sqvm.cpp +++ b/squirrel/sqvm.cpp @@ -726,13 +726,13 @@ exception_restore: if (type(t) == OT_CLOSURE && (!_closure(t)->_function->_bgenerator)){ SQObjectPtr clo = t; - SQInteger last_top = _top; + SQInteger last_top = _top; if(_openouters) CloseOuters(&(_stack._vals[_stackbase])); for (SQInteger i = 0; i < arg3; i++) STK(i) = STK(arg2 + i); _GUARD(StartCall(_closure(clo), ci->_target, arg3, _stackbase, true)); - if (last_top >= _top) { - _top = last_top; - } + if (last_top >= _top) { + _top = last_top; + } continue; } } @@ -1334,7 +1334,7 @@ bool SQVM::Set(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr return false; } return true; - case OT_USERDATA: break; // must fall back + case OT_USERDATA: break; // must fall back default: Raise_Error(_SC("trying to set '%s'"),GetTypeName(self)); return false;