From 14ac45d285773c77c03a9adcbdf61c9f51788995 Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Sun, 3 Apr 2016 17:48:20 +0200 Subject: [PATCH] Fix minor spelling mistakes --- doc/source/reference/api/object_creation_and_handling.rst | 2 +- sq/sq.c | 2 +- sqstdlib/sqstdaux.cpp | 4 ++-- sqstdlib/sqstdstring.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/reference/api/object_creation_and_handling.rst b/doc/source/reference/api/object_creation_and_handling.rst index a3bb4ed..85daf1b 100644 --- a/doc/source/reference/api/object_creation_and_handling.rst +++ b/doc/source/reference/api/object_creation_and_handling.rst @@ -560,7 +560,7 @@ sets the name of the native closure at the position idx in the stack. the name o :param const SQChar * typemask: defines a mask to validate the parametes types passed to the function. if the parameter is NULL no typechecking is applyed(default). :remarks: The typemask consists in a zero teminated 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 readbility. For instance to check a function that espect 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 less parameters than 'nparamscheck' the remaining parameters will not be typechecked. -Sets the parameters validation scheme for the native closure at the top position in the stack. Allows to validate the number of paramters accepted by the function and optionally their types. If the function call do not comply with the parameter schema set by sq_setparamscheck, an exception is thrown. +Sets the parameters validation scheme for the native closure at the top position in the stack. Allows to validate the number of parameters accepted by the function and optionally their types. If the function call do not comply with the parameter schema set by sq_setparamscheck, an exception is thrown. *.eg* diff --git a/sq/sq.c b/sq/sq.c index be20886..3673293 100644 --- a/sq/sq.c +++ b/sq/sq.c @@ -205,7 +205,7 @@ int getargs(HSQUIRRELVM v,int argc, char* argv[],SQInteger *retval) } } - //if this point is reached an error occured + //if this point is reached an error occurred { const SQChar *err; sq_getlasterror(v); diff --git a/sqstdlib/sqstdaux.cpp b/sqstdlib/sqstdaux.cpp index a2bb729..3c478fc 100644 --- a/sqstdlib/sqstdaux.cpp +++ b/sqstdlib/sqstdaux.cpp @@ -103,10 +103,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v) const SQChar *sErr = 0; if(sq_gettop(v)>=1) { if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) { - pf(v,_SC("\nAN ERROR HAS OCCURED [%s]\n"),sErr); + pf(v,_SC("\nAN ERROR HAS OCCURRED [%s]\n"),sErr); } else{ - pf(v,_SC("\nAN ERROR HAS OCCURED [unknown]\n")); + pf(v,_SC("\nAN ERROR HAS OCCURRED [unknown]\n")); } sqstd_printcallstack(v); } diff --git a/sqstdlib/sqstdstring.cpp b/sqstdlib/sqstdstring.cpp index 6190edd..5b8074b 100644 --- a/sqstdlib/sqstdstring.cpp +++ b/sqstdlib/sqstdstring.cpp @@ -89,7 +89,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen else { n++; if( nparam > sq_gettop(v) ) - return sq_throwerror(v,_SC("not enough paramters for the given format string")); + return sq_throwerror(v,_SC("not enough parameters for the given format string")); n = validate_format(v,fmt,format,n,w); if(n < 0) return -1; SQInteger addlen = 0;