Browse Source

some doc updates and fixes

albertodemichelis 4 years ago
parent
commit
d1f54757c2

BIN
doc/source/nut.ico


+ 5 - 5
doc/source/reference/api/calls.rst

@@ -92,11 +92,11 @@ resumes the generator at the top position of the stack.
 .. c:function:: SQRESULT sq_tailcall(HSQUIRRELVM v, SQInteger nparams)
 
 	:param HSQUIRRELVM v: the target VM
-    :param SQInteger params: number of parameters of the function
+	:param SQInteger params: number of parameters of the function
 
-	Calls a closure and removes the caller function from the call stack.
-	This function must be invoke from a native closure and 
-	he return value of sq_tailcall must be returned by the caller function(see example).
+    Calls a closure and removes the caller function from the call stack.
+    This function must be invoke from a native closure and 
+    he return value of sq_tailcall must be returned by the caller function(see example).
 	
 *.eg*
 
@@ -114,7 +114,7 @@ resumes the generator at the top position of the stack.
 .. c:function:: SQRESULT sq_throwerror(HSQUIRRELVM v, const SQChar * err)
 
     :param HSQUIRRELVM v: the target VM
-    :param const SQChar * err: the description of the error that has to be thrown
+    :param SQChar * err: the description of the error that has to be thrown
     :returns: the value that has to be returned by a native closure in order to throw an exception in the virtual machine.
 
 sets the last error in the virtual machine and returns the value that has to be returned by a native closure in order to trigger an exception in the virtual machine.

+ 3 - 3
doc/source/reference/api/compiler.rst

@@ -11,7 +11,7 @@ Compiler
     :param HSQUIRRELVM v: the target VM
     :param HSQLEXREADFUNC read: a pointer to a read function that will feed the compiler with the program.
     :param SQUserPointer p: a user defined pointer that will be passed by the compiler to the read function at each invocation.
-    :param const SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors)
+    :param SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors)
     :param SQBool raiseerror: if this value is true the compiler error handler will be called in case of an error
     :returns: a SQRESULT. If the sq_compile fails nothing is pushed in the stack.
     :remarks: in case of an error the function will call the function set by sq_setcompilererrorhandler().
@@ -27,9 +27,9 @@ compiles a squirrel program; if it succeeds, push the compiled script as functio
 .. c:function:: SQRESULT sq_compilebuffer(HSQUIRRELVM v, const SQChar* s, SQInteger size, const SQChar * sourcename, SQBool raiseerror)
 
     :param HSQUIRRELVM v: the target VM
-    :param const SQChar* s: a pointer to the buffer that has to be compiled.
+    :param SQChar * s: a pointer to the buffer that has to be compiled.
     :param SQInteger size: size in characters of the buffer passed in the parameter 's'.
-    :param const SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors)
+    :param SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors)
     :param SQBool raiseerror: if this value true the compiler error handler will be called in case of an error
     :returns: a SQRESULT. If the sq_compilebuffer fails nothing is pushed in the stack.
     :remarks: in case of an error the function will call the function set by sq_setcompilererrorhandler().

+ 13 - 13
doc/source/reference/api/object_creation_and_handling.rst

@@ -51,11 +51,11 @@ gets the value of the bool at the idx position in the stack.
 
 .. _sq_getbyhandle:
 
-.. c:function:: SQRESULT sq_getbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
+.. c:function:: SQRESULT sq_getbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack pointing to the class or instance
-    :param HSQMEMBERHANDLE* handle: a pointer to the member handle
+    :param HSQMEMBERHANDLE * handle: a pointer to the member handle
     :returns: a SQRESULT
 
 pushes the value of a class or instance member using a member handle (see sq_getmemberhandle)
@@ -171,11 +171,11 @@ gets the value of the integer at the idx position in the stack.
 
 .. _sq_getmemberhandle:
 
