Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

eval.cc File Reference

#include "evaltype.h"
#include "evalparse.h"
#include "eval.h"
#include "snprintf.h"

Go to the source code of this file.

Defines

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define EVALFUNC_FMATH1(name)
#define EVALFUNC_FMATH1i(name)
#define EVALFUNC_FMATH2(name)

Functions

qword f2i (double f)
void set_helpmode (int flag, char *name)
char * binstr2cstr (char *s, int len)
int bin2str (char *result, void *S, int len)
void clear_eval_error ()
int get_eval_error (char **str, int *pos)
void set_eval_error (char *format,...)
void set_eval_error_ex (int pos, char *format,...)
void string_destroy (eval_str *s)
void scalarlist_set (eval_scalarlist *l, eval_scalar *s)
void scalarlist_concat (eval_scalarlist *l, eval_scalarlist *a, eval_scalarlist *b)
void scalarlist_destroy (eval_scalarlist *l)
void scalarlist_destroy_gentle (eval_scalarlist *l)
void scalar_setint (eval_scalar *s, eval_int *i)
void scalar_setstr (eval_scalar *s, eval_str *t)
void scalar_create_int (eval_scalar *s, const eval_int *t)
void scalar_create_int_c (eval_scalar *s, const int i)
void scalar_create_int_q (eval_scalar *s, const qword q)
void scalar_create_str (eval_scalar *s, const eval_str *t)
void scalar_create_str_c (eval_scalar *s, const char *cstr)
void scalar_create_float (eval_scalar *s, const eval_float *t)
void scalar_create_float_c (eval_scalar *s, const double f)
void scalar_context_str (const eval_scalar *s, eval_str *t)
void scalar_context_int (const eval_scalar *s, eval_int *t)
void scalar_context_float (const eval_scalar *s, eval_float *t)
void string_concat (eval_str *s, eval_str *a, eval_str *b)
void scalar_clone (eval_scalar *result, const eval_scalar *s)
void scalar_concat (eval_scalar *s, const eval_scalar *a, const eval_scalar *b)
void scalar_destroy (eval_scalar *s)
int string_compare (const eval_str *a, const eval_str *b)
int scalar_strop (eval_scalar *xr, const eval_scalar *xa, const eval_scalar *xb, int op)
int scalar_float_op (eval_scalar *xr, const eval_scalar *xa, const eval_scalar *xb, int op)
int scalar_int_op (eval_scalar *xr, const eval_scalar *xa, const eval_scalar *xb, int op)
int scalar_op (eval_scalar *xr, eval_scalar *xa, eval_scalar *xb, int op)
void scalar_negset (eval_scalar *xr, eval_scalar *xa)
void scalar_notset (eval_scalar *xr, eval_scalar *xa)
void scalar_lnotset (eval_scalar *xr, eval_scalar *xa)
void scalar_miniif (eval_scalar *xr, eval_scalar *xa, eval_scalar *xb, eval_scalar *xc)
int func_typeof (eval_scalar *r, eval_scalar *s)
int func_is_int (eval_scalar *r, eval_scalar *s)
int func_is_string (eval_scalar *r, eval_scalar *s)
int func_is_float (eval_scalar *r, eval_scalar *s)
int func_char (eval_scalar *r, eval_int *i)
int func_byte (eval_scalar *r, eval_int *i)
int func_word (eval_scalar *r, eval_int *i)
int func_dword (eval_scalar *r, eval_int *i)
int func_sbyte (eval_scalar *r, eval_int *i)
int func_short (eval_scalar *r, eval_int *i)
int func_long (eval_scalar *r, eval_int *i)
int func_float (eval_scalar *r, eval_float *p)
int func_fmax (eval_scalar *r, eval_float *p1, eval_float *p2)
int func_fmin (eval_scalar *r, eval_float *p1, eval_float *p2)
int func_int (eval_scalar *r, eval_int *p)
int func_ord (eval_scalar *r, eval_str *s)
int func_max (eval_scalar *r, eval_int *p1, eval_int *p2)
int func_min (eval_scalar *r, eval_int *p1, eval_int *p2)
int func_random (eval_scalar *r, eval_int *p1)
int func_rnd (eval_scalar *r)
int func_round (eval_scalar *r, eval_float *p)
int func_strchr (eval_scalar *r, eval_str *p1, eval_str *p2)
int func_strcmp (eval_scalar *r, eval_str *p1, eval_str *p2)
int func_string (eval_scalar *r, eval_str *p)
int func_strlen (eval_scalar *r, eval_str *p1)
int func_strncmp (eval_scalar *r, eval_str *p1, eval_str *p2, eval_int *p3)
int func_strrchr (eval_scalar *r, eval_str *p1, eval_str *p2)
int func_strstr (eval_scalar *r, eval_str *p1, eval_str *p2)
int func_substr (eval_scalar *r, eval_str *p1, eval_int *p2, eval_int *p3)
int func_trunc (eval_scalar *r, eval_float *p)
 EVALFUNC_FMATH1i (ceil) EVALFUNC_FMATH1i(floor) void sprintf_puts(char **b
eval_protomatch match_evalfunc_proto (char *name, eval_scalarlist *params, eval_func *proto)
int exec_evalfunc (eval_scalar *r, eval_scalarlist *params, eval_func *proto)
int evalsymbol (eval_scalar *r, char *sname)
int std_eval_func_handler (eval_scalar *result, char *fname, eval_scalarlist *params, eval_func *protos)
int evalfunc (eval_scalar *r, char *fname, eval_scalarlist *params)
void * eval_get_context ()
void eval_set_context (void *context)
void eval_set_func_handler (eval_func_handler func_handler)
void eval_set_symbol_handler (eval_symbol_handler symbol_handler)

Variables

char * blimit


Define Documentation

#define EVALFUNC_FMATH1 name   ) 
 

Value:

int func_##name(eval_scalar *r, eval_float *p)\
{\
        r->type=SCALAR_FLOAT;\
        r->scalar.floatnum.value=name(p->value);\
        return 1;\
}

Definition at line 968 of file eval.cc.

#define EVALFUNC_FMATH1i name   ) 
 

Value:

int func_##name(eval_scalar *r, eval_float *p)\
{\
        r->type=SCALAR_INT;\
        r->scalar.integer.value=f2i(name(p->value));\
        r->scalar.integer.type=TYPE_UNKNOWN;\
        return 1;\
}

Definition at line 975 of file eval.cc.

#define EVALFUNC_FMATH2 name   ) 
 

Value:

int func_##name(eval_scalar *r, eval_float *p1, eval_float *p2)\
{\
        r->type=SCALAR_FLOAT;\
        r->scalar.floatnum.value=name(p1->value, p2->value);\
        return 1;\
}

Definition at line 983 of file eval.cc.

#define MAX a,
 )     ((a) > (b) ? (a) : (b))
 

Definition at line 33 of file eval.cc.

Referenced by XBEAnalyser::beginAnalysis(), PEAnalyser::beginAnalysis(), NEAnalyser::beginAnalysis(), CoffAnalyser::beginAnalysis(), ht_text_viewer::config_changed(), ht_app::get_stdbounds_tool(), ht_static_context_menu::insert_entry(), LE_addr_to_segment(), ht_pe::loc_enum_next(), msgbox(), NE_addr_to_segment(), pe_rva_is_valid(), pe_rva_to_section(), ht_uformat_viewer::ref_flags(), xbe_rva_is_valid(), and xbe_rva_to_section().

#define MIN a,
 )     ((a) < (b) ? (a) : (b))
 

Definition at line 32 of file eval.cc.

Referenced by XBEAnalyser::beginAnalysis(), PEAnalyser::beginAnalysis(), NEAnalyser::beginAnalysis(), CoffAnalyser::beginAnalysis(), blockop_dialog(), clipboard_paste(), ht_text_viewer::config_changed(), Analyser::dataAccess(), ht_aviewer::dataStringDialog(), Analyser::doBranch(), export_to_sym(), ht_stdio_file::extend(), ht_sys_file::extend(), func_strcmp(), func_substr(), generate_html_output(), AnalyserOutput::generateAddr(), ht_hex_viewer::get_vscrollbar_pos(), ht_disasm_viewer::get_vscrollbar_pos(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_hex_sub::getline(), ht_disasm_sub::getline(), AnalyserOutput::getLineString(), ht_info_lexer::gettoken(), ht_strinputfield::handlemsg(), ht_strndup(), ht_vsnprintf(), ht_search_dialog::init(), NE_addr_is_physical(), NE_addr_to_ofs(), ht_disasm_sub::next_line_id(), pe_section_name_to_section(), ht_ltextfile::read(), ht_reloc_file::read(), ht_le::read_objects(), sys_read_data_from_native_clipboard(), ht_listbox::update(), ht_reloc_file::write(), and AnalyserOutput::write().


Function Documentation

int bin2str char *  result,
void *  S,
int  len
 

Definition at line 135 of file eval.cc.

References len, and S.

char* binstr2cstr char *  s,
int  len
 

Definition at line 127 of file eval.cc.

References len, and malloc().

Referenced by scalar_context_float(), and scalar_context_int().

void clear_eval_error  ) 
 

