Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/amx/amx.h File Reference

Go to the source code of this file.

Compounds

struct  __amx
struct  __amx_header
struct  AMX_FUNCSTUB
struct  AMX_NATIVE_INFO

Defines

#define MIN_FILE_VERSION   6
#define CUR_FILE_VERSION   6
#define AMX_USERNUM   4
#define sEXPMAX   30
#define AMX_MAGIC   0xf1e0
#define AMX_FLAG_CHAR16   0x01
#define AMX_FLAG_DEBUG   0x02
#define AMX_FLAG_COMPACT   0x04
#define AMX_FLAG_BIGENDIAN   0x08
#define AMX_FLAG_BROWSE   0x4000
#define AMX_FLAG_RELOC   0x8000
#define AMX_EXEC_MAIN   -1
#define AMX_EXEC_CONT   -2
#define AMX_USERTAG(a, b, c, d)   ((a) | ((b)<<8) | ((long)(c)<<16) | ((long)(d)<<24))

Typedefs

typedef short int int16_t
typedef unsigned short int uint16_t
typedef long int int32_t
typedef unsigned long int uint32_t
typedef uint32_t ucell
typedef int32_t cell
typedef cell(* AMX_NATIVE )(struct __amx *amx, cell *params)
typedef int(* AMX_CALLBACK )(struct __amx *amx, cell index, cell *result, cell *params)
typedef int(* AMX_DEBUG )(struct __amx *amx)
typedef __amx AMX
typedef __amx_header AMX_HEADER

Enumerations

enum  {
  AMX_ERR_NONE, AMX_ERR_EXIT, AMX_ERR_ASSERT, AMX_ERR_STACKERR,
  AMX_ERR_BOUNDS, AMX_ERR_MEMACCESS, AMX_ERR_INVINSTR, AMX_ERR_STACKLOW,
  AMX_ERR_HEAPLOW, AMX_ERR_CALLBACK, AMX_ERR_NATIVE, AMX_ERR_DIVIDE,
  AMX_ERR_SLEEP, AMX_ERR_MEMORY = 16, AMX_ERR_FORMAT, AMX_ERR_VERSION,
  AMX_ERR_NOTFOUND, AMX_ERR_INDEX, AMX_ERR_DEBUG, AMX_ERR_INIT,
  AMX_ERR_USERDATA, AMX_ERR_INIT_JIT, AMX_ERR_PARAMS
}
enum  {
  DBG_INIT, DBG_FILE, DBG_LINE, DBG_SYMBOL,
  DBG_CLRSYM, DBG_CALL, DBG_RETURN, DBG_TERMINATE,
  DBG_SRANGE
}

Functions

uint16_tamx_Align16 (uint16_t *v)
uint32_tamx_Align32 (uint32_t *v)
int amx_Allot (AMX *amx, int cells, cell *amx_addr, cell **phys_addr)
int amx_Callback (AMX *amx, cell index, cell *result, cell *params)
int amx_Clone (AMX *amxClone, AMX *amxSource, void *data)
int amx_Debug (AMX *amx)
int amx_Exec (AMX *amx, cell *retval, int index, int numparams,...)
int amx_Execv (AMX *amx, cell *retval, int index, int numparams, cell params[])
int amx_FindPublic (AMX *amx, char *funcname, int *index)
int amx_FindPubVar (AMX *amx, char *varname, cell *amx_addr)
int amx_FindTagId (AMX *amx, cell tag_id, char *tagname)
int amx_Flags (AMX *amx, uint16_t *flags)
int amx_GetAddr (AMX *amx, cell amx_addr, cell **phys_addr)
int amx_GetPublic (AMX *amx, int index, char *funcname)
int amx_GetPubVar (AMX *amx, int index, char *varname, cell *amx_addr)
int amx_GetString (char *dest, cell *source)
int amx_GetTag (AMX *amx, int index, char *tagname, cell *tag_id)
int amx_GetUserData (AMX *amx, long tag, void **ptr)
int amx_Init (AMX *amx, void *program)
int amx_InitJIT (AMX *amx, void *reloc_table, void *native_code)
int amx_MemInfo (AMX *amx, long *codesize, long *datasize, long *stackheap)
int amx_NameLength (AMX *amx, int *length)
AMX_NATIVE_INFOamx_NativeInfo (char *name, AMX_NATIVE func)
int amx_NumPublics (AMX *amx, int *number)
int amx_NumPubVars (AMX *amx, int *number)
int amx_NumTags (AMX *amx, int *number)
int amx_RaiseError (AMX *amx, int error)
int amx_Register (AMX *amx, AMX_NATIVE_INFO *nativelist, int number)
int amx_Release (AMX *amx, cell amx_addr)
int amx_SetCallback (AMX *amx, AMX_CALLBACK callback)
int amx_SetDebugHook (AMX *amx, AMX_DEBUG debug)
int amx_SetString (cell *dest, char *source, int pack)
int amx_SetUserData (AMX *amx, long tag, void *ptr)
int amx_StrLen (cell *cstring, int *length)
char * amx_FindFunctionbyIndex (AMX *amx, int index)

Variables

const char amx_errMsg [30][50]


Define Documentation

#define AMX_EXEC_CONT   -2
 

#define AMX_EXEC_MAIN   -1
 

#define AMX_FLAG_BIGENDIAN   0x08
 

#define AMX_FLAG_BROWSE   0x4000
 

#define AMX_FLAG_CHAR16   0x01
 

#define AMX_FLAG_COMPACT   0x04
 

#define AMX_FLAG_DEBUG   0x02
 

#define AMX_FLAG_RELOC   0x8000
 