-.. c:function:: SQRESULT sq_getmemberhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
+.. c:function:: SQRESULT sq_getmemberhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack pointing to the class
-    :param HSQMEMBERHANDLE* handle: a pointer to the variable that will store the handle
+    :param HSQMEMBERHANDLE * handle: a pointer to the variable that will store the handle
     :returns: a SQRESULT
     :remarks: This method works only with classes. A handle retrieved through a class can be later used to set or get values from one of the class instances. Handles retrieved from base classes are still valid in derived classes and respect inheritance rules.
 
@@ -234,7 +234,7 @@ returns the size of a value at the idx position in the stack. If the value is a
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack
-    :param const SQChar ** c: a pointer to the pointer that will point to the string
+    :param SQChar ** c: a pointer to the pointer that will point to the string
     :returns: a SQRESULT
 
 gets a pointer to the string at the idx position in the stack.
@@ -249,7 +249,7 @@ gets a pointer to the string at the idx position in the stack.
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack
-    :param const SQChar ** c: a pointer to the pointer that will point to the string
+    :param SQChar ** c: a pointer to the pointer that will point to the string
     :param SQInteger * size: a pointer to a SQInteger which will receive the size of the string
     :returns: a SQRESULT
 
@@ -260,11 +260,11 @@ gets a pointer to the string at the idx position in the stack; additionally retr
 
 .. _sq_getthread:
 
-.. c:function:: SQRESULT sq_getthread(HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM* v)
+.. c:function:: SQRESULT sq_getthread(HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM* vm)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack
-    :param HSQUIRRELVM* v: A pointer to the variable that will store the thread pointer
+    :param HSQUIRRELVM * vm: A pointer to the variable that will store the thread pointer
     :returns: a SQRESULT
 
 gets a pointer to the thread the idx position in the stack.
@@ -469,7 +469,7 @@ pushes a null value into the stack
 .. c:function:: void sq_pushstring(HSQUIRRELVM v, const SQChar * s, SQInteger len)
 
     :param HSQUIRRELVM v: the target VM
-    :param const SQChar * s: pointer to the string that has to be pushed
+    :param SQChar * s: pointer to the string that has to be pushed
     :param SQInteger len: length of the string pointed by s
     :remarks: if the parameter len is less than 0 the VM will calculate the length using strlen(s)
 
@@ -494,11 +494,11 @@ pushes a userpointer into the stack
 
 .. _sq_setbyhandle:
 
-.. c:function:: SQRESULT sq_setbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
+.. c:function:: SQRESULT sq_setbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: an index in the stack pointing to the class
-    :param HSQMEMBERHANDLE* handle: a pointer the member handle
+    :param HSQMEMBERHANDLE * handle: a pointer the member handle
     :returns: a SQRESULT
 
 pops a value from the stack and sets it to a class or instance member using a member handle (see sq_getmemberhandle)
@@ -557,7 +557,7 @@ sets the userpointer of the class instance at position idx in the stack.
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: index of the target native closure
-    :param const SQChar * name: the name that has to be set
+    :param SQChar * name: the name that has to be set
     :returns: an SQRESULT
 
 sets the name of the native closure at the position idx in the stack. The name of a native closure is purely for debug purposes. The name is retrieved through the function sq_stackinfos() while the closure is in the call stack.