Definition at line 155 of file eval.cc.

Referenced by eval().

void* eval_get_context  ) 
 

Definition at line 1565 of file eval.cc.

Referenced by ht_linear_func_readbyte(), ht_linear_func_readstring(), and ht_linear_sub_symbol_handler().

void eval_set_context void *  context  ) 
 

Definition at line 1570 of file eval.cc.

Referenced by eval().

void eval_set_func_handler eval_func_handler  func_handler  ) 
 

Definition at line 1575 of file eval.cc.

References eval_func_handler.

Referenced by eval().

void eval_set_symbol_handler eval_symbol_handler  symbol_handler  ) 
 

Definition at line 1580 of file eval.cc.

References eval_symbol_handler.

Referenced by eval().

int evalfunc eval_scalar r,
char *  fname,
eval_scalarlist params
 

Definition at line 1541 of file eval.cc.

References get_eval_error(), MAX_FUNCNAME_LEN, NULL, set_eval_error(), and std_eval_func_handler().

Referenced by yyparse().

EVALFUNC_FMATH1i ceil   ) 
 

int evalsymbol eval_scalar r,
char *  sname
 

Definition at line 1448 of file eval.cc.

References get_eval_error(), MAX_SYMBOLNAME_LEN, NULL, and set_eval_error().

Referenced by yyparse().

int exec_evalfunc eval_scalar r,
eval_scalarlist params,
eval_func proto
 

Definition at line 1329 of file eval.cc.

References eval_scalarlist::count, DEBUG_DUMP, DEBUG_DUMP_INDENT_IN, DEBUG_DUMP_INDENT_OUT, DEBUG_DUMP_SCALAR, DEBUG_DUMP_SCALARLIST, eval_scalarbody::floatnum, eval_func::func, get_eval_error(), int(), eval_scalarbody::integer, malloc(), MAX_ERRSTR_LEN, MAX_EVALFUNC_PARAMS, eval_func::name, NULL, eval_func::ptype, eval_scalar::scalar, SCALAR_ANY, scalar_clone(), scalar_context_float(), scalar_context_int(), scalar_context_str(), scalar_destroy(), SCALAR_FLOAT, SCALAR_INT, SCALAR_NULL, SCALAR_STR, SCALAR_VARARGS, scalarlist_destroy_gentle(), eval_scalarlist::scalars, set_eval_error(), set_eval_error_ex(), eval_scalarbody::str, and eval_scalar::type.

Referenced by std_eval_func_handler().

qword f2i double  f  ) 
 

Definition at line 46 of file eval.cc.

References qword.

Referenced by func_round(), func_trunc(), and scalar_context_int().

int func_byte eval_scalar r,
eval_int i
 

Definition at line 768 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_c(), UINT, and eval_int::value.

int func_char eval_scalar r,
eval_int i
 

Definition at line 758 of file eval.cc.

References eval_str::len, QWORD_GET_LO, scalar_create_str(), eval_str::value, and eval_int::value.

int func_dword eval_scalar r,
eval_int i
 

Definition at line 782 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_q(), UINT, and eval_int::value.

int func_float eval_scalar r,
eval_float p
 

Definition at line 810 of file eval.cc.

References scalar_create_float().

int func_fmax eval_scalar r,
eval_float p1,
eval_float p2
 

Definition at line 816 of file eval.cc.

References eval_scalarbody::floatnum, eval_scalar::scalar, SCALAR_FLOAT, eval_scalar::type, and eval_float::value.

int func_fmin eval_scalar r,
eval_float p1,
eval_float p2
 

Definition at line 823 of file eval.cc.

References eval_scalarbody::floatnum, eval_scalar::scalar, SCALAR_FLOAT, eval_scalar::type, and eval_float::value.

