input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
int freq_setup(int v, const DATASET *dset, int *pn, double *pxmax, double *pxmin, int *nbins, double *binwidth) { char *v7; char *v8; char *v10; char *v11; int t; int k; int n; double xmin; double xmax; const double *x; x = dset->Z[v]; xmin = 0.0; xmax = 0.0; n = 0; for (t ...
int freq_setup(int v, const DATASET *dset, int *pn, double *pxmax, double *pxmin, int *nbins, double *binwidth) { const double *x = dset->Z[v]; double xrange, xmin = 0, xmax = 0; int t, k = 0, n = 0; for (t = dset->t1; t <= dset->t2; t++) { if (!na(x[t])) { if (n == 0) { xmax =...
freq_setup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int freqdist(int varno, const DATASET *dset, gretlopt opt, PRN *prn) { char *v4; gretlopt opta; int n_bins; int err; DistCode dist; PlotType ptype; int do_graph; gretlopt fopt; double fmin; double fwid; FreqDist *freq; unsigned long v18; opta = opt; v18 = __readfsqword(0x28u); freq = 0; ...
int freqdist(int varno, const DATASET *dset, gretlopt opt, PRN *prn) { FreqDist *freq = NULL; DistCode dist = D_NONE; PlotType ptype = 0; double fmin = NADBL; double fwid = NADBL; int n_bins = 0; int do_graph = 0; int err; if (opt & OPT_O) { dist = D_GAMMA; ptype = PLOT_FREQ_GAMMA; } else i...
freqdist
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *freqdist_matrix(const double *x, int t1, int t2, int *err) { int v4; int i; int ia; int t; _BYTE T[12]; gretl_matrix *m; DATASET *dset; *(_DWORD *)&T[8] = 0; m = 0; *(_QWORD *)T = (unsigned int)(t2 - t1 + 1); dset = create_auxiliary_dataset(1, t2 - t1 + 1, OPT_NONE); if (!dset) ...
gretl_matrix *freqdist_matrix(const double *x, int t1, int t2, int *err) { DATASET *dset = NULL; FreqDist *freq = NULL; gretl_matrix *m = NULL; int i, t, T = t2 - t1 + 1; dset = create_auxiliary_dataset(1, T, 0); if (dset == NULL) { *err = E_ALLOC; } if (!*err) { i = 0; for (t = t1; t <= t...
freqdist_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double ftrunc(double x) { if (x < 0.0) return ceil(x); else return floor(x); }
static double ftrunc(double x) { return (x >= 0) ? floor(x) : ceil(x); }
ftrunc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int *full_model_list(const MODEL *pmod, const int *inlist) { int i; int ia; int len; int extra; int *flist; if (pmod->ci == 5) return gretl_lists_join_with_separator(pmod->arinfo->arlist, inlist); len = *inlist; if (pmod->ci == 140) { ++len; } else if (pmod->ci == 99 || pmod->ci == 84 || pmod...
static int *full_model_list(const MODEL *pmod, const int *inlist) { int *flist = NULL; if (pmod->ci == AR) { flist = gretl_lists_join_with_separator(pmod->arinfo->arlist, inlist); } else { int i, len = inlist[0]; if (pmod->ci == WLS) { len += 1; } else if (COUNT_MODEL(pmod->ci) || pmod->...
full_model_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int full_sample(const DATASET *dset) { if (complex_subsampled()) return 0; return dset->t1 <= 0 && dset->t2 >= dset->n - 1; }
static int full_sample(const DATASET *dset) { if (complex_subsampled()) { return 0; } else if (dset->t1 > 0 || dset->t2 < dset->n - 1) { return 0; } else { return 1; } }
full_sample
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int *full_series_list(const DATASET *dset, int *err) { int *list; if (dset->v > 1) { list = gretl_consecutive_list_new(1, dset->v - 1); if (list) { return list; } else { *err = 12; return 0; } } else { *err = 2; return 0; } }
static int *full_series_list(const DATASET *dset, int *err) { int *list = NULL; if (dset->v < 2) { *err = E_DATA; return NULL; } list = gretl_consecutive_list_new(1, dset->v - 1); if (list == NULL) { *err = E_ALLOC; return NULL; } return list; }
full_series_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int *full_var_list(const DATASET *dset, int *nvars) { int v3; int i; int ia; int j; int nv; int fsd; int *list; fsd = gretl_function_depth(); nv = 0; list = 0; if (dset) { for (i = 1; i < dset->v; ++i) { if (!series_is_hidden(dset, i) && fsd == series_get_stack_level(dset, i)) +...
int *full_var_list(const DATASET *dset, int *nvars) { int fsd = gretl_function_depth(); int i, j, nv = 0; int *list = NULL; if (dset == NULL) { if (nvars != NULL) { *nvars = 0; } return NULL; } for (i = 1; i < dset->v; i++) { if (!series_is_hidden(dset, i) && series_get_stack_level(d...
full_var_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int func_exec_callback(ExecState *s, void *ptr, GretlObjType type) { EXEC_CALLBACK gc; if (s->cmd->ci == 41 || is_plotting_command(s->cmd)) { gc = get_gui_callback(); if (gc) gc(s, 0, GRETL_OBJ_NULL); } return 0; }
static int func_exec_callback(ExecState *s, void *ptr, GretlObjType type) { if (s->cmd->ci == FLUSH || is_plotting_command(s->cmd)) { EXEC_CALLBACK gc = get_gui_callback(); if (gc != NULL) { gc(s, NULL, 0); } } return 0; }
func_exec_callback
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int func_help_topics(const char *helpfile, PRN *prn) { char *v2; int v4; char *v5; char *v6; int j; int k; FILE *fp; char word[12]; char line[136]; unsigned long v12; v12 = __readfsqword(0x28u); fp = gretl_fopen(helpfile, "r"); if (fp) { j = 1; k = 0; while (fgets(line, 128, fp)) ...
static int func_help_topics(const char *helpfile, PRN *prn) { char line[128], word[12]; FILE *fp; int j, k; if ((fp = gretl_fopen(helpfile, "r")) == NULL) { printf(_("Unable to access the file %s.\n"), helpfile); return E_FOPEN; } j = 1; k = 0; while (fgets(line, sizeof line, fp) != NULL) { ...
func_help_topics
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int func_read_code(xmlNodePtr node, xmlDocPtr doc, ufunc *fun) { gint8 uses_set; int err; char *s; char *buf; char line[65544]; unsigned long v10; v10 = __readfsqword(0x28u); uses_set = 0; err = 0; buf = (char *)xmlNodeListGetString(doc, node->children, 1); if (!buf) return 1; bufgets_init(...
static int func_read_code(xmlNodePtr node, xmlDocPtr doc, ufunc *fun) { char line[MAXLINE]; char *buf, *s; gint8 uses_set = 0; int err = 0; buf = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1); if (buf == NULL) { return 1; } bufgets_init(buf); while (bufgets(line, sizeof line, buf)...
func_read_code
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int func_read_params(xmlNodePtr node, xmlDocPtr doc, ufunc *fun) { fn_param *params; int v5; char v6; int n; int err; char *field; double x; xmlNodePtr cur; fn_param *param; unsigned long v14; v14 = __readfsqword(0x28u); err = 0; if (gretl_xml_get_prop_as_int(node, "count", &n) && n >= 0) { ...
static int func_read_params(xmlNodePtr node, xmlDocPtr doc, ufunc *fun) { xmlNodePtr cur; char *field; int n, err = 0; if (!gretl_xml_get_prop_as_int(node, "count", &n) || n < 0) { fprintf(stderr, "Couldn't read param count\n"); return E_DATA; } if (n == 0) { return 0; } fun->params = all...
func_read_params
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_assign_returns(fncall *call, int rtype, DATASET *dset, void *ret, char **label, PRN *prn, int *perr) { const char *name; int rtypea; int i; int err; int ierr; int copy; ufunc *u; fn_arg *arg; fn_param *fp; rtypea = rtype; u = call->fun; err = 0; if (*p...
static int function_assign_returns(fncall *call, int rtype, DATASET *dset, void *ret, char **label, PRN *prn, int *perr) { ufunc *u = call->fun; int i, err = 0; #if UDEBUG fprintf(stderr, "function_assign_returns: rtype = %s, call->retname = %...
function_assign_returns
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_from_string(const char *s) { char *p; char word[9]; unsigned long v4; v4 = __readfsqword(0x28u); word[0] = 0; p = strchr(s, 40); if (p && p - s <= 8) strncat(word, s, p - s); else strncat(word, s, 8u); return function_lookup(word) || get_user_function_by_name(s) != 0; }
int function_from_string(const char *s) { char word[9]; const char *p; *word = 0; p = strchr(s, '('); if (p != NULL && p - s <= 8) { strncat(word, s, p - s); } else { strncat(word, s, 8); } if (function_lookup(word)) { return 1; } if (get_user_function_by_name(s)) { return 1; }...
function_from_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_in_use(ufunc *fun) { GList *tmp; for (tmp = callstack; tmp; tmp = tmp->next) { if (fun == *(ufunc **)tmp->data) return 1; } return 0; }
static int function_in_use(ufunc *fun) { GList *tmp = callstack; fncall *call; while (tmp != NULL) { call = tmp->data; if (fun == call->fun) { return 1; } tmp = tmp->next; } return 0; }
function_in_use
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_lookup(const char *s) { return real_function_lookup(s, 0, 0); }
int function_lookup(const char *s) { return real_function_lookup(s, 0, NULL); }
function_lookup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_lookup_with_alias(const char *s, parser *p) { fnpkg *pp; ufunc *uf; if (!oht) return real_function_lookup(s, 1, p); pp = get_active_function_package(OPT_O); if (!pp) return real_function_lookup(s, 1, p); uf = get_function_override(s, pp); if (!uf) return real_function_lookup(s, 1...
static int function_lookup_with_alias(const char *s, parser *p) { if (oht != NULL) { gpointer pp = get_active_function_package(OPT_O); if (pp != NULL) { ufunc *uf = get_function_override(s, pp); if (uf != NULL) { p->idstr = gretl_strdup(s); p->data = uf; return UFUN; ...
function_lookup_with_alias
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_names_init() { fname_idx = 0; }
void function_names_init(void) { fname_idx = 0; }
function_names_init
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_noargs_error(const char *s, parser *p) { char *v2; parser_ensure_error_buffer(p); parser_print_input(p); v2 = gettext("'%s': no argument was given"); pprintf(p->prn, v2, s); p->err = 15; }
static void function_noargs_error(const char *s, parser *p) { parser_ensure_error_buffer(p); parser_print_input(p); pprintf(p->prn, _("'%s': no argument was given"), s); p->err = E_ARGS; }
function_noargs_error
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_ok_for_package_role(const char *name, int role) { int i; int ia; int err; ufunc *u; u = 0; err = 0; if (!name || !role) return 0; for (i = 0; i < n_ufuns; ++i) { if (!strcmp(name, ufuns[i]->name)) { u = ufuns[i]; break; } } if (!u) return 0; if (role == 7)...
int function_ok_for_package_role(const char *name, int role) { ufunc *u = NULL; int i, err = 0; if (name == NULL || role == UFUN_ROLE_NONE) { return 0; } for (i = 0; i < n_ufuns; i++) { if (!strcmp(name, ufuns[i]->name)) { u = ufuns[i]; break; } } if (u == NULL) { return 0; ...
function_ok_for_package_role
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
fnpkg *function_package_alloc(const char *fname) { fnpkg *pkg; pkg = (fnpkg *)malloc(0xF8u); if (!pkg) return 0; pkg->fname = gretl_strdup(fname); if (pkg->fname) { pkg->name[0] = 0; pkg->author = 0; pkg->email = 0; pkg->version = 0; pkg->date = 0; pkg->descrip = 0; pkg->help ...
static fnpkg *function_package_alloc(const char *fname) { fnpkg *pkg = malloc(sizeof *pkg); if (pkg == NULL) { return NULL; } pkg->fname = gretl_strdup(fname); if (pkg->fname == NULL) { free(pkg); return NULL; } #if PKG_DEBUG fprintf(stderr, "function_package_alloc: fname='%s'\n", fname); #...
function_package_alloc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_connect_funcs(fnpkg *pkg, char **pubnames, int n_pub, char **privnames, int n_priv) { int err; package_disconnect_funcs(pkg); err = set_uf_array_from_names(pkg, pubnames, n_pub, 0); if (!err) return set_uf_array_from_names(pkg, privnames, n_priv, 1); ...
int function_package_connect_funcs(fnpkg *pkg, char **pubnames, int n_pub, char **privnames, int n_priv) { int err; package_disconnect_funcs(pkg); err = set_uf_array_from_names(pkg, pubnames, n_pub, 0); if (!err) { err = set_uf_array_from_names(pkg, privnames, n_priv, 1...
function_package_connect_funcs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_free(fnpkg *pkg) { real_function_package_free(pkg, 0); }
static void function_package_free(fnpkg *pkg) { real_function_package_free(pkg, 0); }
function_package_free
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_free_full(fnpkg *pkg) { real_function_package_free(pkg, 1); }
static void function_package_free_full(fnpkg *pkg) { real_function_package_free(pkg, 1); }
function_package_free_full
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char **function_package_get_data_files(fnpkg *pkg, int *n) { char **S; S = 0; *n = 0; if (pkg->datafiles) { S = strings_array_dup(pkg->datafiles, pkg->n_files); if (S) *n = pkg->n_files; } return S; }
char **function_package_get_data_files(fnpkg *pkg, int *n) { char **S = NULL; *n = 0; if (pkg->datafiles != NULL) { S = strings_array_dup(pkg->datafiles, pkg->n_files); if (S != NULL) { *n = pkg->n_files; } } return S; }
function_package_get_data_files
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char **function_package_get_depends(fnpkg *pkg, int *n) { char **S; S = 0; *n = 0; if (pkg->depends) { S = strings_array_dup(pkg->depends, pkg->n_depends); if (S) *n = pkg->n_depends; } return S; }
char **function_package_get_depends(fnpkg *pkg, int *n) { char **S = NULL; *n = 0; if (pkg->depends != NULL) { S = strings_array_dup(pkg->depends, pkg->n_depends); if (S != NULL) { *n = pkg->n_depends; } } return S; }
function_package_get_depends
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *function_package_get_editor(fnpkg *pkg) { if (pkg) return pkg->editor; else return 0; }
void *function_package_get_editor(fnpkg *pkg) { return pkg == NULL ? NULL : pkg->editor; }
function_package_get_editor
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int *function_package_get_list(fnpkg *pkg, int code, int n) { int j; int i; int priv; int *list; list = 0; j = 0; if (n > 0) { list = gretl_list_new(n); if (list) { for (i = 0; i < n_ufuns; ++i) { if (pkg == ufuns[i]->pkg) { priv = ufuns[i]->flags & 1; if (code =...
static int *function_package_get_list(fnpkg *pkg, int code, int n) { int *list = NULL; int j = 0; if (n > 0) { list = gretl_list_new(n); if (list != NULL) { int i, priv, menu_only; for (i = 0; i < n_ufuns; i++) { if (ufuns[i]->pkg == pkg) { priv = function_is_private(ufuns[...
function_package_get_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *function_package_get_name(fnpkg *pkg) { if (pkg) return pkg->name; else return 0; }
const char *function_package_get_name(fnpkg *pkg) { return (pkg != NULL) ? pkg->name : NULL; }
function_package_get_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_get_properties(fnpkg *pkg, ...) { long v1; long v2; long v3; long v4; long v5; const char **v7; long v8; char ***v9; long v10; long v11; int npub; int npriv; int i; int ia; const char *key; char **ptr; va_list ap; long v19; long v20; long v21; long v22; l...
int function_package_get_properties(fnpkg *pkg, ...) { va_list ap; int npub = 0; int npriv = 0; int **plist; const char *key; void *ptr; char **ps; int *pi; int i, err = 0; g_return_val_if_fail(pkg != NULL, E_DATA); for (i = 0; i < n_ufuns; i++) { if (ufuns[i]->pkg == pkg) { if (functi...
function_package_get_properties
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *function_package_get_string(fnpkg *pkg, const char *id) { if (!pkg || !id) return 0; if (!strcmp(id, "fname")) return pkg->fname; if (!strcmp(id, "help-fname")) return pkg->help_fname; if (!strcmp(id, "gui-help-fname")) return pkg->gui_help_fname; if (!strcmp(id, "sample-fname")) ...
const char *function_package_get_string(fnpkg *pkg, const char *id) { if (pkg == NULL || id == NULL) { return NULL; } else if (!strcmp(id, "fname")) { return pkg->fname; } else if (!strcmp(id, "help-fname")) { return pkg->help_fname; } else if (!strcmp(id, "gui-help-fname")) { return pkg->gui_he...
function_package_get_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double function_package_get_version(fnpkg *pkg) { if (pkg) return dot_atof(pkg->version); else return NAN; }
double function_package_get_version(fnpkg *pkg) { if (pkg == NULL) { return NADBL; } else { return dot_atof(pkg->version); } }
function_package_get_version
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_has_PDF_doc(fnpkg *pkg, char **pdfname) { int ret; ret = 0; if (pkg->help) { if (!strncmp(pkg->help, "pdfdoc", 6u)) { ret = 1; if (pdfname) { *pdfname = switch_ext_new(pkg->fname, "pdf"); return *pdfname != 0; } } } return ret; }
int function_package_has_PDF_doc(fnpkg *pkg, char **pdfname) { int ret = 0; if (pkg->help != NULL && !strncmp(pkg->help, "pdfdoc", 6)) { ret = 1; if (pdfname != NULL) { *pdfname = switch_ext_new(pkg->fname, "pdf"); if (*pdfname == NULL) { ret = 0; } } } return ret; }
function_package_has_PDF_doc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_has_gui_help(fnpkg *pkg) { return pkg->gui_help && !string_is_blank(pkg->gui_help); }
int function_package_has_gui_help(fnpkg *pkg) { return pkg->gui_help != NULL && !string_is_blank(pkg->gui_help); }
function_package_has_gui_help
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_is_loaded(const char *fname, const char **version) { return get_loaded_pkg_by_filename(fname, version) != 0; }
int function_package_is_loaded(const char *fname, const char **version) { return (get_loaded_pkg_by_filename(fname, version) != NULL); }
function_package_is_loaded
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
fnpkg *function_package_new(const char *fname, char **pubnames, int n_pub, char **privnames, int n_priv, int *err) { fnpkg *pkg; pkg = 0; if (n_pub > 0) { pkg = function_package_alloc(fname); if (!pkg) *err = 12; } else { *err = 2; } if (*err) return 0; n...
fnpkg *function_package_new(const char *fname, char **pubnames, int n_pub, char **privnames, int n_priv, int *err) { fnpkg *pkg = NULL; if (n_pub <= 0) { *err = E_DATA; } else { pkg = function_package_alloc(fname); if (pkg == NULL) { *err = E_ALLOC; } } if ...
function_package_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_record(fnpkg *pkg) { int err; fnpkg **tmp; err = 0; tmp = (fnpkg **)realloc(pkgs, 8LL * (n_pkgs + 1)); if (!tmp) return 12; pkgs = tmp; tmp[n_pkgs++] = pkg; return err; }
static int function_package_record(fnpkg *pkg) { fnpkg **tmp; int err = 0; tmp = realloc(pkgs, (n_pkgs + 1) * sizeof *tmp); if (tmp == NULL) { err = E_ALLOC; } else { pkgs = tmp; pkgs[n_pkgs] = pkg; n_pkgs++; } return err; }
function_package_record
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_set_auxfile(fnpkg *pkg, const char *id, const char *fname) { gchar *test; test = 0; if (!strcmp(id, "help-fname")) { test = (gchar *)g_strdup_printf("%s_help.txt", pkg->name); } else if (!strcmp(id, "gui-help-fname")) { test = (gchar *)g_strdup_pr...
static void function_package_set_auxfile(fnpkg *pkg, const char *id, const char *fname) { gchar *test = NULL; if (!strcmp(id, "help-fname")) { test = g_strdup_printf("%s_help.txt", pkg->name); } else if (!strcmp(id, "gui-help-fname")) { test = g_strdup_printf("%s_...
function_package_set_auxfile
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_set_data_files(fnpkg *pkg, char **S, int n) { int err; err = 0; if (pkg->datafiles) { strings_array_free(pkg->datafiles, pkg->n_files); pkg->datafiles = 0; pkg->n_files = 0; } if (n > 0) { if (S) { pkg->datafiles = strings_array_dup(S, n); if (pkg->datafiles) ...
int function_package_set_data_files(fnpkg *pkg, char **S, int n) { int err = 0; if (pkg->datafiles != NULL) { strings_array_free(pkg->datafiles, pkg->n_files); pkg->datafiles = NULL; pkg->n_files = 0; } if (n > 0) { if (S == NULL) { err = E_DATA; } else { pkg->datafiles = strin...
function_package_set_data_files
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_set_depends(fnpkg *pkg, char **S, int n) { int err; err = 0; if (pkg->depends) { strings_array_free(pkg->depends, pkg->n_depends); pkg->depends = 0; pkg->n_depends = 0; } if (n > 0) { if (S) { pkg->depends = strings_array_dup(S, n); if (pkg->depends) p...
int function_package_set_depends(fnpkg *pkg, char **S, int n) { int err = 0; if (pkg->depends != NULL) { strings_array_free(pkg->depends, pkg->n_depends); pkg->depends = NULL; pkg->n_depends = 0; } if (n > 0) { if (S == NULL) { err = E_DATA; } else { pkg->depends = strings_arra...
function_package_set_depends
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_set_editor(fnpkg *pkg, void *editor) { if (pkg) pkg->editor = editor; }
void function_package_set_editor(fnpkg *pkg, void *editor) { if (pkg != NULL) { pkg->editor = editor; } }
function_package_set_editor
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_set_properties(fnpkg *pkg, ...) { long v1; long v2; long v3; long v4; long v5; const char **overflow_arg_area; const char **v7; const unsigned char **v8; int *v9; int optional; int i; int err; int ival; const char *key; char **sptr; const unsigned char *np; const c...
int function_package_set_properties(fnpkg *pkg, ...) { va_list ap; const char *key; char **sptr; int optional; int i, err = 0; va_start(ap, pkg); for (i = 1; !err; i++) { key = va_arg(ap, const char *); if (key == NULL) { break; } sptr = pkg_strvar_pointer(pkg, key, &optional); ...
function_package_set_properties
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_unload_by_filename(const char *fname) { fnpkg *pkg; pkg = get_loaded_pkg_by_filename(fname, 0); if (pkg) real_function_package_unload(pkg, 0); }
void function_package_unload_by_filename(const char *fname) { fnpkg *pkg = get_loaded_pkg_by_filename(fname, NULL); if (pkg != NULL) { real_function_package_unload(pkg, 0); } }
function_package_unload_by_filename
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_package_unload_full_by_filename(const char *fname) { fnpkg *pkg; pkg = get_loaded_pkg_by_filename(fname, 0); if (pkg) real_function_package_unload(pkg, 1); }
void function_package_unload_full_by_filename(const char *fname) { fnpkg *pkg = get_loaded_pkg_by_filename(fname, NULL); if (pkg != NULL) { real_function_package_unload(pkg, 1); } }
function_package_unload_full_by_filename
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_package_write_file(fnpkg *pkg) { return real_write_function_package(pkg, 0); }
int function_package_write_file(fnpkg *pkg) { return real_write_function_package(pkg, NULL); }
function_package_write_file
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_real_only(int f) { char *v1; const char *v2; v1 = gettext("complex arguments are not supported"); v2 = getsymb(f); gretl_errmsg_sprintf("%s: %s", v2, v1); return 50; }
static int function_real_only(int f) { gretl_errmsg_sprintf("%s: %s", getsymb(f), _("complex arguments are not supported")); return E_CMPLX; }
function_real_only
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int function_set_package_role(const char *name, fnpkg *pkg, const char *attr, PRN *prn) { int v5; const char *v6; const char *v7; const char *v8; const char *v9; int i; int ia; int ib; int ic; int id; int j; int err; int role; int pmin; GretlType pjt; ufunc ...
int function_set_package_role(const char *name, fnpkg *pkg, const char *attr, PRN *prn) { ufunc *u = NULL; int role = pkg_key_get_role(attr); int i, j, err = 0; if (name == NULL) { pkg_remove_role(pkg, role); return 0; } if (role == UFUN_ROLE_NONE) { for (i = 0; ...
function_set_package_role
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void function_state_init(CMD *cmd, ExecState *state, int *indent0) { cmd->list = 0; cmd->auxlist = 0; cmd->param = 0; cmd->parm2 = 0; state->cmd = 0; state->model = 0; state->submask = 0; state->padded = 0; *indent0 = gretl_if_state_record(); }
void function_state_init(CMD *cmd, ExecState *state, int *indent0) { cmd->list = NULL; cmd->auxlist = NULL; cmd->param = NULL; cmd->parm2 = NULL; state->cmd = NULL; state->model = NULL; state->submask = NULL; state->padded = 0; *indent0 = gretl_if_state_record(); }
function_state_init
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *funname(int t) { int i; int ia; int ib; for (i = 0; ptrfuncs[i].id; ++i) { if (t == ptrfuncs[i].id) return ptrfuncs[i].str; } for (ia = 0; funcs[ia].id; ++ia) { if (t == funcs[ia].id) return funcs[ia].str; } for (ib = 0; hidden_funcs[ib].id; ++ib) { if (t == hidden_f...
static const char *funname(int t) { int i; for (i = 0; ptrfuncs[i].id != 0; i++) { if (t == ptrfuncs[i].id) { return ptrfuncs[i].str; } } for (i = 0; funcs[i].id != 0; i++) { if (t == funcs[i].id) { return funcs[i].str; } } for (i = 0; hidden_funcs[i].id != 0; i++) { if (t...
funname
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void future_datafile_warning(double v1, double v2) { char *fmt; fmt = gettext( "The version of this datafile (%g) is higher than that fully\n" "supported by this build of gretl (%g). Some features may not be\n" "correctly recognized.\n"); gretl_warnmsg_sprintf(fmt, v1, v2); }
static void future_datafile_warning(double v1, double v2) { const char *fmt = _("The version of this datafile (%g) is higher than that fully\n" "supported by this build of gretl (%g). Some features may not be\n" "correctly recognized.\n"); gretl_warnmsg_sprintf(fmt, v1, v2); }
future_datafile_warning
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *fzero_node(NODE *l, NODE *m, NODE *r, parser *p) { double scalar; int free_b; NODE *ret; gretl_matrix *b; double tol; char *fcall; ret = 0; if ((p->flags & 2) == 0) return get_aux_node(p, 54, 0, 0); fcall = l->v.str; b = 0; tol = NAN; free_b = 0; if (!m || m->t == 85 || m->t == 54 |...
static NODE *fzero_node(NODE *l, NODE *m, NODE *r, parser *p) { NODE *ret = NULL; if (starting(p)) { const char *fcall = l->v.str; gretl_matrix *b = NULL; double tol = NADBL; int free_b = 0; if (null_or_scalar(m)) { b = gretl_matrix_alloc(1, 2); b->val[0] = null_node(m) ? NADBL : n...
fzero_node
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int g_too_long(double x, int signif) { size_t v2; char n1[32]; char n2[40]; unsigned long v6; v6 = __readfsqword(0x28u); sprintf(n1, "%.*G", signif, x); sprintf(n2, "%.0f", x); v2 = strlen(n1); return v2 > strlen(n2); }
static int g_too_long(double x, int signif) { char n1[32], n2[32]; sprintf(n1, "%.*G", signif, x); sprintf(n2, "%.0f", x); return (strlen(n1) > strlen(n2)); }
g_too_long
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gamma_cdf(double s1, double s2, double x, int control) { double v4; double p; if (control == 1) v4 = gdtr(1.0 / s2, s1, x); else v4 = gdtr(1.0 / (s2 / s1), s1 / (s2 / s1), x); p = v4; if (get_cephes_errno()) return NAN; return p; }
double gamma_cdf(double s1, double s2, double x, int control) { double scale, shape, p; if (control == 1) { shape = s1; scale = s2; } else { scale = s2 / s1; shape = s1 / scale; } p = gdtr(1.0 / scale, shape, x); if (get_cephes_errno()) { p = NADBL; } return p; }
gamma_cdf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gamma_cdf_comp(double s1, double s2, double x, int control) { double v4; double p; if (control == 1) v4 = gdtrc(1.0 / s2, s1, x); else v4 = gdtrc(1.0 / (s2 / s1), s1 / (s2 / s1), x); p = v4; if (get_cephes_errno()) return NAN; return p; }
double gamma_cdf_comp(double s1, double s2, double x, int control) { double shape, scale, p; if (control == 1) { shape = s1; scale = s2; } else { scale = s2 / s1; shape = s1 / scale; } p = gdtrc(1.0 / scale, shape, x); if (get_cephes_errno()) { p = NADBL; } return p; }
gamma_cdf_comp
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gamma_cdf_inverse(double shape, double scale, double p) { double x; x = NAN; if (p == 0.0) return 0.0; if (shape > 0.0 && scale > 0.0 && p > 0.0 && p < 1.0) { x = igami(shape, 1.0 - p) * scale; if (get_cephes_errno()) return NAN; } return x; }
double gamma_cdf_inverse(double shape, double scale, double p) { double x = NADBL; if (p == 0) { return 0; } if (shape > 0 && scale > 0 && p > 0 && p < 1) { x = igami(shape, 1 - p) * scale; if (get_cephes_errno()) { x = NADBL; } } return x; }
gamma_cdf_inverse
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gamma_pdf(double shape, double scale, double x) { double xa; double scalea; double shapea; shapea = shape; scalea = scale; xa = x; gamma_pdf_array(shape, scale, &xa, 1); return xa; }
double gamma_pdf(double shape, double scale, double x) { gamma_pdf_array(shape, scale, &x, 1); return x; }
gamma_pdf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gamma_pdf_array(double shape, double scale, double *x, int n) { int i; int ia; int err; double x3; double x4; double x1; err = 0; *__errno_location() = 0; if (fabs(shape) > 1.797693134862316e308 || shape <= 0.0 || fabs(scale) > 1.797693134862316e308 || scale <= 0.0) { err = 2; } else ...
static int gamma_pdf_array(double shape, double scale, double *x, int n) { int i, err = 0; errno = 0; if (!na(shape) && shape > 0 && !na(scale) && scale > 0) { double x1, x2; double x3 = pow(scale, shape); double x4 = gammafun(shape); if (errno || na(x4)) { err = E_NAN; } else { ...
gamma_pdf_array
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gammafun(double x) { double ret; ret = cephes_gamma(x); if (get_cephes_errno()) return NAN; return ret; }
double gammafun(double x) { double ret = cephes_gamma(x); if (get_cephes_errno()) { ret = NADBL; } return ret; }
gammafun
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
MODEL *garch(MODEL *__return_ptr retstr, const int *list, DATASET *dset, gretlopt opt, PRN *prn) { _BYTE v6[376]; PRN *prna; gretlopt opta; DATASET *dseta; const int *lista; MODEL *v11; PRN *myprn; MODEL (*garch_model)(const int *, DATASET *, PRN *, gretlopt); MODEL mod; unsigned long v...
MODEL garch(const int *list, DATASET *dset, gretlopt opt, PRN *prn) { MODEL mod; PRN *myprn; MODEL (*garch_model)(const int *, DATASET *, PRN *, gretlopt); gretl_error_clear(); garch_model = get_plugin_function("garch_model"); if (garch_model == NULL) { gretl_model_init(&mod, dset); mod.errcode =...
garch
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *garch_alt_vcv_string() { if (state->garch_alt_vcv == 4) return gvr_strs[0]; if (state->garch_alt_vcv == 5) return gvr_strs[1]; return "unset"; }
static const char *garch_alt_vcv_string(void) { if (state->garch_alt_vcv == ML_QML) { return gvr_strs[0]; } else if (state->garch_alt_vcv == ML_BW) { return gvr_strs[1]; } else { return "unset"; } }
garch_alt_vcv_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int garch_fcast(Forecast *fc, MODEL *pmod, const DATASET *dset) { int v3; double *v4; int pmax; int xvars; int i; int t; int miss; int yno; int ns; int v; int lag; double xval; double *h; double *mh; double *psi; double yh; const int *xlist; double *phi; unsigned long v23; v23 =...
static int garch_fcast(Forecast *fc, MODEL *pmod, const DATASET *dset) { double xval; int xvars, yno; const int *xlist = NULL; double *h = NULL; double *mh = NULL; double *phi = NULL; double *psi = NULL; int i, v, t; xlist = model_xlist(pmod); yno = gretl_model_get_depvar(pmod); if (xlist != NUL...
garch_fcast
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double *garch_h_hat(const MODEL *pmod, int t1, int t2, int xvars) { int v5; int i; int t; int err; int nf; int q; int p; int s; int ti; double hlag; double *h; double *mh; const double *alpha; err = 0; mh = (double *)gretl_model_get_data(pmod, "garch_h"); if (!mh) return 0; nf = t...
static double *garch_h_hat(const MODEL *pmod, int t1, int t2, int xvars) { const double *alpha; const double *beta; double hlag; double *h, *mh; int nf, q, p, lmax; int i, s, t, ti; int err = 0; mh = gretl_model_get_data(pmod, "garch_h"); if (mh == NULL) { return NULL; } nf = t2 - t1 + 1; ...
garch_h_hat
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double *garch_ldv_phi(const MODEL *pmod, const int *xlist, const int *dvlags, int *ppmax) { int i; int ia; int ib; int pmax; double *phi; phi = 0; pmax = 0; if (dvlags && xlist) { for (i = 0; i < *xlist; ++i) { if (pmax < dvlags[i]) pmax = dvlags[i]; } ph...
static double *garch_ldv_phi(const MODEL *pmod, const int *xlist, const int *dvlags, int *ppmax) { double *phi = NULL; int i, pmax = 0; if (dvlags != NULL && xlist != NULL) { for (i = 0; i < xlist[0]; i++) { if (dvlags[i] > pmax) { pmax = dvlags[i]; } } ...
garch_ldv_phi
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double garch_ldv_sderr(const double *h, const double *psi, int s) { int i; double vs; vs = h[s]; for (i = 1; i <= s; ++i) vs = psi[i] * (h[s - i] * psi[i]) + vs; if (vs < 0.0) return NAN; else return sqrt(vs); }
static double garch_ldv_sderr(const double *h, const double *psi, int s) { double ss, vs = h[s]; int i; for (i = 1; i <= s; i++) { vs += h[s - i] * psi[i] * psi[i]; } if (vs >= 0.0) { ss = sqrt(vs); } else { ss = NADBL; } return ss; }
garch_ldv_sderr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double *garch_psi(const double *phi, int p, int nf) { int i; int s; double *psi; if (!phi) return 0; psi = (double *)malloc(8LL * nf); if (!psi) return 0; *psi = 1.0; for (s = 1; s < nf; ++s) { psi[s] = 0.0; for (i = 0; i < p && i < s; ++i) psi[s] = psi[s - i - 1] * phi[i] + psi[s...
static double *garch_psi(const double *phi, int p, int nf) { double *psi; int i, s; if (phi == NULL) { return NULL; } psi = malloc(nf * sizeof *psi); if (psi == NULL) { return NULL; } psi[0] = 1.0; for (s = 1; s < nf; s++) { psi[s] = 0.0; for (i = 0; i < p && i < s; i++) { p...
garch_psi
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int garch_resid_plot(const MODEL *pmod, const DATASET *dset) { char *v3; char *v4; int err; int t; FILE *fp; const double *h; const double *obs; double sd2; unsigned long v11; v11 = __readfsqword(0x28u); fp = 0; err = 0; h = (const double *)gretl_model_get_data(pmod, "garch_h"); if (!h) ...
int garch_resid_plot(const MODEL *pmod, const DATASET *dset) { FILE *fp = NULL; const double *obs; const double *h; double sd2; int t, err = 0; h = gretl_model_get_data(pmod, "garch_h"); if (h == NULL) { return E_DATA; } obs = gretl_plotx(dset, OPT_NONE); if (obs == NULL) { return E_ALLOC;...
garch_resid_plot
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void garch_variance_line(const MODEL *pmod, PRN *prn) { char *v2; char *v3; char *v4; double v5; char *v6; char *v7; char *v8; unsigned int v9; char *v10; int d; int LRdf; double v; double LR; v = pmod->sigma * pmod->sigma; d = get_gretl_digits(); ensure_vsep(prn); if (plain_format(pr...
static void garch_variance_line(const MODEL *pmod, PRN *prn) { const char *varstr = N_("Unconditional error variance"); double v = pmod->sigma * pmod->sigma; int d = get_gretl_digits(); ensure_vsep(prn); if (plain_format(prn)) { double LR = gretl_model_get_double(pmod, "garch_LR"); int LRdf = gretl_...
garch_variance_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gauss_quad_basic(int n, int kind, double *x, double *w) { int i; int err; double *tmp; double z0; tmp = (double *)malloc(8LL * n); if (!tmp) return 12; z0 = make_jacobi(n, kind, x, tmp); *w = sqrt(z0); err = diag_jacobi(n, x, tmp, w); if (!err) { for (i = 0; i < n; ++i) w[i] = w[i...
static int gauss_quad_basic(int n, int kind, double *x, double *w) { double z0, *tmp; int i, err; tmp = malloc(n * sizeof *tmp); if (tmp == NULL) { return E_ALLOC; } z0 = make_jacobi(n, kind, x, tmp); w[0] = sqrt(z0); err = diag_jacobi(n, x, tmp, w); if (!err) { for (i = 0; i < n; i++) { ...
gauss_quad_basic
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gdt_binary_order(xmlNodePtr node) { int ret; xmlChar *tmp; tmp = (xmlChar *)xmlGetProp(node, "binary"); ret = 0; if (tmp) { if (!strcmp((const char *)tmp, "little-endian")) { ret = 1234; } else if (!strcmp((const char *)tmp, "big-endian")) { ret = 4321; } free(tmp); } retu...
static int gdt_binary_order(xmlNodePtr node) { xmlChar *tmp = xmlGetProp(node, (XUC) "binary"); int ret = 0; if (tmp != NULL) { if (!strcmp((char *)tmp, "little-endian")) { ret = G_LITTLE_ENDIAN; } else if (!strcmp((char *)tmp, "big-endian")) { ret = G_BIG_ENDIAN; } free(tmp); } ...
gdt_binary_order
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gdt_swap_endianness(DATASET *dset) { int i; int t; for (i = 1; i < dset->v; ++i) { for (t = 0; t < dset->n; ++t) *(_QWORD *)&dset->Z[i][t] = _bswap_64(*(_QWORD *)&dset->Z[i][t]); } }
static void gdt_swap_endianness(DATASET *dset) { int i, t; for (i = 1; i < dset->v; i++) { for (t = 0; t < dset->n; t++) { reverse_double(dset->Z[i][t]); } } }
gdt_swap_endianness
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gdtr(double a, double b, double x) { if (x >= 0.0) return igam(b, a * x); mtherr("gdtr", 1); return 0.0; }
double gdtr(double a, double b, double x) { if (x < 0.0) { mtherr("gdtr", CEPHES_DOMAIN); return 0.0; } return igam(b, a * x); }
gdtr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gdtrc(double a, double b, double x) { if (x >= 0.0) return igamc(b, a * x); mtherr("gdtrc", 1); return 0.0; }
double gdtrc(double a, double b, double x) { if (x < 0.0) { mtherr("gdtrc", CEPHES_DOMAIN); return 0.0; } return igamc(b, a * x); }
gdtrc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_add_or_replace(parser *p, GretlType type, void *data) { if (p->lh.uv) return user_var_replace_value(p->lh.uv, data, type); else return user_var_add_or_replace(p->lh.name, type, data); }
static int gen_add_or_replace(parser *p, GretlType type, void *data) { int err; if (p->lh.uv != NULL) { err = user_var_replace_value(p->lh.uv, data, type); } else { err = user_var_add_or_replace(p->lh.name, type, data); } return err; }
gen_add_or_replace
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_add_uvar(parser *p, GretlType type, void *data) { return user_var_add(p->lh.name, type, data); }
static int gen_add_uvar(parser *p, GretlType type, void *data) { int err; err = user_var_add(p->lh.name, type, data); return err; }
gen_add_uvar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_allocate_storage(parser *p) { char *v1; if (p->lh.vnum <= 0) { if (p->dset && p->dset->Z) { p->err = dataset_add_NA_series(p->dset, 1); if (!p->err) p->lh.vnum = p->dset->v - 1; } else { p->err = 2; } if (!p->err && !gretl_function_depth() && get_user_f...
static int gen_allocate_storage(parser *p) { if (p->lh.vnum <= 0) { if (p->dset == NULL || p->dset->Z == NULL) { p->err = E_DATA; } else { p->err = dataset_add_NA_series(p->dset, 1); if (!p->err) { p->lh.vnum = p->dset->v - 1; } } if (!p->err && gretl_function_depth() =...
gen_allocate_storage
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_arg_val(const char *s, DATASET *dset, double *px, gretl_matrix **pm, int *pv, int *scalar) { int err; GretlType type; char *genstr; const gretl_matrix *m; genstr = gretl_strdup_printf("%s=%s", "$ptmp", s); if (!genstr) return 12; err = generate(genstr, dset, GRETL_TYPE_ANY, OP...
static int gen_arg_val(const char *s, DATASET *dset, double *px, gretl_matrix **pm, int *pv, int *scalar) { const char *name = "$ptmp"; char *genstr; int err = 0; genstr = gretl_strdup_printf("%s=%s", name, s); if (genstr == NULL) { return E_ALLOC; } err = generate(genstr, dse...
gen_arg_val
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *gen_array_node(NODE *n, parser *p) { char *v2; int len; NODE *ret; ret = 0; if (!n || n->t == 85 || n->t == 54 || n->t == 57 && n->v.str && !*((_DWORD *)n->v.str + 6) && *n->v.ivec == 1 && *((_DWORD *)n->v.str + 1) == 1) { if (p->lh.gtype) { len = 0; if (n && n->t != 85)...
static NODE *gen_array_node(NODE *n, parser *p) { NODE *ret = NULL; if (!null_or_scalar(n)) { p->err = E_TYPES; } else if (p->lh.gtype == 0) { gretl_errmsg_set(_("array: no type was specified")); p->err = E_DATA; } else { int len = 0; if (!null_node(n)) { len = node_get_int(n, p); ...
gen_array_node
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_check_return_type(parser *p) { int err; NODE *r; r = p->ret; err = 0; if (r) { if (r->t == 54 || r->t == 55 || r->t == 57 || r->t == 56 || r->t == 64 || r->t == 85 || r->t == 60 || r->t == 58 || r->t == 59 || r->t == 4 || r->t == 79) { if (r->t != 55 || r->v.str) { i...
static int gen_check_return_type(parser *p) { NODE *r = p->ret; int err = 0; if (r == NULL) { fprintf(stderr, "gen_check_return_type: p->ret = NULL!\n"); return E_DATA; } #if EDEBUG fprintf(stderr, "gen_check_return_type: targ=%s; ret at %p, type %s\n", getsymb(p->targ), (void *)r, getsymb...
gen_check_return_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gen_cleanup(parser *p) { int save; save = p->flags & 0x60; if (p->lh.label) { free(p->lh.label); p->lh.label = 0; } if ((p->flags & 0x8000000) != 0) { free((void *)p->input); p->input = 0; } if (p->err && (p->flags & 0x20) != 0) save = 0; if (!save) { if (p->lhtree) { ...
void gen_cleanup(parser *p) { int save = (p->flags & (P_COMPILE | P_EXEC)); #if EDEBUG fprintf(stderr, "gen cleanup on %p: save = %d\n", p, save ? 1 : 0); #endif if (p->lh.label != NULL) { free(p->lh.label); p->lh.label = NULL; } if (p->flags & P_ALTINP) { free((char *)p->input); p->input =...
gen_cleanup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_edit_list(parser *p, int *list, int op) { user_var *u; if (p->lh.uv && p->lh.uv->type == GRETL_TYPE_LIST) { u = p->lh.uv; } else { if (p->lh.uv) fwrite("*** replace list: LHS uv of wrong type!\n", 1u, 0x28u, stderr); else fwrite("*** replace list: LHS uv is NULL!\n", 1u, 0x22u, st...
static int gen_edit_list(parser *p, int *list, int op) { user_var *u; int err; if (p->lh.uv != NULL && p->lh.uv->type == GRETL_TYPE_LIST) { u = p->lh.uv; } else { if (p->lh.uv == NULL) { fprintf(stderr, "*** replace list: LHS uv is NULL!\n"); } else { fprintf(stderr, "*** replace list: ...
gen_edit_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_func_count() { int i; int ia; int ib; int n; n = 0; for (i = 0; ptrfuncs[i].id; ++i) ++n; for (ia = 0; funcs[ia].id; ++ia) ++n; for (ib = 0; func_alias[ib].id; ++ib) { if (show_alias(ib)) ++n; } return n; }
int gen_func_count(void) { int i, n = 0; for (i = 0; ptrfuncs[i].id != 0; i++) { n++; } for (i = 0; funcs[i].id != 0; i++) { n++; } for (i = 0; func_alias[i].id != 0; i++) { if (show_alias(i)) { n++; } } return n; }
gen_func_count
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gen_func_name(int i) { int j; int ja; int jb; int seq; seq = -1; for (j = 0; ptrfuncs[j].id; ++j) { if (++seq == i) return ptrfuncs[i].str; } for (ja = 0; funcs[ja].id; ++ja) { if (++seq == i) return funcs[ja].str; } for (jb = 0; func_alias[jb].id; ++jb) { if (sh...
const char *gen_func_name(int i) { int j, seq = -1; for (j = 0; ptrfuncs[j].id != 0; j++) { seq++; if (seq == i) { return ptrfuncs[i].str; } } for (j = 0; funcs[j].id != 0; j++) { seq++; if (seq == i) { return funcs[j].str; } } for (j = 0; func_alias[j].id != 0; j++) {...
gen_func_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *gen_get_lhs_var(parser *p, GretlType type) { const char *name; void *data; data = 0; if (p->lh.uv && type == p->lh.uv->type) return p->lh.uv->ptr; if (p->lh.uv) { fprintf(stderr, "*** get: LHS uv '%s' of wrong type!\n", p->lh.name); } else { name = gretl_type_get_name(type); fprintf(s...
static void *gen_get_lhs_var(parser *p, GretlType type) { void *data = NULL; if (p->lh.uv != NULL && p->lh.uv->type == type) { data = p->lh.uv->ptr; } else { if (p->lh.uv == NULL) { fprintf(stderr, "*** get: LHS %s '%s' is NULL!\n", gretl_type_get_name(type), p->lh.name); } else {...
gen_get_lhs_var
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_panel_dummies(DATASET *dset, gretlopt opt, PRN *prn) { int v4; int v5; char *v6; char *v7; double v8; int v9; int v10; char *v11; char *v12; _BOOL4 v13; int vi; int via; int t; int ta; int pp; int mm; int ndum; int nnew; int n_unitdum; int n_timedum; int allnew; int n...
int gen_panel_dummies(DATASET *dset, gretlopt opt, PRN *prn) { char vname[16], label[MAXLABEL]; int vi, t, yy, pp, mm; int orig_v = dset->v; int ndum, nnew; int n_unitdum = 0; int n_timedum = 0; int allnew = 0; int newvnum; double xx; if (opt & OPT_T) { ndum = n_timedum = dset->pd; } else { ...
gen_panel_dummies
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gen_preprocess(parser *p, int flags, int *done) { int newvar; const char *s; const char *savepoint; char opstr[3]; unsigned long v8; v8 = __readfsqword(0x28u); s = p->input; memset(opstr, 0, sizeof(opstr)); newvar = 1; while (((*__ctype_b_loc())[*s] & 0x2000) != 0) ++s; if (!strncmp(s, "...
static void gen_preprocess(parser *p, int flags, int *done) { const char *s = p->input; char opstr[3] = {0}; int newvar = 1; while (isspace(*s)) s++; if (!strncmp(s, "genr ", 5)) { s += 5; } else if (!strncmp(s, "print ", 6)) { p->flags |= P_DISCARD; s += 6; } while (isspace(*s)) ...
gen_preprocess
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_replace_lhs(parser *p, GretlType type, void *data) { const char *name; if (p->lh.uv) return user_var_replace_value(p->lh.uv, data, type); fwrite("*** gen_replace_lhs: lhs user_var is NULL ***\n", 1u, 0x2Eu, stderr); name = gretl_type_get_name(type); fprintf(stderr, " (type is specified as %s)\n",...
static int gen_replace_lhs(parser *p, GretlType type, void *data) { if (p->lh.uv == NULL) { fputs("*** gen_replace_lhs: lhs user_var is NULL ***\n", stderr); fprintf(stderr, " (type is specified as %s)\n", gretl_type_get_name(type)); return E_DATA; } else { return user_var_replace_value(p->lh.uv, da...
gen_replace_lhs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_replace_scalar(parser *p, double x) { int err; err = 0; if (p->lh.uv && p->lh.uv->type == GRETL_TYPE_DOUBLE) { *(double *)p->lh.uv->ptr = x; } else { if (p->lh.uv) fwrite("***gen_ replace scalar: LHS uv of wrong type!\n", 1u, 0x2Eu, stderr); else fwrite("*** gen_rep...
static int gen_replace_scalar(parser *p, double x) { int err = 0; if (p->lh.uv != NULL && p->lh.uv->type == GRETL_TYPE_DOUBLE) { uvar_set_scalar_fast(p->lh.uv, x); } else { if (p->lh.uv == NULL) { fprintf(stderr, "*** gen_replace scalar: LHS uv is NULL!\n"); } else { fprintf(stderr, "***g...
gen_replace_scalar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gen_save_or_print(parser *p, PRN *prn) { PRN *v2; DATASET *dset; int *list_by_name; const char *lhs_var; if ((p->flags & 4) == 0) { if ((p->flags & 1) != 0) { if (p->ret) { switch (p->ret->t) { case '9': if (*((_DWORD *)p->ret->v.str + 6)) gretl_cmatrix_pr...
void gen_save_or_print(parser *p, PRN *prn) { if (autoreg(p)) { return; } if (p->flags & P_DISCARD) { if (p->ret == NULL) { return; } else if (p->ret->t == MAT) { if (p->ret->v.m->is_complex) { gretl_cmatrix_print(p->ret->v.m, p->lh.name, p->prn); } else { gretl_mat...
gen_save_or_print
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_seasonal_dummies(DATASET *dset, int center) { return real_seasonals(dset, 0, center, 0, 0); }
int gen_seasonal_dummies(DATASET *dset, int center) { return real_seasonals(dset, 0, center, 0, NULL); }
gen_seasonal_dummies
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *gen_series_from_string(NODE *l, NODE *r, parser *p) { int vnum; NODE *ret; gchar *line; vnum = -1; line = (gchar *)g_strdup_printf("%s=%s", l->v.str, r->v.str); if (!generate(line, p->dset, GRETL_TYPE_SERIES, OPT_NONE, p->prn)) vnum = current_series_index(p->dset, l->v.str); ret = get_aux_node(...
static NODE *gen_series_from_string(NODE *l, NODE *r, parser *p) { NODE *ret = NULL; gchar *line; int vnum = -1; int err = 0; line = g_strdup_printf("%s=%s", l->v.str, r->v.str); err = generate(line, p->dset, GRETL_TYPE_SERIES, OPT_NONE, p->prn); if (!err) { vnum = current_series_index(p->dset, l->v...
gen_series_from_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *gen_series_node(NODE *l, NODE *r, parser *p) { int v4; long v5; int v6; long v7; double v8; int subset; int err; int vnum; int t; int i; int t_0; int i_0; int v; NODE *ret; const double *xvec; double xval; char *vname; unsigned long v23; v23 = __readfsqword(0x28u); ret = 0...
static NODE *gen_series_node(NODE *l, NODE *r, parser *p) { NODE *ret = NULL; if (p->dset == NULL || p->dset->n == 0) { no_data_error(p); } else if (l->t == STR && r->t == STR) { return gen_series_from_string(l, r, p); } else if (l->t != STR || (r->t != SERIES && r->t != MAT && r->t != NUM)) { p->e...
gen_series_node
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_special(const char *s, const char *line, DATASET *dset, PRN *prn, parser *p) { char *v6; int vnum; int write_label; int err; int orig_v; const char *msg; unsigned long v15; v15 = __readfsqword(0x28u); msg = 0; orig_v = dset->v; write_label = 0; vnum = -1; err = 0; if...
static int gen_special(const char *s, const char *line, DATASET *dset, PRN *prn, parser *p) { const char *msg = NULL; int orig_v = dset->v; int write_label = 0; int vnum = -1; int err = 0; if (dset == NULL || dset->n == 0) { return E_NODATA; } if (!strcmp(s, "markers")) { ...
gen_special
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_time(DATASET *dset, int tm, int *vnum) { const char *v3; char *v5; int t; int v; if (tm) v3 = "time"; else v3 = "index"; v = series_index(dset, v3); if (v == dset->v && dataset_add_series(dset, 1)) return 12; if (tm) { strcpy(dset->varname[v], "time"); v5 = gettext("time t...
int gen_time(DATASET *dset, int tm, int *vnum) { int v, t; v = series_index(dset, (tm) ? "time" : "index"); if (v == dset->v && dataset_add_series(dset, 1)) { return E_ALLOC; } if (tm) { strcpy(dset->varname[v], "time"); series_set_label(dset, v, _("time trend variable")); } else { strcpy...
gen_time
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_type_from_gretl_type(GretlType t) { int i; for (i = 0; i < 7; ++i) { if (t == conversions[i].t) return conversions[i].gen_t; } return 86; }
static int gen_type_from_gretl_type(GretlType t) { int i, n = G_N_ELEMENTS(conversions); for (i = 0; i < n; i++) { if (t == conversions[i].t) { return conversions[i].gen_t; } } return UNDEF; }
gen_type_from_gretl_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_type_is_arrayable(int gen_t) { GretlType v1; v1 = gretl_type_from_gen_type(gen_t); return gretl_is_arrayable_type(v1); }
static int gen_type_is_arrayable(int gen_t) { return gretl_is_arrayable_type(gretl_type_from_gen_type(gen_t)); }
gen_type_is_arrayable
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_unit(DATASET *dset, int *vnum) { char *v3; int xt; int t; int i; xt = 0; if (dset->structure == 2) { i = series_index(dset, "unit"); if (i == dset->v && dataset_add_series(dset, 1)) { return 12; } else { strcpy(dset->varname[i], "unit"); v3 = gettext("cross-sectional u...
int gen_unit(DATASET *dset, int *vnum) { int xt = 0; int i, t; if (dset->structure != STACKED_TIME_SERIES) { gretl_errmsg_set("'genr unit' can be used only with " "panel data"); return E_DATA; } i = series_index(dset, "unit"); if (i == dset->v && dataset_add_series(dset, 1)) ...
gen_unit
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gen_wkday(DATASET *dset, int *vnum) { char *v3; int t; int i; char datestr[24]; unsigned long v7; v7 = __readfsqword(0x28u); if (!dset || dset->structure != 1 || dset->pd != 5 && dset->pd != 6 && dset->pd != 7 || dset->sd0 <= 10000.0) return 10; i = series_index(dset, "weekday"); if (i ...
int gen_wkday(DATASET *dset, int *vnum) { char datestr[OBSLEN]; int i, t; if (!dated_daily_data(dset)) { return E_PDWRONG; } i = series_index(dset, "weekday"); if (i == dset->v && dataset_add_series(dset, 1)) { return E_ALLOC; } strcpy(dset->varname[i], "weekday"); series_set_label(dset, i...
gen_wkday
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gen_write_label(parser *p, int oldv) { const char *src; char tmp[136]; unsigned long v4; v4 = __readfsqword(0x28u); src = 0; if (p->targ == 55 && !p->lh.expr) { maybe_record_lag_info(p); if (oldv > p->lh.vnum && p->targ == 55) series_set_mtime(p->dset, p->lh.vnum); if (p->lh.label &&...
static void gen_write_label(parser *p, int oldv) { const char *src = NULL; if (p->targ != SERIES) { return; } if (p->lh.expr != NULL) { return; } maybe_record_lag_info(p); if (p->lh.vnum < oldv && p->targ == SERIES) { series_set_mtime(p->dset, p->lh.vnum); } if (p->lh.label != NULL ...
gen_write_label
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gen_write_message(const parser *p, int oldv, PRN *prn) { char *v3; unsigned int v4; char *v5; char *v6; char *v7; char *v8; char *v9; char *v10; char *v11; int targ; unsigned int vnum; int t; char *name; NODE *lh1; gretl_matrix *m; name = p->lh.name; targ = p->targ; vnum = p->l...
static void gen_write_message(const parser *p, int oldv, PRN *prn) { const char *name = p->lh.name; int targ = p->targ; int vnum = p->lh.vnum; int t = p->lh.t; if (p->lhres != NULL) { NODE *lhs = p->lhres; NODE *lh1 = lhs->L; if (lh1->vname != NULL) { name = lh1->vname; t = targ = ...
gen_write_message
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int generate(const char *line, DATASET *dset, GretlType gtype, gretlopt opt, PRN *prn) { int v; int flags; GretlType targtype; int oldv; const char *subline; parser p; char vname[40]; unsigned long v15; v15 = __readfsqword(0x28u); memset(vname, 0, 32); subline = 0; flags = 0; tar...
int generate(const char *line, DATASET *dset, GretlType gtype, gretlopt opt, PRN *prn) { char vname[VNAMELEN] = {0}; const char *subline = NULL; int oldv, flags = 0; int targtype = UNK; parser p; if (line == NULL) { return E_ARGS; } if (gtype == GRETL_TYPE_NONE) { flags |= P_DISCA...
generate
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0