Code::Blocks  SVN r11506
Macros | Functions | Variables
sqstdsystem.cpp File Reference
#include <squirrel.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <sqstdsystem.h>
Include dependency graph for sqstdsystem.cpp:

Go to the source code of this file.

Macros

#define scgetenv   getenv
 
#define scsystem   system
 
#define scasctime   asctime
 
#define scremove   remove
 
#define screname   rename
 
#define _DECL_FUNC(name, nparams, pmask)   {_SC(#name),_system_##name,nparams,pmask}
 

Functions

static SQInteger _system_getenv (HSQUIRRELVM v)
 
static SQInteger _system_system (HSQUIRRELVM v)
 
static SQInteger _system_clock (HSQUIRRELVM v)
 
static SQInteger _system_time (HSQUIRRELVM v)
 
static SQInteger _system_remove (HSQUIRRELVM v)
 
static SQInteger _system_rename (HSQUIRRELVM v)
 
static void _set_integer_slot (HSQUIRRELVM v, const SQChar *name, SQInteger val)
 
static SQInteger _system_date (HSQUIRRELVM v)
 
SQInteger sqstd_register_systemlib (HSQUIRRELVM v)
 

Variables

static SQRegFunction systemlib_funcs []
 

Macro Definition Documentation

◆ _DECL_FUNC

#define _DECL_FUNC (   name,
  nparams,
  pmask 
)    {_SC(#name),_system_##name,nparams,pmask}

Definition at line 121 of file sqstdsystem.cpp.

◆ scasctime

#define scasctime   asctime

Definition at line 18 of file sqstdsystem.cpp.

◆ scgetenv

#define scgetenv   getenv

Definition at line 16 of file sqstdsystem.cpp.

Referenced by _system_getenv().

◆ scremove

#define scremove   remove

Definition at line 19 of file sqstdsystem.cpp.

Referenced by _system_remove().

◆ screname

#define screname   rename

Definition at line 20 of file sqstdsystem.cpp.

Referenced by _system_rename().

◆ scsystem

#define scsystem   system

Definition at line 17 of file sqstdsystem.cpp.

Referenced by _system_system().

Function Documentation

◆ _set_integer_slot()

static void _set_integer_slot ( HSQUIRRELVM  v,
const SQChar name,
SQInteger  val 
)
static

Definition at line 78 of file sqstdsystem.cpp.

References sq_pushinteger(), sq_pushstring(), and sq_rawset().

Referenced by _system_date().

◆ _system_clock()

static SQInteger _system_clock ( HSQUIRRELVM  v)
static

Definition at line 45 of file sqstdsystem.cpp.

References sq_pushfloat().

◆ _system_date()

static SQInteger _system_date ( HSQUIRRELVM  v)
static

◆ _system_getenv()

static SQInteger _system_getenv ( HSQUIRRELVM  v)
static

Definition at line 23 of file sqstdsystem.cpp.

References scgetenv, sq_getstring(), and sq_pushstring().

◆ _system_remove()

static SQInteger _system_remove ( HSQUIRRELVM  v)
static

Definition at line 59 of file sqstdsystem.cpp.

References scremove, sq_getstring(), and sq_throwerror().

◆ _system_rename()

static SQInteger _system_rename ( HSQUIRRELVM  v)
static

Definition at line 68 of file sqstdsystem.cpp.

References screname, sq_getstring(), and sq_throwerror().

◆ _system_system()

static SQInteger _system_system ( HSQUIRRELVM  v)
static

Definition at line 34 of file sqstdsystem.cpp.

References scsystem, sq_getstring(), sq_pushinteger(), and sq_throwerror().

◆ _system_time()

static SQInteger _system_time ( HSQUIRRELVM  v)
static

Definition at line 51 of file sqstdsystem.cpp.

References sq_pushinteger().

◆ sqstd_register_systemlib()

SQInteger sqstd_register_systemlib ( HSQUIRRELVM  v)

Variable Documentation

◆ systemlib_funcs

SQRegFunction systemlib_funcs[]
static
Initial value:
={
_DECL_FUNC(getenv,2,_SC(".s")),
_DECL_FUNC(system,2,_SC(".s")),
_DECL_FUNC(clock,1,NULL),
_DECL_FUNC(time,1,NULL),
_DECL_FUNC(date,-1,_SC(".nn")),
_DECL_FUNC(remove,2,_SC(".s")),
_DECL_FUNC(rename,3,_SC(".ss")),
{0,0}
}
#define _DECL_FUNC(name, nparams, pmask)
#define NULL
Definition: prefix.cpp:59

Definition at line 122 of file sqstdsystem.cpp.

Referenced by sqstd_register_systemlib().