@@ -572,7 +572,7 @@ sets the name of the native closure at the position idx in the stack. The name o
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger nparamscheck: defines the parameters number check policy (0 disables the param checking). If nparamscheck is greater than 0, the VM ensures that the number of parameters is exactly the number specified in nparamscheck (eg. if nparamscheck == 3 the function can only be called with 3 parameters). If nparamscheck is less than 0 the VM ensures that the closure is called with at least the absolute value of the number specified in nparamcheck (eg. nparamscheck == -3 will check that the function is called with at least 3 parameters). The hidden parameter 'this' is included in this number; free variables aren't. If SQ_MATCHTYPEMASKSTRING is passed instead of the number of parameters, the function will automatically infer the number of parameters to check from the typemask (eg. if the typemask is ".sn", it is like passing 3).
-    :param const SQChar * typemask: defines a mask to validate the parametes types passed to the function. If the parameter is NULL, no typechecking is applied (default).
+    :param SQChar * typemask: defines a mask to validate the parametes types passed to the function. If the parameter is NULL, no typechecking is applied (default).
     :remarks: The typemask consists in a zero terminated string that represent the expected parameter type. The types are expressed as follows: 'o' null, 'i' integer, 'f' float, 'n' integer or float, 's' string, 't' table, 'a' array, 'u' userdata, 'c' closure and nativeclosure, 'g' generator, 'p' userpointer, 'v' thread, 'x' instance(class instance), 'y' class, 'b' bool. and '.' any type. The symbol '|' can be used as 'or' to accept multiple types on the same parameter. There isn't any limit on the number of 'or' that can be used. Spaces are ignored so can be inserted between types to increase readability. For instance to check a function that expect a table as 'this' a string as first parameter and a number or a userpointer as second parameter, the string would be "tsn|p" (table,string,number or userpointer). If the parameters mask is contains fewer parameters than 'nparamscheck', the remaining parameters will not be typechecked.
 
 Sets the parameter validation scheme for the native closure at the top position in the stack. Allows you to validate the number of parameters accepted by the function and optionally their types. If the function call does not comply with the parameter schema set by sq_setparamscheck, an exception is thrown.

+ 23 - 23
doc/source/reference/api/raw_object_handling.rst

@@ -6,10 +6,10 @@ Raw object handling
 
 .. _sq_addref:
 
-.. c:function:: void sq_addref(HSQUIRRELVM v, HSQOBJECT* po)
+.. c:function:: void sq_addref(HSQUIRRELVM v, HSQOBJECT * po)
 
     :param HSQUIRRELVM v: the target VM
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
 
 adds a reference to an object handler.
 
@@ -19,10 +19,10 @@ adds a reference to an object handler.
 
 .. _sq_getobjtypetag:
 
-.. c:function:: SQRESULT sq_getobjtypetag(HSQOBJECT* o, SQUserPointer* typetag)
+.. c:function:: SQRESULT sq_getobjtypetag(HSQOBJECT * o, SQUserPointer * typetag)
 
-    :param HSQOBJECT* o: pointer to an object handler
-    :param SQUserPointer* typetag: a pointer to the variable that will store the tag
+    :param HSQOBJECT * o: pointer to an object handler
+    :param SQUserPointer * typetag: a pointer to the variable that will store the tag
     :returns: a SQRESULT
     :remarks: the function works also with instances. if the target object is an instance, the typetag of it's base class is fetched.
 
@@ -34,10 +34,10 @@ gets the typetag of a raw object reference(userdata or class).
 
 .. _sq_getrefcount:
 
-.. c:function:: SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v, HSQOBJECT* po)
+.. c:function:: SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v, HSQOBJECT * po)
 
     :param HSQUIRRELVM v: the target VM
-    :param HSQOBJECT* po: object handler
+    :param HSQOBJECT * po: object handler
 
 returns the number of references of a given object.
 
@@ -47,11 +47,11 @@ returns the number of references of a given object.
 
 .. _sq_getstackobj:
 
-.. c:function:: SQRESULT sq_getstackobj(HSQUIRRELVM v, SQInteger idx, HSQOBJECT* po)
+.. c:function:: SQRESULT sq_getstackobj(HSQUIRRELVM v, SQInteger idx, HSQOBJECT * po)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: index of the target object in the stack
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :returns: a SQRESULT
 
 gets an object from the stack and stores it in a object handler.
@@ -62,9 +62,9 @@ gets an object from the stack and stores it in a object handler.
 
 .. _sq_objtobool:
 
