C API

Squirrel Standard Library 2.2

C API

Initialization

sqstd_register_iolib
parameters:
HSQUIRRELVM v
return:
remarks:

File object

sqstd_createfile
parameters:
HSQUIRRELVM v
SQFILE file
SQBool own
return:
sqstd_getfile
parameters:
HSQUIRRELVM v
SQInteger idx
SQFILE * file
return:

Script loading and serialization

sqstd_loadfile
parameters:
HSQUIRRELVM v
const SQChar * filename
SQBool printerror
return:
sqstd_dofile
parameters:
HSQUIRRELVM v
const SQChar * filename
SQBool retval
SQBool printerror
return:
remarks:
eg.
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 
				
sqstd_writeclosuretofile
parameters:
HSQUIRRELVM v
const SQChar * filename
return: