xine-lib: xine-lib-1.2.13/src/post/goom/goomsl.h File Reference

xine-lib 1.2.13-20230125hg15249

Macros | Typedefs | Functions
goomsl.h File Reference
`#include "goomsl_hash.h"`

Go to the source code of this file.

## Macros
#define | GSL_LOCAL_PTR(gsl, local, name) gsl_get_ptr(gsl, *(int*)goom_hash_get(local,name)->ptr)
#define | GSL_LOCAL_INT(gsl, local, name) (*(int*)goom_hash_get(local,name)->ptr)
#define | GSL_LOCAL_FLOAT(gsl, local, name) (*(float*)goom_hash_get(local,name)->ptr)
#define | GSL_GLOBAL_PTR(gsl, name) gsl_get_ptr(gsl, *(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
#define | GSL_GLOBAL_INT(gsl, name) (*(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
#define | GSL_GLOBAL_FLOAT(gsl, name) (*(float*)goom_hash_get(gsl_globals(gsl),name)->ptr)

## Typedefs
typedef struct _GoomSL | GoomSL
typedef void(* | GoomSL_ExternalFunction) (GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars)

## Functions
GoomSL * | gsl_new (void)
void | gsl_free (GoomSL *gss)
char * | gsl_init_buffer (const char *file_name)
void | gsl_append_file_to_buffer (const char *file_name, char **buffer)
void | gsl_compile (GoomSL *scanner, const char *script)
void | gsl_execute (GoomSL *scanner)
int | gsl_is_compiled (GoomSL *gss)
void | gsl_bind_function (GoomSL *gss, const char *fname, GoomSL_ExternalFunction func)
int | gsl_malloc (GoomSL *_this, int size)
void * | gsl_get_ptr (GoomSL *_this, int id)
void | gsl_free_ptr (GoomSL *_this, int id)
GoomHash * | gsl_globals (GoomSL *_this)

## Macro Definition Documentation

## ◆ GSL_GLOBAL_FLOAT

#define GSL_GLOBAL_FLOAT | ( |  | gsl,
|  |  | name ) (*(float*)goom_hash_get(gsl_globals(gsl),name)->ptr)

Referenced by ext_i2f().

## ◆ GSL_GLOBAL_INT

#define GSL_GLOBAL_INT | ( |  | gsl,
|  |  | name ) (*(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)

Referenced by ext_charAt(), and ext_f2i().

## ◆ GSL_GLOBAL_PTR

#define GSL_GLOBAL_PTR | ( |  | gsl,
|  |  | name ) gsl_get_ptr(gsl, *(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)

## ◆ GSL_LOCAL_FLOAT

#define GSL_LOCAL_FLOAT | ( |  | gsl,
|  |  | local,
|  |  | name ) (*(float*)goom_hash_get(local,name)->ptr)

Referenced by ext_f2i().

## ◆ GSL_LOCAL_INT

#define GSL_LOCAL_INT | ( |  | gsl,
|  |  | local,
|  |  | name ) (*(int*)goom_hash_get(local,name)->ptr)

Referenced by ext_charAt(), and ext_i2f().

## ◆ GSL_LOCAL_PTR

#define GSL_LOCAL_PTR | ( |  | gsl,
|  |  | local,
|  |  | name ) gsl_get_ptr(gsl, *(int*)goom_hash_get(local,name)->ptr)

Referenced by ext_charAt().

## Typedef Documentation

## ◆ GoomSL

typedef struct _GoomSL GoomSL

## ◆ GoomSL_ExternalFunction

typedef void(* GoomSL_ExternalFunction) (GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars)

## Function Documentation

## ◆ gsl_append_file_to_buffer()

void gsl_append_file_to_buffer | ( | const char * | file_name,
|  | char ** | buffer )

References gsl_already_imported, gsl_append_file_to_buffer(), gsl_nb_import, and gsl_read_file().

Referenced by gsl_append_file_to_buffer(), and gsl_init_buffer().

## ◆ gsl_bind_function()

void gsl_bind_function | ( | GoomSL * | gss,
|  | const char * | fname,
|  | GoomSL_ExternalFunction | func )

References _ExternalFunctionStruct::function, _GoomSL::functions, goom_hash_get(), and HashValue::ptr.

Referenced by gsl_compile().

## ◆ gsl_compile()

void gsl_compile | ( | GoomSL * | scanner,
|  | const char * | script )

References calculate_labels(), currentGoomSL, ext_charAt(), ext_f2i(), ext_i2f(), gsl_bind_function(), gsl_commit_compilation(), gsl_create_fast_iflow(), _GoomSL::iflow, _GoomSL::num_lines, _INSTRUCTION_FLOW::number, reset_scanner(), yy_scan_string(), and yyparse().

## ◆ gsl_execute()

void gsl_execute | ( | GoomSL * | scanner | ) |

References _GoomSL::compilationOK, _GoomSL::fastiflow, and iflow_execute().

## ◆ gsl_free()

void gsl_free | ( | GoomSL * | gss | ) |

References _GoomSL::data_heap, _GoomSL::functions, goom_hash_free(), goom_heap_delete(), _GoomSL::gsl_struct, _GoomSL::iflow, iflow_free(), _GoomSL::ptrArray, _GoomSL::structIDS, and _GoomSL::vars.

## ◆ gsl_free_ptr()

void gsl_free_ptr | ( | GoomSL * | _this,
|  | int | id )

References _GoomSL::ptrArray.

## ◆ gsl_get_ptr()

void * gsl_get_ptr | ( | GoomSL * | _this,
|  | int | id )

References NULL, and _GoomSL::ptrArray.

## ◆ gsl_globals()

GoomHash * gsl_globals | ( | GoomSL * | _this | ) |

References _GoomSL::vars.

## ◆ gsl_init_buffer()

char * gsl_init_buffer | ( | const char * | file_name | ) |

References gsl_append_file_to_buffer(), and gsl_nb_import.

## ◆ gsl_is_compiled()

int gsl_is_compiled | ( | GoomSL * | gss | ) |

References _GoomSL::compilationOK.

## ◆ gsl_malloc()

int gsl_malloc | ( | GoomSL * | _this,
|  | int | size )

References _GoomSL::nbPtr, _GoomSL::ptrArray, and _GoomSL::ptrArraySize.

Referenced by yylex().

## ◆ gsl_new()

GoomSL * gsl_new | ( | void |  | ) |

References _GoomSL::compilationOK, _GoomSL::currentNS, _GoomSL::data_heap, _GoomSL::functions, goom_hash_new(), goom_heap_new(), _GoomSL::gsl_struct, _GoomSL::gsl_struct_size, _GoomSL::iflow, iflow_new(), _GoomSL::namespaces, _GoomSL::nbPtr, _GoomSL::nbStructID, NULL, _GoomSL::ptrArray, _GoomSL::ptrArraySize, reset_scanner(), _GoomSL::structIDS, and _GoomSL::vars.