-.. c:function:: SQBool sq_objtobool(HSQOBJECT* po)
+.. c:function:: SQBool sq_objtobool(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: If the object is not a bool will always return false.
 
 return the bool value of a raw object reference.
@@ -75,9 +75,9 @@ return the bool value of a raw object reference.
 
 .. _sq_objtofloat:
 
-.. c:function:: SQFloat sq_objtofloat(HSQOBJECT* po)
+.. c:function:: SQFloat sq_objtofloat(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: If the object is an integer will convert it to float. If the object is not a number will always return 0.
 
 return the float value of a raw object reference.
@@ -88,9 +88,9 @@ return the float value of a raw object reference.
 
 .. _sq_objtointeger:
 
-.. c:function:: SQInteger sq_objtointeger(HSQOBJECT* po)
+.. c:function:: SQInteger sq_objtointeger(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: If the object is a float will convert it to integer. If the object is not a number will always return 0.
 
 return the integer value of a raw object reference.
@@ -101,9 +101,9 @@ return the integer value of a raw object reference.
 
 .. _sq_objtostring:
 
-.. c:function:: const SQChar* sq_objtostring(HSQOBJECT* po)
+.. c:function:: const SQChar* sq_objtostring(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: If the object doesn't reference a string it returns NULL.
 
 return the string value of a raw object reference.
@@ -114,9 +114,9 @@ return the string value of a raw object reference.
 
 .. _sq_objtouserpointer:
 
-.. c:function:: SQUserPointer sq_objtouserpointer(HSQOBJECT* po)
+.. c:function:: SQUserPointer sq_objtouserpointer(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: If the object doesn't reference a userpointer it returns NULL.
 
 return the userpointer value of a raw object reference.
@@ -140,10 +140,10 @@ push an object referenced by an object handler into the stack.
 
 .. _sq_release:
 
-.. c:function:: SQBool sq_release(HSQUIRRELVM v, HSQOBJECT* po)
+.. c:function:: SQBool sq_release(HSQUIRRELVM v, HSQOBJECT * po)
 
     :param HSQUIRRELVM v: the target VM
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :returns: SQTrue if the object handler released has lost all is references(the ones added with sq_addref). SQFalse otherwise.
     :remarks: the function will reset the object handler to null when it loses all references.
 
@@ -155,9 +155,9 @@ remove a reference from an object handler.
 
 .. _sq_resetobject:
 
-.. c:function:: void sq_resetobject(HSQOBJECT* po)
+.. c:function:: void sq_resetobject(HSQOBJECT * po)
 
-    :param HSQOBJECT* po: pointer to an object handler
+    :param HSQOBJECT * po: pointer to an object handler
     :remarks: Every object handler has to be initialized with this function.
 
 resets(initialize) an object handler.

+ 2 - 2
doc/source/reference/api/stack_operations.rst

@@ -99,9 +99,9 @@ ensure that the stack space left is at least of a specified size.If the stack is
 
 .. _sq_settop:
 
-.. c:function:: void sq_settop(HSQUIRRELVM v, SQInteger v)
+.. c:function:: void sq_settop(HSQUIRRELVM v, SQInteger x)
 
     :param HSQUIRRELVM v: the target VM
-    :param SQInteger v: the new top index
+    :param SQInteger x: the new top index
 
 resize the stack. If new top is bigger then the current top the function will push nulls.

+ 1 - 1
doc/source/reference/language/expressions.rst

@@ -258,7 +258,7 @@ Operators precedence
 | ``, (comma operator)``                | lowest    |
 +---------------------------------------+-----------+
 
-.. _table_contructor:
+.. _table_constructor:
 
 -----------------
 Table Constructor

+ 84 - 1
doc/source/reference/language/functions.rst

@@ -166,6 +166,74 @@ When calling 'foo(x,y)' it's assumed you're calling another member of the object
 so should operate on the same object.
 When calling 'mytable.foo(x,y)' it's written plainly that you're calling a member of a different object.
 
+---------------------------------------------
+Raw calls
+---------------------------------------------
+
+.. index::
+    single: Raw calls
+	
+It is possible to call a function overriding the default calling semantics by utilizing the keywork *rawcall*.
+Rawcall allows to invoke a function specifying the *this* object explicitly::
+
+    local retval = rawcall(functionobj,thisobj,parameters);
+
+for example::
+
+    local env = {}
+    function test(a,b) {
+    	return a + b;
+    }
+    local ret = rawcall(test,env,1,2) //passes the table env as 'this' to the function test
+	
+---------------------
+Post-call Initializer
+---------------------
+
+Since version 3.2 Squirrel offers a syntactic sugar to initialize the object returned by a function call(anf class instance creation).
+The post-call initializer has the following syntax::
+
+    function test() {
+        local retval = { x = 0, y = 0};
+        return retval;
+    }
+    local ret1 = test() { x = 10, y = 20 }
+    local ret2 = test() { x = 30, y = 40 }
+    
+that is equivalent to::
+
+    function test() {
+        local retval = { x = 0, y = 0};
+        return retval;
+    }
+    local ret1 = test() { x = 10, y = 20 }
+    ret1.x = 10;
+    ret1.y = 20;
+    local ret2 = test() { x = 30, y = 40 }
+    ret1.x = 30;
+    ret1.y = 40;
+
+this is also usable with classes::
+
+    class vector3 {
+        x = 0;
+        y = 0;
+        z = 0;
+    }
+    local v0 = vector3() { x = 1, y = 2, z = 3 };
+    local v2 = vector3() { x = 4, y = 5, z = 6 };
+
+and can be nested::
+
+    class entity {
+        position = null;
+        direction = null;
+    }
+    local ret = entity() {
+        position = vector3() { x = 1, y = 2, z = 3 }
+        direction = vector3() { x = 0, y = 1, z = 0 }
+    }
+
 ---------------------------------------------
 Binding an environment to a function
 ---------------------------------------------
@@ -175,8 +243,23 @@ Binding an environment to a function
 
 while by default a squirrel function call passes as environment object 'this', the object
 where the function was indexed from. However, is also possible to statically bind an evironment to a
-closure using the built-in method ``closure.bindenv(env_obj)``.
+closure using the following syntax.::
+
+    function test[env_obj](a,b) {
+        return a + b;
+    }
+
+    local test = function[env_obj](a,b) {
+        return a + b;
+    }
+	
+    local function test[env_obj](a,b) {
+        return a + b;
+    }
+
+It is also possible to statically bind an evironment to a closure using the built-in method ``closure.bindenv(env_obj)``.
 The method bindenv() returns a new instance of a closure with the environment bound to it.
+
 When an environment object is bound to a function, every time the function is invoked, its
 'this' parameter will always be the previously bound environent.
 This mechanism is useful to implement callbacks systems similar to C# delegates.

+ 2 - 0
doc/source/reference/language/lexical_structure.rst

@@ -40,6 +40,8 @@ The following words are reserved and cannot be used as identifiers:
 +------------+------------+-----------+------------+------------+-------------+
 | instanceof | true       | false     | static     | __LINE__   | __FILE__    |
 +------------+------------+-----------+------------+------------+-------------+
+| rawcall    |            |           |            |            |             |
++------------+------------+-----------+------------+------------+-------------+
 
 Keywords are covered in detail later in this document.
 

BIN
doc/source/simple_nut.png


+ 2 - 2
doc/source/stdlib/stdbloblib.rst

@@ -181,11 +181,11 @@ C API
 
 .. _sqstd_getblob:
 
-.. c:function:: SQRESULT sqstd_getblob(HSQUIRRELVM v, SQInteger idx, SQUserPointer* ptr)
+.. c:function:: SQRESULT sqstd_getblob(HSQUIRRELVM v, SQInteger idx, SQUserPointer * ptr)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: and index in the stack
-    :param SQUserPointer* ptr: A pointer to the userpointer that will point to the blob's payload
+    :param SQUserPointer * ptr: A pointer to the userpointer that will point to the blob's payload
     :returns: an SQRESULT
 
     retrieve the pointer of a blob's payload from an arbitrary

+ 7 - 7
doc/source/stdlib/stdiolib.rst

@@ -212,7 +212,7 @@ File Object
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger idx: and index in the stack
-    :param SQFILE* file: A pointer to a SQFILE handle that will store the result
+    :param SQFILE * file: A pointer to a SQFILE handle that will store the result
     :returns: an SQRESULT
 
     retrieve the pointer of a stream handle from an arbitrary
@@ -222,10 +222,10 @@ File Object
 Script loading and serialization
 ++++++++++++++++++++++++++++++++
 
-.. c:function:: SQRESULT sqstd_loadfile(HSQUIRRELVM v, const SQChar* filename, SQBool printerror)
+.. c:function:: SQRESULT sqstd_loadfile(HSQUIRRELVM v, const SQChar * filename, SQBool printerror)
 
     :param HSQUIRRELVM v: the target VM
-    :param SQChar* filename: path of the script that has to be loaded
+    :param SQChar * filename: path of the script that has to be loaded
     :param SQBool printerror: if true the compiler error handler will be called if a error occurs
     :returns: an SQRESULT
 
@@ -234,10 +234,10 @@ Script loading and serialization
     UTF8 with and without prefix and UCS-2 prefixed(both big endian an little endian).
     If the source stream is not prefixed UTF8 encoding is used as default.
 
-.. c:function:: SQRESULT sqstd_dofile(HSQUIRRELVM v, const SQChar* filename, SQBool retval, SQBool printerror)
+.. c:function:: SQRESULT sqstd_dofile(HSQUIRRELVM v, const SQChar * filename, SQBool retval, SQBool printerror)
 
     :param HSQUIRRELVM v: the target VM
-    :param SQChar* filename: path of the script that has to be loaded
+    :param SQChar * filename: path of the script that has to be loaded
     :param SQBool retval: if true the function will push the return value of the executed script in the stack.
     :param SQBool printerror: if true the compiler error handler will be called if a error occurs
     :returns: an SQRESULT
@@ -252,10 +252,10 @@ Script loading and serialization
         sq_pushroottable(v); //push the root table(were the globals of the script will are stored)
         sqstd_dofile(v, _SC("test.nut"), SQFalse, SQTrue);// also prints syntax errors if any
 
-.. c:function:: SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v, const SQChar* filename)
+.. c:function:: SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v, const SQChar * filename)
 
     :param HSQUIRRELVM v: the target VM
-    :param SQChar* filename: destination path of serialized closure
+    :param SQChar * filename: destination path of serialized closure
     :returns: an SQRESULT
 
     serializes the closure at the top position in the stack as bytecode in

+ 22 - 22
doc/source/stdlib/stdstringlib.rst

@@ -236,12 +236,12 @@ C API
 Formatting
 +++++++++++++
 
-.. c:function:: SQRESULT sqstd_format(HSQUIRRELVM v, SQInteger nformatstringidx, SQInteger* outlen, SQChar** output)
+.. c:function:: SQRESULT sqstd_format(HSQUIRRELVM v, SQInteger nformatstringidx, SQInteger * outlen, SQChar ** output)
 
     :param HSQUIRRELVM v: the target VM
     :param SQInteger nformatstringidx: index in the stack of the format string
-    :param SQInteger* outlen: a pointer to an integer that will be filled with the length of the newly created string
-    :param SQChar** output: a pointer to a string pointer that will receive the newly created string
+    :param SQInteger * outlen: a pointer to an integer that will be filled with the length of the newly created string
+    :param SQChar ** output: a pointer to a string pointer that will receive the newly created string
     :returns: an SQRESULT
     :remarks: the newly created string is allocated in the scratchpad memory.
 
@@ -254,10 +254,10 @@ Formatting
 Regular Expessions
 ++++++++++++++++++
 
-.. c:function:: SQRex* sqstd_rex_compile(const SQChar *pattern, const SQChar ** error)
+.. c:function:: SQRex* sqstd_rex_compile(const SQChar * pattern, const SQChar ** error)
 
-    :param SQChar* pattern: a pointer to a zero terminated string containing the pattern that has to be compiled.
-    :param SQChar** error: a pointer to a string pointer that will be set with an error string in case of failure.
+    :param SQChar * pattern: a pointer to a zero terminated string containing the pattern that has to be compiled.
+    :param SQChar ** error: a pointer to a string pointer that will be set with an error string in case of failure.
     :returns: a pointer to the compiled pattern
 
     compiles an expression and returns a pointer to the compiled version.
@@ -266,14 +266,14 @@ Regular Expessions
 
 .. c:function:: void sqstd_rex_free(SQRex * exp)
 
-    :param SQRex* exp: the expression structure that has to be deleted.
+    :param SQRex * exp: the expression structure that has to be deleted.
 
     deletes a expression structure created with sqstd_rex_compile()
 
 .. c:function:: SQBool sqstd_rex_match(SQRex * exp,const SQChar * text)
 
-    :param SQRex* exp: a compiled expression
-    :param SQChar* text: the string that has to be tested
+    :param SQRex * exp: a compiled expression
+    :param SQChar * text: the string that has to be tested
     :returns: SQTrue if successful otherwise SQFalse
 
     returns SQTrue if the string specified in the parameter text is an
@@ -281,10 +281,10 @@ Regular Expessions
 
 .. c:function:: SQBool sqstd_rex_search(SQRex * exp, const SQChar * text, const SQChar ** out_begin, const SQChar ** out_end)
 
-    :param SQRex* exp: a compiled expression
-    :param SQChar* text: the string that has to be tested
-    :param SQChar** out_begin: a pointer to a string pointer that will be set with the beginning of the match
-    :param SQChar** out_end: a pointer to a string pointer that will be set with the end of the match
+    :param SQRex * exp: a compiled expression
+    :param SQChar * text: the string that has to be tested
+    :param SQChar ** out_begin: a pointer to a string pointer that will be set with the beginning of the match
+    :param SQChar ** out_end: a pointer to a string pointer that will be set with the end of the match
     :returns: SQTrue if successful otherwise SQFalse
 
     searches the first match of the expression in the string specified in the parameter text.
@@ -293,11 +293,11 @@ Regular Expessions
 
 .. c:function:: SQBool sqstd_rex_searchrange(SQRex * exp, const SQChar * text_begin, const SQChar * text_end, const SQChar ** out_begin, const SQChar ** out_end)
 
-    :param SQRex* exp: a compiled expression
-    :param SQChar* text_begin:  a pointer to the beginnning of the string that has to be tested
-    :param SQChar* text_end: a pointer to the end of the string that has to be tested
-    :param SQChar** out_begin: a pointer to a string pointer that will be set with the beginning of the match
-    :param SQChar** out_end: a pointer to a string pointer that will be set with the end of the match
+    :param SQRex * exp: a compiled expression
+    :param SQChar * text_begin:  a pointer to the beginnning of the string that has to be tested
+    :param SQChar * text_end: a pointer to the end of the string that has to be tested
+    :param SQChar ** out_begin: a pointer to a string pointer that will be set with the beginning of the match
+    :param SQChar ** out_end: a pointer to a string pointer that will be set with the end of the match
     :returns: SQTrue if successful otherwise SQFalse
 
     searches the first match of the expression in the string delimited
@@ -307,16 +307,16 @@ Regular Expessions
 
 .. c:function:: SQInteger sqstd_rex_getsubexpcount(SQRex * exp)
 
-    :param SQRex* exp: a compiled expression
+    :param SQRex * exp: a compiled expression
     :returns: the number of sub expressions matched by the expression
 
     returns the number of sub expressions matched by the expression
 
-.. c:function:: SQBool sqstd_rex_getsubexp(SQRex * exp, SQInteger n, SQRexMatch *subexp)
+.. c:function:: SQBool sqstd_rex_getsubexp(SQRex * exp, SQInteger n, SQRexMatch * subexp)
 
-    :param SQRex* exp: a compiled expression
+    :param SQRex * exp: a compiled expression
     :param SQInteger n: the index of the submatch(0 is the complete match)
-    :param SQRexMatch* a: pointer to structure that will store the result
+    :param SQRexMatch * a: pointer to structure that will store the result
     :returns: the function returns SQTrue if n is a valid index; otherwise SQFalse.
 
     retrieve the begin and and pointer to the length of the sub expression indexed