#define AMX_MAGIC   0xf1e0
 

#define AMX_USERNUM   4
 

#define AMX_USERTAG a,
b,
c,
     ((a) | ((b)<<8) | ((long)(c)<<16) | ((long)(d)<<24))
 

#define CUR_FILE_VERSION   6
 

#define MIN_FILE_VERSION   6
 

#define sEXPMAX   30
 


Typedef Documentation

typedef struct __amx AMX
 

typedef int( * AMX_CALLBACK)(struct __amx *amx, cell index, cell *result, cell *params)
 

typedef int( * AMX_DEBUG)(struct __amx *amx)
 

typedef struct __amx_header AMX_HEADER
 

typedef cell( * AMX_NATIVE)(struct __amx *amx, cell *params)
 

typedef int32_t cell
 

typedef short int int16_t
 

typedef long int int32_t
 

typedef uint32_t ucell
 

typedef unsigned short int uint16_t
 

typedef unsigned long int uint32_t
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
AMX_ERR_NONE 
AMX_ERR_EXIT 
AMX_ERR_ASSERT 
AMX_ERR_STACKERR 
AMX_ERR_BOUNDS 
AMX_ERR_MEMACCESS 
AMX_ERR_INVINSTR 
AMX_ERR_STACKLOW 
AMX_ERR_HEAPLOW 
AMX_ERR_CALLBACK 
AMX_ERR_NATIVE 
AMX_ERR_DIVIDE 
AMX_ERR_SLEEP 
AMX_ERR_MEMORY 
AMX_ERR_FORMAT 
AMX_ERR_VERSION 
AMX_ERR_NOTFOUND 
AMX_ERR_INDEX 
AMX_ERR_DEBUG 
AMX_ERR_INIT 
AMX_ERR_USERDATA 
AMX_ERR_INIT_JIT 
AMX_ERR_PARAMS 

anonymous enum
 

Enumeration values:
DBG_INIT 
DBG_FILE 
DBG_LINE 
DBG_SYMBOL 
DBG_CLRSYM 
DBG_CALL 
DBG_RETURN 
DBG_TERMINATE 
DBG_SRANGE 


Function Documentation

uint16_t* amx_Align16 uint16_t   v
 

uint32_t* amx_Align32 uint32_t   v
 

int amx_Allot AMX   amx,
int    cells,
cell   amx_addr,
cell **    phys_addr
 

int amx_Callback AMX   amx,
cell    index,
cell   result,
cell   params
 

int amx_Clone AMX   amxClone,
AMX   amxSource,
void *    data
 

int amx_Debug AMX   amx
 

int amx_Exec AMX   amx,
cell   retval,
int    index,
int    numparams,
...   
 

int amx_Execv AMX   amx,
cell   retval,
int    index,
int    numparams,
cell    params[]
 

char* amx_FindFunctionbyIndex AMX   amx,
int    index
 

int amx_FindPublic AMX   amx,
char *    funcname,
int *    index
 

int amx_FindPubVar AMX   amx,
char *    varname,
cell   amx_addr
 

int amx_FindTagId AMX   amx,
cell    tag_id,
char *    tagname
 

int amx_Flags AMX   amx,
uint16_t   flags
 

int amx_GetAddr AMX   amx,
cell    amx_addr,
cell **    phys_addr
 

int amx_GetPublic AMX   amx,
int    index,
char *    funcname
 

int amx_GetPubVar AMX   amx,
int    index,
char *    varname,
cell   amx_addr
 

int amx_GetString char *    dest,
cell   source
 

int amx_GetTag AMX   amx,
int    index,
char *    tagname,
cell   tag_id
 

int amx_GetUserData AMX   amx,
long    tag,
void **    ptr
 

int amx_Init AMX   amx,
void *    program
 

int amx_InitJIT AMX   amx,
void *    reloc_table,
void *    native_code
 

int amx_MemInfo AMX   amx,
long *    codesize,
long *    datasize,
long *    stackheap
 

int amx_NameLength AMX   amx,
int *    length
 

AMX_NATIVE_INFO* amx_NativeInfo char *    name,
AMX_NATIVE    func
 

int amx_NumPublics AMX   amx,
int *    number
 

int amx_NumPubVars AMX   amx,
int *    number
 

int amx_NumTags AMX   amx,
int *    number
 

int amx_RaiseError AMX   amx,
int    error
 

int amx_Register AMX   amx,
AMX_NATIVE_INFO   nativelist,
int    number
 

int amx_Release AMX   amx,
cell    amx_addr
 

int amx_SetCallback AMX   amx,
AMX_CALLBACK    callback
 

int amx_SetDebugHook AMX   amx,
AMX_DEBUG    debug
 

int amx_SetString cell   dest,
char *    source,
int    pack
 

int amx_SetUserData AMX   amx,
long    tag,
void *    ptr
 

int amx_StrLen cell   cstring,
int *    length
 


Variable Documentation

const char amx_errMsg[30][50] [static]
 

Initial value:

 {
        "No error", "forced exit", "assertion failed", "stack/heap collision", "index out of bounds", "invalid memory access", "invalid instruction", "stack underflow",
        "heap underflow", "no callback, or invalid callback", "native function failed", "divide by zero", "go into sleepmode - code can be restarted", "", ""
        , "",""
        "out of memory", "invalid file format", "file is for a newer version of the AMX", "function not found", "invalid index parameter (bad entry point)",
        "debugger cannot run", "AMX not initialized (or doubly initialized)", "unable to set user data field (table full)", "cannot initialize the JIT", 
        "parameter error", "", "", "", }
SourceForge.net Logo