int func_int eval_scalar r,
eval_int p
 

Definition at line 830 of file eval.cc.

References scalar_create_int().

int func_is_float eval_scalar r,
eval_scalar s
 

Definition at line 748 of file eval.cc.

References scalar_create_int_c(), SCALAR_FLOAT, and eval_scalar::type.

int func_is_int eval_scalar r,
eval_scalar s
 

Definition at line 728 of file eval.cc.

References scalar_create_int_c(), SCALAR_INT, and eval_scalar::type.

int func_is_string eval_scalar r,
eval_scalar s
 

Definition at line 738 of file eval.cc.

References scalar_create_int_c(), SCALAR_STR, and eval_scalar::type.

int func_long eval_scalar r,
eval_int i
 

Definition at line 803 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_c(), and eval_int::value.

int func_max eval_scalar r,
eval_int p1,
eval_int p2
 

Definition at line 846 of file eval.cc.

References scalar_create_int(), and eval_int::value.

int func_min eval_scalar r,
eval_int p1,
eval_int p2
 

Definition at line 852 of file eval.cc.

References scalar_create_int(), and eval_int::value.

int func_ord eval_scalar r,
eval_str s
 

Definition at line 836 of file eval.cc.

References eval_str::len, scalar_create_int_c(), set_eval_error(), and eval_str::value.

int func_random eval_scalar r,
eval_int p1
 

Definition at line 858 of file eval.cc.

References qword, scalar_create_int_q(), and eval_int::value.

int func_rnd eval_scalar r  ) 
 

Definition at line 865 of file eval.cc.

References scalar_create_int_c().

int func_round eval_scalar r,
eval_float p
 

Definition at line 871 of file eval.cc.

References f2i(), eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, eval_int::type, eval_scalar::type, TYPE_UNKNOWN, eval_float::value, and eval_int::value.

int func_sbyte eval_scalar r,
eval_int i
 

Definition at line 789 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_c(), UINT, and eval_int::value.

int func_short eval_scalar r,
eval_int i
 

Definition at line 796 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_c(), UINT, and eval_int::value.

int func_strchr eval_scalar r,
eval_str p1,
eval_str p2
 

Definition at line 879 of file eval.cc.

References eval_str::len, scalar_create_int_c(), and eval_str::value.

int func_strcmp eval_scalar r,
eval_str p1,
eval_str p2
 

Definition at line 898 of file eval.cc.

References eval_str::len, MIN, scalar_create_int_c(), and eval_str::value.

int func_string eval_scalar r,
eval_str p
 

Definition at line 915 of file eval.cc.

References scalar_create_str().

int func_strlen eval_scalar r,
eval_str p1
 

Definition at line 921 of file eval.cc.

References eval_str::len, and scalar_create_int_c().

int func_strncmp eval_scalar r,
eval_str p1,
eval_str p2,
eval_int p3
 

Definition at line 927 of file eval.cc.

int func_strrchr eval_scalar r,
eval_str p1,
eval_str p2
 

Definition at line 932 of file eval.cc.

int func_strstr eval_scalar r,
eval_str p1,
eval_str p2
 

Definition at line 937 of file eval.cc.

int func_substr eval_scalar r,
eval_str p1,
eval_int p2,
eval_int p3
 

Definition at line 943 of file eval.cc.

References eval_str::len, MIN, QWORD_GET_LO, scalar_create_str(), scalar_create_str_c(), eval_str::value, and eval_int::value.

int func_trunc eval_scalar r,
eval_float p
 

Definition at line 960 of file eval.cc.

References f2i(), eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, eval_int::type, eval_scalar::type, TYPE_UNKNOWN, eval_float::value, and eval_int::value.

int func_typeof eval_scalar r,
eval_scalar s
 

Definition at line 708 of file eval.cc.

References scalar_create_str_c(), SCALAR_FLOAT, SCALAR_INT, SCALAR_STR, and eval_scalar::type.

int func_word eval_scalar r,
eval_int i
 

Definition at line 775 of file eval.cc.

References QWORD_GET_LO, scalar_create_int_c(), UINT, and eval_int::value.

int get_eval_error char **  str,
int *  pos
 

Definition at line 160 of file eval.cc.

Referenced by blockop_int_process(), blockop_str_process(), create_blockop_int_context(), create_blockop_str_context(), create_request_evalstr(), eval(), evalfunc(), evalsymbol(), exec_evalfunc(), ht_uformat_viewer::handlemsg(), process_search_expr(), and ht_format_viewer::string_to_qword().

eval_protomatch match_evalfunc_proto char *  name,
eval_scalarlist params,
eval_func proto
 

Definition at line 1311 of file eval.cc.

References eval_scalarlist::count, eval_protomatch, MAX_EVALFUNC_PARAMS, eval_func::name, PROTOMATCH_NAME_FAIL, PROTOMATCH_OK, PROTOMATCH_PARAM_FAIL, eval_func::ptype, SCALAR_NULL, and SCALAR_VARARGS.

Referenced by std_eval_func_handler().

void scalar_clone eval_scalar result,
const eval_scalar s
 

Definition at line 455 of file eval.cc.

References eval_str::len, malloc(), eval_scalar::scalar, SCALAR_FLOAT, SCALAR_INT, SCALAR_STR, eval_scalarbody::str, eval_scalar::type, and eval_str::value.

Referenced by exec_evalfunc().

void scalar_concat eval_scalar s,
const eval_scalar a,
const eval_scalar b
 

Definition at line 477 of file eval.cc.

References eval_scalar::scalar, scalar_context_str(), SCALAR_STR, eval_scalarbody::str, string_concat(), and eval_scalar::type.

Referenced by std_eval_func_handler(), and yyparse().

void scalar_context_float const eval_scalar s,
eval_float t
 

Definition at line 420 of file eval.cc.

References binstr2cstr(), eval_scalarbody::floatnum, eval_scalarbody::integer, eval_str::len, NULL, QWORD_GET_FLOAT, eval_scalar::scalar, SCALAR_FLOAT, SCALAR_INT, SCALAR_STR, eval_scalarbody::str, eval_scalar::type, eval_float::value, eval_int::value, and eval_str::value.

Referenced by exec_evalfunc(), and scalar_float_op().

void scalar_context_int const eval_scalar s,
eval_int t
 

Definition at line 396 of file eval.cc.

References binstr2cstr(), f2i(), eval_scalarbody::floatnum, eval_scalarbody::integer, eval_str::len, eval_scalar::scalar, SCALAR_FLOAT, SCALAR_INT, SCALAR_STR, eval_scalarbody::str, eval_scalar::type, eval_int::type, TYPE_UNKNOWN, eval_str::value, eval_int::value, and eval_float::value.

Referenced by blockop_int_process(), create_blockop_int_context(), exec_evalfunc(), ht_uformat_viewer::handlemsg(), ht_text_viewer::handlemsg(), process_search_expr(), scalar_int_op(), scalar_lnotset(), scalar_miniif(), scalar_negset(), scalar_notset(), and ht_format_viewer::string_to_qword().

void scalar_context_str const eval_scalar s,
eval_str t
 

Definition at line 367 of file eval.cc.

References buf, eval_scalarbody::floatnum, ht_snprintf(), eval_scalarbody::integer, eval_str::len, malloc(), eval_scalar::scalar, SCALAR_FLOAT, SCALAR_INT, SCALAR_STR, eval_scalarbody::str, eval_scalar::type, eval_int::value, eval_str::value, and eval_float::value.

Referenced by blockop_str_process(), create_blockop_str_context(), create_request_evalstr(), dialog_eval_help(), exec_evalfunc(), scalar_concat(), and scalar_strop().

void scalar_create_float eval_scalar s,
const eval_float t
 

Definition at line 355 of file eval.cc.

References eval_scalarbody::floatnum, eval_scalar::scalar, SCALAR_FLOAT, and eval_scalar::type.

Referenced by func_float().

void scalar_create_float_c eval_scalar s,
const double  f
 

Definition at line 361 of file eval.cc.

References eval_scalarbody::floatnum, eval_scalar::scalar, SCALAR_FLOAT, eval_scalar::type, and eval_float::value.

Referenced by ht_linear_func_entropy2().

void scalar_create_int eval_scalar s,
const eval_int t
 

Definition at line 319 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, and eval_scalar::type.

Referenced by func_int(), func_max(), and func_min().

void scalar_create_int_c eval_scalar s,
const int  i
 

Definition at line 325 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, to_sint64(), to_uint64(), eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by func_byte(), func_is_float(), func_is_int(), func_is_string(), func_long(), func_ord(), func_rnd(), func_sbyte(), func_short(), func_strchr(), func_strcmp(), func_strlen(), func_word(), ht_linear_func_entropy(), ht_linear_func_readbyte(), ht_linear_sub_symbol_handler(), ht_disasm_viewer::symbol_handler(), and ht_hex_viewer::symbol_handler().

void scalar_create_int_q eval_scalar s,
const qword  q
 

Definition at line 332 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by func_dword(), func_random(), and ht_aviewer::symbol_handler().

void scalar_create_str eval_scalar s,
const eval_str t
 

Definition at line 339 of file eval.cc.

References eval_str::len, malloc(), eval_scalar::scalar, SCALAR_STR, eval_scalarbody::str, eval_scalar::type, and eval_str::value.

Referenced by func_char(), func_string(), func_substr(), ht_linear_func_readstring(), and scalar_create_str_c().

void scalar_create_str_c eval_scalar s,
const char *  cstr
 

Definition at line 347 of file eval.cc.

References eval_str::len, scalar_create_str(), and eval_str::value.

Referenced by func_substr(), func_typeof(), and std_eval_func_handler().

void scalar_destroy eval_scalar s  ) 
 

Definition at line 487 of file eval.cc.

References eval_scalar::scalar, SCALAR_STR, eval_scalarbody::str, string_destroy(), and eval_scalar::type.

Referenced by blockop_int_process(), blockop_str_process(), create_blockop_int_context(), create_blockop_str_context(), create_request_evalstr(), dialog_eval_help(), exec_evalfunc(), ht_uformat_viewer::handlemsg(), scalar_lnotset(), scalar_miniif(), scalar_negset(), scalar_notset(), scalar_op(), scalarlist_destroy(), std_eval_func_handler(), ht_format_viewer::string_to_qword(), and yyparse().

int scalar_float_op eval_scalar xr,
const eval_scalar xa,
const eval_scalar xb,
int  op
 

Definition at line 531 of file eval.cc.

References EVAL_EQ, EVAL_GE, EVAL_GT, EVAL_LAND, EVAL_LE, EVAL_LOR, EVAL_LT, EVAL_LXOR, EVAL_NE, EVAL_POW, eval_scalarbody::floatnum, eval_scalarbody::integer, eval_scalar::scalar, scalar_context_float(), SCALAR_FLOAT, SCALAR_INT, set_eval_error(), eval_scalar::type, eval_int::type, TYPE_UNKNOWN, eval_float::value, and eval_int::value.

Referenced by scalar_op().

int scalar_int_op eval_scalar xr,
const eval_scalar xa,
const eval_scalar xb,
int  op
 

Definition at line 580 of file eval.cc.

References EVAL_EQ, EVAL_GE, EVAL_GT, EVAL_LAND, EVAL_LE, EVAL_LOR, EVAL_LT, EVAL_LXOR, EVAL_NE, EVAL_POW, EVAL_SHL, EVAL_SHR, eval_scalarbody::integer, qword, qword_cmp(), QWORD_GET_LO, eval_scalar::scalar, scalar_context_int(), SCALAR_INT, set_eval_error(), eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by scalar_op().

void scalar_lnotset eval_scalar xr,
eval_scalar xa
 

Definition at line 680 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, scalar_context_int(), scalar_destroy(), SCALAR_INT, eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by yyparse().

void scalar_miniif eval_scalar xr,
eval_scalar xa,
eval_scalar xb,
eval_scalar xc
 

Definition at line 692 of file eval.cc.

References scalar_context_int(), scalar_destroy(), and eval_int::value.

Referenced by yyparse().

void scalar_negset eval_scalar xr,
eval_scalar xa
 

Definition at line 649 of file eval.cc.

References eval_scalarbody::floatnum, eval_scalarbody::integer, eval_scalar::scalar, scalar_context_int(), scalar_destroy(), SCALAR_FLOAT, SCALAR_INT, eval_scalar::type, eval_int::type, TYPE_UNKNOWN, eval_float::value, and eval_int::value.

Referenced by yyparse().

void scalar_notset eval_scalar xr,
eval_scalar xa
 

Definition at line 668 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, scalar_context_int(), scalar_destroy(), SCALAR_INT, eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by yyparse().

int scalar_op eval_scalar xr,
eval_scalar xa,
eval_scalar xb,
int  op
 

Definition at line 636 of file eval.cc.

References scalar_destroy(), SCALAR_FLOAT, scalar_float_op(), scalar_int_op(), and eval_scalar::type.

Referenced by yyparse().

void scalar_setint eval_scalar s,
eval_int i
 

Definition at line 283 of file eval.cc.

References eval_scalarbody::integer, eval_scalar::scalar, SCALAR_INT, and eval_scalar::type.

void scalar_setstr eval_scalar s,
eval_str t
 

Definition at line 289 of file eval.cc.

References eval_scalar::scalar, SCALAR_STR, eval_scalarbody::str, and eval_scalar::type.

int scalar_strop eval_scalar xr,
const eval_scalar xa,
const eval_scalar xb,
int  op
 

Definition at line 506 of file eval.cc.

References EVAL_STR_EQ, EVAL_STR_GE, EVAL_STR_GT, EVAL_STR_LE, EVAL_STR_LT, EVAL_STR_NE, eval_scalarbody::integer, eval_scalar::scalar, scalar_context_str(), SCALAR_INT, string_compare(), eval_scalar::type, eval_int::type, TYPE_UNKNOWN, and eval_int::value.

Referenced by yyparse().

void scalarlist_concat eval_scalarlist l,
eval_scalarlist a,
eval_scalarlist b
 

Definition at line 240 of file eval.cc.

References eval_scalarlist::count, malloc(), and eval_scalarlist::scalars.

Referenced by yyparse().

void scalarlist_destroy eval_scalarlist l  ) 
 

Definition at line 248 of file eval.cc.

References eval_scalarlist::count, scalar_destroy(), and eval_scalarlist::scalars.

Referenced by yyparse().

void scalarlist_destroy_gentle eval_scalarlist l  ) 
 

Definition at line 259 of file eval.cc.

References eval_scalarlist::scalars.

Referenced by exec_evalfunc(), and yyparse().

void scalarlist_set eval_scalarlist l,
eval_scalar s
 

Definition at line 233 of file eval.cc.

References eval_scalarlist::count, malloc(), and eval_scalarlist::scalars.

Referenced by yyparse().

void set_eval_error char *  format,
... 
 

Definition at line 172 of file eval.cc.

References ht_vsnprintf(), and lex_current_buffer_pos().

Referenced by evalfunc(), evalsymbol(), exec_evalfunc(), func_ord(), ht_linear_func_readbyte(), ht_linear_func_readstring(), scalar_float_op(), scalar_int_op(), std_eval_func_handler(), ht_aviewer::symbol_handler(), and yyerror().

void set_eval_error_ex int  pos,
char *  format,
... 
 

Definition at line 183 of file eval.cc.

References ht_vsnprintf().

Referenced by exec_evalfunc().

void set_helpmode int  flag,
char *  name
 

Definition at line 54 of file eval.cc.

References MAX_FUNCNAME_LEN.

int std_eval_func_handler eval_scalar result,
char *  fname,
eval_scalarlist params,
eval_func protos
 

Definition at line 1499 of file eval.cc.

References buf, exec_evalfunc(), match_evalfunc_proto(), MAX_FUNCNAME_LEN, eval_func::name, PROTOMATCH_OK, PROTOMATCH_PARAM_FAIL, scalar_concat(), scalar_create_str_c(), scalar_destroy(), and set_eval_error().

Referenced by evalfunc(), ht_aviewer::func_handler(), ht_pe_aviewer::func_handler(), ht_xbe_aviewer::func_handler(), and ht_linear_sub_func_handler().

int string_compare const eval_str a,
const eval_str b
 

Definition at line 498 of file eval.cc.

References eval_str::len, and eval_str::value.

Referenced by scalar_strop().

void string_concat eval_str s,
eval_str a,
eval_str b
 

Definition at line 442 of file eval.cc.

References eval_str::len, malloc(), and eval_str::value.

Referenced by scalar_concat().

void string_destroy eval_str s  ) 
 

Definition at line 224 of file eval.cc.

References eval_str::value.

Referenced by blockop_str_process(), dialog_eval_help(), scalar_destroy(), and ht_blockop_str_context::~ht_blockop_str_context().


Variable Documentation

char* blimit
 

Definition at line 1024 of file eval.cc.


Generated on Fri May 7 21:15:47 2004 by doxygen 1.3.5