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
void urlinfo_finalize(urlinfo *u, char **getbuf, int *err) { if (u->fp) { fclose(u->fp); } else if (getbuf) { *getbuf = u->getbuf; } if (*err && u->localfile) gretl_remove(u->localfile); if ((u->saveopt == 1 || u->saveopt == 2) && !u->datalen) *err = 2; }
static void urlinfo_finalize(urlinfo *u, char **getbuf, int *err) { if (u->fp != NULL) { fclose(u->fp); } else if (getbuf != NULL) { *getbuf = u->getbuf; } if (*err && u->localfile != NULL) { gretl_remove(u->localfile); } if (u->saveopt == SAVE_TO_FILE || u->saveopt == SAVE_TO_BUFFER) { if...
urlinfo_finalize
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void urlinfo_init(urlinfo *u, const char *hostname, int saveopt, const char *localfile) { memset(u, 0, 0x400u); if (hostname) sprintf(u->url, "http://%s", hostname); u->localfile = localfile; u->saveopt = saveopt; u->getbuf = 0; u->fp = 0; u->buflen = 0; u->datalen = 0; u->err = ...
static void urlinfo_init(urlinfo *u, const char *hostname, int saveopt, const char *localfile) { memset(u->url, 0, URLLEN); if (hostname != NULL) { sprintf(u->url, "http://%s", hostname); } u->localfile = localfile; u->saveopt = saveopt; u->getbuf = NULL; u->fp = NULL; u...
urlinfo_init
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void urlinfo_set_params(urlinfo *u, CGIOpt opt, const char *fname, const char *series, int filter) { const char *v5; char fstr[12]; unsigned long v10; v10 = __readfsqword(0x28u); strcpy(&u->url[strlen(u->url)], "?opt="); v5 = print_option(opt); strcat(u->url, v5); if (fname) { ...
static void urlinfo_set_params(urlinfo *u, CGIOpt opt, const char *fname, const char *series, int filter) { strcat(u->url, "?opt="); strcat(u->url, print_option(opt)); if (fname != NULL) { if (opt == GRAB_FILE || opt == GRAB_FUNC || opt == GRAB_FUNC_INFO || opt == FUNC_...
urlinfo_set_params
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void urlinfo_set_show_progress(urlinfo *u) { int (*show_progress)(...); show_progress = (int (*)(...))get_plugin_function("show_progress"); if (show_progress) u->progfunc = show_progress; }
static void urlinfo_set_show_progress(urlinfo *u) { int (*show_progress)(double, double, int) = NULL; show_progress = get_plugin_function("show_progress"); if (show_progress != NULL) { u->progfunc = show_progress; } }
urlinfo_set_show_progress
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void urlinfo_set_url(urlinfo *u, const char *url) { memset(u, 0, 0x400u); strncat(u->url, url, 0x3FFu); }
static void urlinfo_set_url(urlinfo *u, const char *url) { memset(u->url, 0, URLLEN); strncat(u->url, url, URLLEN - 1); }
urlinfo_set_url
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int usable_groups_series(DATASET *dset, int v, const char *vname) { int i; int j; int g; int ok; double *x; x = dset->Z[v]; g = 0; ok = 1; if (fabs(*x) > 1.797693134862316e308) return 0; for (i = 1; i < dset->n && ok; ++i) { if (fabs(x[i]) <= 1.797693134862316e308) { if (i % dset->pd)...
static int usable_groups_series(DATASET *dset, int v, const char *vname) { const double *x = dset->Z[v]; int i, j, g = 0; int ok = 1; if (na(x[0])) { return 0; } for (i = 1; i < dset->n && ok; i++) { if (na(x[i])) { ok = 0; } else if (i % dset->pd == 0) { for (j = 0; j <= g; j++) ...
usable_groups_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int usable_obs(const double *x, const double *y0, const double *y1, int t, const double **py) { *py = y0; if (fabs(x[t]) <= 1.797693134862316e308 && fabs(y0[t]) <= 1.797693134862316e308) return 1; if (fabs(x[t]) > 1.797693134862316e308 || !y1 || fabs(y1[t]) > 1.797693134862316e308) ...
static int usable_obs(const double *x, const double *y0, const double *y1, int t, const double **py) { *py = y0; if (!na(x[t]) && !na(y0[t])) { return 1; } else if (!na(x[t]) && y1 != NULL && !na(y1[t])) { *py = y1; return 1; } else { return 0; } }
usable_obs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int use_blas(int m, int n, int k) { return blas_mnk_min >= 0 && n * (long)m * k >= (unsigned long)blas_mnk_min; }
static int use_blas(int m, int n, int k) { #if BLAS_DEBUG fprintf(stderr, "use_blas ? mnk_min = %d\n", blas_mnk_min); #endif if (blas_mnk_min >= 0) { guint64 mnk = (guint64)m * n * k; #if BLAS_DEBUG fprintf(stderr, " and mnk = %g\n", mnk); #endif return mnk >= (guint64)blas_mnk_min; } else { retu...
use_blas
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int use_impulses(gnuplot_info *gi) { int i; if (gi->withlist) { for (i = 1; i <= *gi->withlist; ++i) { if (gi->withlist[i] == 2) return 1; } } return 0; }
static int use_impulses(gnuplot_info *gi) { if (gi->withlist != NULL) { int i; for (i = 1; i <= gi->withlist[0]; i++) { if (gi->withlist[i] == W_IMPULSES) { return 1; } } } return 0; }
use_impulses
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int use_lines(gnuplot_info *gi) { int i; if (gi->withlist) { for (i = 1; i <= *gi->withlist; ++i) { if (gi->withlist[i] == 1) return 1; } } return 0; }
static int use_lines(gnuplot_info *gi) { if (gi->withlist != NULL) { int i; for (i = 1; i <= gi->withlist[0]; i++) { if (gi->withlist[i] == W_LINES) { return 1; } } } return 0; }
use_lines
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int use_uvh1() { return current_function_size() > 40; }
static inline int use_uvh1(void) { return current_function_size() > 40; }
use_uvh1
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_BFGS(gretl_matrix *b, const char *fncall, const char *gradcall, DATASET *dset, const gretl_matrix *bounds, int minimize, PRN *prn, int *err) { int rows; int (*v10)(double *, double *, int, BFGS_CRIT_FUNC, void *); int (*v11)(double *, double *, int, BFGS_CRIT_FUNC, vo...
double user_BFGS(gretl_matrix *b, const char *fncall, const char *gradcall, DATASET *dset, const gretl_matrix *bounds, int minimize, PRN *prn, int *err) { umax *u; gretlopt opt = OPT_NONE; int maxit = BFGS_MAXITER_DEFAULT; int verbose, fcount = 0, gcount = 0; double tol; do...
user_BFGS
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_NR(gretl_matrix *b, const char *fncall, const char *gradcall, const char *hesscall, DATASET *dset, int minimize, PRN *prn, int *err) { int rows; int (*v10)(double *, gretl_matrix *, void *); int (*v11)(double *, double *, int, BFGS_CRIT_FUNC, void *); int iters; gretl...
double user_NR(gretl_matrix *b, const char *fncall, const char *gradcall, const char *hesscall, DATASET *dset, int minimize, PRN *prn, int *err) { umax *u; double crittol = 1.0e-7; double gradtol = 1.0e-7; gretlopt opt = OPT_NONE; int maxit = 100; int iters = 0; double ret = ...
user_NR
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_calc_fvec(int m, int n, double *x, double *fvec, int *iflag, void *p) { int cols; int i; int ia; int err; gretl_matrix *v; for (i = 0; i < n; ++i) *(double *)(*(_QWORD *)(*((_QWORD *)p + 2) + 8LL) + 8LL * i) = x[i]; err = execute_genr(*((parser **)p + 6), *((DATASET **)p + 19), ...
static int user_calc_fvec(int m, int n, double *x, double *fvec, int *iflag, void *p) { umax *u = (umax *)p; gretl_matrix *v; int i, err; for (i = 0; i < n; i++) { u->b->val[i] = x[i]; } #if JAC_DEBUG gretl_matrix_print(u->b, "user_calc_fvec: u->b"); #endif err = execute_g...
user_calc_fvec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_fdjac(gretl_matrix *theta, const char *fncall, double eps, DATASET *dset, int *err) { int rows; int cols; int iflag; int nnf; int i; int n; int m; int quality; gretl_matrix *J; double *wa; double *fvec; umax *u; unsigned long v20; v20 = __readfsqw...
gretl_matrix *user_fdjac(gretl_matrix *theta, const char *fncall, double eps, DATASET *dset, int *err) { umax *u; gretl_matrix *J = NULL; int m, n, nnf = 0; int iflag = 0; double *wa = NULL; double *fvec = NULL; int i; *err = 0; u = umax_new(GRETL_TYPE_MATRIX); if (u == NU...
user_fdjac
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_func_get_return_type(const ufunc *fun) { if (fun) return fun->rettype; else return 0; }
int user_func_get_return_type(const ufunc *fun) { if (fun == NULL) { return GRETL_TYPE_NONE; } else { return fun->rettype; } }
user_func_get_return_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_func_is_menu_only(const ufunc *fun) { if (fun) return fun->flags & 8; else return 0; }
int user_func_is_menu_only(const ufunc *fun) { if (fun == NULL) { return 0; } else { return function_is_menu_only(fun); } }
user_func_is_menu_only
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_func_is_noprint(const ufunc *fun) { if (fun) return fun->flags & 4; else return 0; }
int user_func_is_noprint(const ufunc *fun) { if (fun == NULL) { return 0; } else { return function_is_noprint(fun); } }
user_func_is_noprint
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_function_help(const char *fnname, gretlopt opt, PRN *prn) { char *v3; int err; ufunc *fun; fun = get_user_function_by_name(fnname); err = 0; if (fun) { real_user_function_help(fun, opt, prn); } else { v3 = gettext("\"%s\" is not defined.\n"); pprintf(prn, v3, fnname); return 1; ...
int user_function_help(const char *fnname, gretlopt opt, PRN *prn) { ufunc *fun = get_user_function_by_name(fnname); int err = 0; if (fun == NULL) { pprintf(prn, _("\"%s\" is not defined.\n"), fnname); err = 1; } else { real_user_function_help(fun, opt, prn); } return err; }
user_function_help
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_function_index_by_name(const char *name, fnpkg *pkg) { int i; for (i = 0; i < n_ufuns; ++i) { if ((!pkg || pkg == ufuns[i]->pkg) && !strcmp(name, ufuns[i]->name)) return i; } return -1; }
int user_function_index_by_name(const char *name, fnpkg *pkg) { int i; for (i = 0; i < n_ufuns; i++) { if ((pkg == NULL || ufuns[i]->pkg == pkg) && !strcmp(name, ufuns[i]->name)) { return i; } } return -1; }
user_function_index_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *user_function_name_by_index(int i) { if (i < 0 || i >= n_ufuns) return 0; else return ufuns[i]->name; }
const char *user_function_name_by_index(int i) { if (i >= 0 && i < n_ufuns) { return ufuns[i]->name; } else { return NULL; } }
user_function_name_by_index
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_function_set_debug(const char *name, int debug) { ufunc *fun; if (!name || !*name) return 15; fun = get_user_function_by_name(name); if (!fun) return 14; fun->debug = debug; return 0; }
int user_function_set_debug(const char *name, int debug) { ufunc *fun; if (name == NULL || *name == '\0') { return E_ARGS; } fun = get_user_function_by_name(name); if (fun == NULL) { return E_UNKVAR; } else { fun->debug = debug; return 0; } }
user_function_set_debug
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_gen_setup(umax *u, const char *fncall, const char *gradcall, const char *hesscall, DATASET *dset) { int err; gchar *formula; unsigned long v11; v11 = __readfsqword(0x28u); err = check_optimizer_callback(u, fncall); if (!err && gradcall) err = check_optimizer_callback(u, grad...
static int user_gen_setup(umax *u, const char *fncall, const char *gradcall, const char *hesscall, DATASET *dset) { gchar *formula; int err; err = check_optimizer_callback(u, fncall); if (!err && gradcall != NULL) { err = check_optimizer_callback(u, gradcall); } if (!err && he...
user_gen_setup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_gensymm_eigenvals(const gretl_matrix *A, const gretl_matrix *B, gretl_matrix *V, int *err) { gretl_matrix *E; E = 0; if (A && A->rows && A->cols && B && B->rows && B->cols) { if (gretl_matrix_na_check(A) || gretl_mat...
gretl_matrix *user_gensymm_eigenvals(const gretl_matrix *A, const gretl_matrix *B, gretl_matrix *V, int *err) { gretl_matrix *E = NULL; if (gretl_is_null_matrix(A) || gretl_is_null_matrix(B)) { *err = E_DATA; return NULL; } if (...
user_gensymm_eigenvals
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_get_criterion(const double *b, void *p) { int i; GretlType t; double x; gretl_matrix *m; x = NAN; for (i = 0; i < *((_DWORD *)p + 10); ++i) *(double *)(*(_QWORD *)(*((_QWORD *)p + 2) + 8LL) + 8LL * i) = b[i]; if (execute_genr(*((parser **)p + 6), *((DATASET **)p + 19), ...
static double user_get_criterion(const double *b, void *p) { umax *u = (umax *)p; double x = NADBL; int i, t, err; for (i = 0; i < u->ncoeff; i++) { u->b->val[i] = b[i]; } err = execute_genr(u->gf, u->dset, u->prn); if (err) { return NADBL; } t = genr_get_output_type(u->gf); if (t == GR...
user_get_criterion
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_get_criterion2(double b, void *p) { GretlType t; double x; gretl_matrix *m; x = NAN; gretl_scalar_set_value(*((const char **)p + 1), b); if (execute_genr(*((parser **)p + 6), *((DATASET **)p + 19), *((PRN **)p + 20))) return NAN; t = genr_get_output_type(*((const parser...
static double user_get_criterion2(double b, void *p) { umax *u = (umax *)p; double x = NADBL; int t, err; gretl_scalar_set_value(u->pxname, b); err = execute_genr(u->gf, u->dset, u->prn); if (err) { return NADBL; } t = genr_get_output_type(u->gf); if (t == GRETL_TYPE_DOUBLE) { x = genr_get...
user_get_criterion2
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_get_gradient(double *b, double *g, int k, BFGS_CRIT_FUNC func, void *p) { int rows; int i; int ia; int err; gretl_matrix *ug; for (i = 0; i < k; ++i) *(double *)(*(_QWORD *)(*((_QWORD *)p + 2) + 8LL) + 8LL * i) = b[i]; err = execute_genr(*((parser **)p + 7), *((DATASET ...
static int user_get_gradient(double *b, double *g, int k, BFGS_CRIT_FUNC func, void *p) { umax *u = (umax *)p; gretl_matrix *ug; int i, err; for (i = 0; i < k; i++) { u->b->val[i] = b[i]; } err = execute_genr(u->gg, u->dset, u->prn); if (err) { return err; } ug...
user_get_gradient
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_get_hessian(double *b, gretl_matrix *H, void *p) { int i; int err; int k; gretl_matrix *uH; k = H->rows; for (i = 0; i < k; ++i) *(double *)(*(_QWORD *)(*((_QWORD *)p + 2) + 8LL) + 8LL * i) = b[i]; err = execute_genr(*((parser **)p + 8), *((DATASET **)p + 19), *((PRN **)...
static int user_get_hessian(double *b, gretl_matrix *H, void *p) { umax *u = (umax *)p; gretl_matrix *uH; int k = H->rows; int i, err; for (i = 0; i < k; i++) { u->b->val[i] = b[i]; } err = execute_genr(u->gh, u->dset, u->prn); if (err) { return err; } uH = get_matrix_by_name(u->hmname);...
user_get_hessian
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_list_append(user_var *uvar, const int *add) { int err; int *tmp; const int *list; unsigned long v6; v6 = __readfsqword(0x28u); if (!uvar || user_var_get_type(uvar) != GRETL_TYPE_LIST) return 2; list = (const int *)user_var_get_value(uvar); tmp = gretl_list_copy(list); if (!tmp) retur...
int user_list_append(user_var *uvar, const int *add) { int err = 0; if (uvar == NULL || user_var_get_type(uvar) != GRETL_TYPE_LIST) { err = E_DATA; } else { const int *list = user_var_get_value(uvar); int *tmp = gretl_list_copy(list); if (tmp == NULL) { err = E_ALLOC; } else { er...
user_list_append
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_list_replace(user_var *uvar, const int *src) { int err; int *tmp; err = 0; if (!uvar || user_var_get_type(uvar) != GRETL_TYPE_LIST) return 2; tmp = gretl_list_copy(src); if (!tmp) return 12; user_var_replace_value(uvar, tmp, GRETL_TYPE_LIST); return err; }
int user_list_replace(user_var *uvar, const int *src) { int err = 0; if (uvar == NULL || user_var_get_type(uvar) != GRETL_TYPE_LIST) { err = E_DATA; } else { int *tmp = gretl_list_copy(src); if (tmp == NULL) { err = E_ALLOC; } else { user_var_replace_value(uvar, tmp, GRETL_TYPE_LIST)...
user_list_replace
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_list_subtract(user_var *uvar, int *sub, const DATASET *dset) { int err; const int *list; int *tmp; unsigned long v8; v8 = __readfsqword(0x28u); err = 0; if (!uvar || user_var_get_type(uvar) != GRETL_TYPE_LIST) return 2; list = (const int *)user_var_get_value(uvar); if (gretl_function_dep...
int user_list_subtract(user_var *uvar, int *sub, const DATASET *dset) { int err = 0; if (uvar == NULL || user_var_get_type(uvar) != GRETL_TYPE_LIST) { err = E_DATA; } else { const int *list = user_var_get_value(uvar); int *tmp; if (gretl_function_depth() > 0) { check_auto_time_var(list, su...
user_list_subtract
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_GHK(const gretl_matrix *C, const gretl_matrix *A, const gretl_matrix *B, const gretl_matrix *U, gretl_matrix *dP, int *err) { gretl_matrix *P; P = 0; if (A && A->rows && A->cols && C && C->rows && C->cols) { if (dP) *...
gretl_matrix *user_matrix_GHK(const gretl_matrix *C, const gretl_matrix *A, const gretl_matrix *B, const gretl_matrix *U, gretl_matrix *dP, int *err) { gretl_matrix *P = NULL; int n, m, npar; if (gretl_is_null_matrix(A) || gretl_is_null_matrix(C)) { ...
user_matrix_GHK
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_QR_decomp(const gretl_matrix *m, gretl_matrix *R, int *err) { gretl_matrix **p_Rtmp; gretl_matrix *Q; gretl_matrix *Rtmp; gretl_matrix **pR; unsigned long v9; v9 = __readfsqword(0x28u); Q = 0; Rtmp = 0; if (m && m->rows && m->cols) { i...
gretl_matrix *user_matrix_QR_decomp(const gretl_matrix *m, gretl_matrix *R, int *err) { gretl_matrix *Q = NULL; gretl_matrix *Rtmp = NULL; gretl_matrix **pR; if (gretl_is_null_matrix(m)) { *err = E_DATA; return NULL; } pR = (R != NULL) ? &Rtmp : NULL; *err = ...
user_matrix_QR_decomp
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_SVD(const gretl_matrix *m, gretl_matrix *U, gretl_matrix *V, int *err) { gretl_matrix **p_Utmp; gretl_matrix **p_Vtmp; int v7; gretl_matrix *S; gretl_matrix *Utmp; gretl_matrix *Vtmp; gretl_matrix **pU; gretl_matrix **pV; unsigned long v15; v1...
gretl_matrix *user_matrix_SVD(const gretl_matrix *m, gretl_matrix *U, gretl_matrix *V, int *err) { gretl_matrix *S = NULL; gretl_matrix *Utmp = NULL; gretl_matrix *Vtmp = NULL; gretl_matrix **pU, **pV; if (gretl_is_null_matrix(m)) { *err = E_DATA; return NULL; } pU ...
user_matrix_SVD
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_eigensym(const gretl_matrix *m, gretl_matrix *R, int *err) { _BOOL4 vecs; gretl_matrix *E; gretl_matrix *C; E = 0; if (m && m->rows && m->cols) { if (gretl_matrix_na_check(m)) { *err = 35; return 0; } else { vecs = R != 0;...
gretl_matrix *user_matrix_eigensym(const gretl_matrix *m, gretl_matrix *R, int *err) { gretl_matrix *C = NULL; gretl_matrix *E = NULL; int vecs = 0; if (gretl_is_null_matrix(m)) { *err = E_DATA; return NULL; } if (gretl_matrix_na_check(m)) { *err = E_NAN; ...
user_matrix_eigensym
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *user_matrix_get_column_name(const gretl_matrix *M, int col, int *err) { char *ret; const char **S; ret = 0; if (M && col > 0 && col <= M->cols) { S = gretl_matrix_get_colnames(M); if (S) ret = gretl_strdup(S[col - 1]); else ret = gretl_strdup(&byte_34F64D); if (!ret) *er...
char *user_matrix_get_column_name(const gretl_matrix *M, int col, int *err) { char *ret = NULL; if (M == NULL || col < 1 || col > M->cols) { *err = E_DATA; } else { const char **S = gretl_matrix_get_colnames(M); if (S == NULL) { ret = gretl_strdup(""); } else { ret = gretl_strdup(S[c...
user_matrix_get_column_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_matrix_get_determinant(gretl_matrix *m, int tmpmat, int f, int *err) { gretl_matrix *R; double d; d = NAN; if (!m || !m->rows || !m->cols) return NAN; if (tmpmat) R = m; else R = gretl_matrix_copy(m); if (R) { if (f == 334) d = gretl_ma...
double user_matrix_get_determinant(gretl_matrix *m, int tmpmat, int f, int *err) { gretl_matrix *R = NULL; double d = NADBL; if (gretl_is_null_matrix(m)) { return d; } else if (tmpmat) { R = m; } else { R = gretl_matrix_copy(m); } if (R != NULL) { if ...
user_matrix_get_determinant
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *user_matrix_get_row_name(const gretl_matrix *M, int row, int *err) { char *ret; const char **S; ret = 0; if (M && row > 0 && row <= M->rows) { S = gretl_matrix_get_rownames(M); if (S) ret = gretl_strdup(S[row - 1]); else ret = gretl_strdup(&byte_34F64D); if (!ret) *err =...
char *user_matrix_get_row_name(const gretl_matrix *M, int row, int *err) { char *ret = NULL; if (M == NULL || row < 1 || row > M->rows) { *err = E_DATA; } else { const char **S = gretl_matrix_get_rownames(M); if (S == NULL) { ret = gretl_strdup(""); } else { ret = gretl_strdup(S[row ...
user_matrix_get_row_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_ols(const gretl_matrix *Y, const gretl_matrix *X, gretl_matrix *U, gretl_matrix *V, gretlopt opt, int *err) { double *p_Vtmp; int v8; gretl_matrix **v9; short opta; int k; int g; gretl_matrix *Vtmp; gretl_matrix *B; ...
gretl_matrix *user_matrix_ols(const gretl_matrix *Y, const gretl_matrix *X, gretl_matrix *U, gretl_matrix *V, gretlopt opt, int *err) { gretl_matrix *B = NULL; int g, k, T; if (gretl_is_null_matrix(Y) || X == NULL) { *err = E_DATA; return NULL; ...
user_matrix_ols
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_matrix_replace_matrix_by_name(const char *name, gretl_matrix *m) { user_var *u; u = get_user_var_by_name(name); if (u) return user_var_replace_value(u, m, GRETL_TYPE_MATRIX); else return 2; }
int user_matrix_replace_matrix_by_name(const char *name, gretl_matrix *m) { user_var *u = get_user_var_by_name(name); if (u != NULL) { return user_var_replace_value(u, m, GRETL_TYPE_MATRIX); } else { return E_DATA; } }
user_matrix_replace_matrix_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_rls(const gretl_matrix *Y, const gretl_matrix *X, const gretl_matrix *R, const gretl_matrix *Q, gretl_matrix *U, gretl_matrix *V, int *err) { gretl_matrix **v8; int k; int g; gretl_matrix *Vtmp; gretl_matrix *B; gretl_matr...
gretl_matrix *user_matrix_rls(const gretl_matrix *Y, const gretl_matrix *X, const gretl_matrix *R, const gretl_matrix *Q, gretl_matrix *U, gretl_matrix *V, int *err) { gretl_matrix *B = NULL; int g, k, T; if (gretl_is_null_matrix(Y) || gretl_is_null_mat...
user_matrix_rls
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_unvech(const gretl_matrix *m, int *err) { double v2; gretl_matrix *R; R = 0; if (m && m->rows && m->cols) { if (m->cols == 1) { v2 = sqrt((double)m->rows * 8.0 + 1.0); R = gretl_matching_matrix_new((int)((v2 - 1.0) / 2.0), (int)((v2 ...
gretl_matrix *user_matrix_unvech(const gretl_matrix *m, int *err) { gretl_matrix *R = NULL; if (gretl_is_null_matrix(m)) { R = gretl_null_matrix_new(); } else if (m->cols != 1) { *err = E_NONCONF; } else { int n = (int)((sqrt(1.0 + 8.0 * m->rows) - 1.0) / 2.0); R = gretl_matching_matrix_new(n,...
user_matrix_unvech
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_vec(const gretl_matrix *m, int *err) { gretl_matrix *R; if (m && m->rows && m->cols) { R = gretl_matching_matrix_new(m->rows * m->cols, 1, m); if (R) gretl_matrix_vectorize(R, m); } else { R = gretl_null_matrix_new(); } if (!R) *err = 12; return R; }
gretl_matrix *user_matrix_vec(const gretl_matrix *m, int *err) { gretl_matrix *R = NULL; if (gretl_is_null_matrix(m)) { R = gretl_null_matrix_new(); } else { R = gretl_matching_matrix_new(m->rows * m->cols, 1, m); if (R != NULL) { gretl_matrix_vectorize(R, m); } } if (R == NULL) { ...
user_matrix_vec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_matrix_vech(const gretl_matrix *m, int *err) { gretl_matrix *R; R = 0; if (m && m->rows && m->cols) { if (m->rows == m->cols) { R = gretl_matching_matrix_new(m->rows * (m->rows + 1) / 2, 1, m); if (R) *err = gretl_matrix_vectorize_h(R, m); } else { *err = 36; ...
gretl_matrix *user_matrix_vech(const gretl_matrix *m, int *err) { gretl_matrix *R = NULL; if (gretl_is_null_matrix(m)) { R = gretl_null_matrix_new(); } else if (m->rows != m->cols) { *err = E_NONCONF; } else { int n = m->rows; int k = n * (n + 1) / 2; R = gretl_matching_matrix_new(k, 1, m)...
user_matrix_vech
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *user_numhess(gretl_matrix *b, const char *fncall, double d, DATASET *dset, int *err) { int rows; int n; gretl_matrix *H; gchar *formula; uhess_data uh; unsigned long v13; v13 = __readfsqword(0x28u); H = 0; uh.genr = 0; uh.dset = 0; formula = 0; if (get_u...
gretl_matrix *user_numhess(gretl_matrix *b, const char *fncall, double d, DATASET *dset, int *err) { gretl_matrix *H = NULL; struct uhess_data uh = {0}; gchar *formula = NULL; int n; if (get_user_var_by_data(b) == NULL) { fprintf(stderr, "numhess: b must be a named matrix\n"); ...
user_numhess
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *user_string_reset(const char *name, const char *repl, int *err) { char *v4; user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_STRING); if (u) { free(u->ptr); if (repl) v4 = gretl_strdup(repl); else v4 = gretl_strdup(byte_34F716); u->ptr = v4; return (char *)u-...
char *user_string_reset(const char *name, const char *repl, int *err) { user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_STRING); if (u == NULL) { *err = E_INVARG; return NULL; } else { free(u->ptr); if (repl == NULL) { u->ptr = gretl_strdup(""); } else { u->ptr =...
user_string_reset
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *user_string_resize(const char *name, size_t len, int *err) { user_var *u; char *orig; char *tmp; u = get_user_var_of_type_by_name(name, GRETL_TYPE_STRING); if (u) { orig = (char *)u->ptr; if (!orig || len > strlen(orig) + 1) { tmp = (char *)realloc(u->ptr, len); if (tmp) u->...
char *user_string_resize(const char *name, size_t len, int *err) { user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_STRING); if (u == NULL) { *err = E_INVARG; return NULL; } else { char *orig = u->ptr; if (orig == NULL || len > strlen(orig) + 1) { char *tmp = realloc(u->pt...
user_string_resize
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_add(const char *name, GretlType type, void *value) { return real_user_var_add(name, type, value, OPT_NONE); }
int user_var_add(const char *name, GretlType type, void *value) { return real_user_var_add(name, type, value, OPT_NONE); }
user_var_add
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_add_or_replace(const char *name, GretlType type, void *value) { int err; user_var *u; u = get_user_var_by_name(name); err = 0; if (!u) return real_user_var_add(name, type, value, OPT_NONE); if (type == GRETL_TYPE_STRINGS || type == GRETL_TYPE_MATRICES || type == GRETL_TYPE_BUNDLES ||...
int user_var_add_or_replace(const char *name, GretlType type, void *value) { user_var *u = get_user_var_by_name(name); int err = 0; if (u != NULL) { if (gretl_array_type(type)) { err = check_array_type_compat(type, u); } else if (u->type != type) { err = E_TYPES; } if (!err) { e...
user_var_add_or_replace
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_adjust_level(user_var *uvar, int adj) { if (!uvar) return 14; uvar->level += adj; return 0; }
int user_var_adjust_level(user_var *uvar, int adj) { if (uvar == NULL) { return E_UNKVAR; } else { uvar->level += adj; return 0; } }
user_var_adjust_level
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_count_for_type(GretlType type) { int i; int n; n = 0; for (i = 0; i < n_vars_0; ++i) { if (type == uvars[i]->type) ++n; } return n; }
static int user_var_count_for_type(GretlType type) { int i, n = 0; for (i = 0; i < n_vars; i++) { if (uvars[i]->type == type) { n++; } } return n; }
user_var_count_for_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_delete(user_var *uvar) { int i; int j; int err; err = 14; for (i = 0; i < n_vars_0; ++i) { if (uvar == uvars[i]) { user_var_destroy(uvars[i]); for (j = i; j < n_vars_0 - 1; ++j) uvars[j] = uvars[j + 1]; set_nvars(n_vars_0 - 1, "user_var_delete"); return 0; ...
int user_var_delete(user_var *uvar) { int i, j, err = E_UNKVAR; for (i = 0; i < n_vars; i++) { if (uvar == uvars[i]) { user_var_destroy(uvars[i]); for (j = i; j < n_vars - 1; j++) { uvars[j] = uvars[j + 1]; } set_nvars(n_vars - 1, "user_var_delete"); err = 0; break; ...
user_var_delete
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_delete_by_name(const char *name, PRN *prn) { char *v3; int i; int j; int k; GretlType type; int level; user_var *targ; level = gretl_function_depth(); targ = 0; k = 0; for (i = 0; i < n_vars_0; ++i) { if (level == uvars[i]->level && !strcmp(uvars[i]->name, name)) { targ = u...
int user_var_delete_by_name(const char *name, PRN *prn) { GretlType type = 0; int level = gretl_function_depth(); user_var *targ = NULL; int i, j, k = 0; int err = 0; for (i = 0; i < n_vars; i++) { if (uvars[i]->level == level && !strcmp(uvars[i]->name, name)) { targ = uvars[i]; k = i; ...
user_var_delete_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void user_var_destroy(user_var *u) { if (uvars_hash) g_hash_table_remove(uvars_hash, u->name); if ((u->flags & 2) == 0) uvar_free_value(u); free(u); }
static void user_var_destroy(user_var *u) { #if HDEBUG fprintf(stderr, "user_var_destroy: '%s' (level %d)\n", u->name, u->level); #endif if (uvars_hash != NULL) { #if HDEBUG if (g_hash_table_remove(uvars_hash, u->name)) { fprintf(stderr, "removed '%s' from hash table at %p\n", u->name, (voi...
user_var_destroy
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_get_flags(user_var *uvar) { if (uvar) return uvar->flags; else return 0; }
int user_var_get_flags(user_var *uvar) { return (uvar == NULL) ? 0 : (int)uvar->flags; }
user_var_get_flags
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_get_level(user_var *uvar) { if (uvar) return uvar->level; else return -1; }
int user_var_get_level(user_var *uvar) { return (uvar == NULL) ? -1 : uvar->level; }
user_var_get_level
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *user_var_get_name(user_var *uvar) { if (uvar) return uvar->name; else return 0; }
const char *user_var_get_name(user_var *uvar) { return uvar == NULL ? NULL : uvar->name; }
user_var_get_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *user_var_get_name_by_data(const void *data) { user_var *u; u = get_user_var_by_data(data); if (u) return u->name; else return 0; }
const char *user_var_get_name_by_data(const void *data) { user_var *u = get_user_var_by_data(data); return u == NULL ? NULL : u->name; }
user_var_get_name_by_data
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double user_var_get_scalar_value(user_var *uvar) { if (uvar && uvar->type == GRETL_TYPE_DOUBLE) return *(double *)uvar->ptr; else return NAN; }
double user_var_get_scalar_value(user_var *uvar) { if (uvar != NULL && uvar->type == GRETL_TYPE_DOUBLE) { return *(double *)uvar->ptr; } else { return NADBL; } }
user_var_get_scalar_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GretlType user_var_get_type(user_var *uvar) { if (uvar) return uvar->type; else return GRETL_TYPE_NONE; }
GretlType user_var_get_type(user_var *uvar) { return (uvar == NULL) ? 0 : uvar->type; }
user_var_get_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GretlType user_var_get_type_by_name(const char *name) { user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_ANY); if (u) return u->type; else return GRETL_TYPE_NONE; }
GretlType user_var_get_type_by_name(const char *name) { user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_ANY); return u == NULL ? GRETL_TYPE_NONE : u->type; }
user_var_get_type_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *user_var_get_value(user_var *uvar) { if (uvar) return uvar->ptr; else return 0; }
void *user_var_get_value(user_var *uvar) { return (uvar == NULL) ? NULL : uvar->ptr; }
user_var_get_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *user_var_get_value_and_type(const char *name, GretlType *type) { void *ret; user_var *u; ret = 0; u = get_user_var_of_type_by_name(name, GRETL_TYPE_ANY); if (u) { ret = u->ptr; *type = u->type; } else { *type = GRETL_TYPE_NONE; } return ret; }
void *user_var_get_value_and_type(const char *name, GretlType *type) { void *ret = NULL; user_var *u; u = get_user_var_of_type_by_name(name, GRETL_TYPE_ANY); if (u != NULL) { ret = u->ptr; *type = u->type; } else { *type = GRETL_TYPE_NONE; } return ret; }
user_var_get_value_and_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *user_var_get_value_by_name(const char *name) { user_var *u; u = get_user_var_by_name(name); if (u) return u->ptr; else return 0; }
void *user_var_get_value_by_name(const char *name) { user_var *u = get_user_var_by_name(name); return (u == NULL) ? NULL : u->ptr; }
user_var_get_value_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GList *user_var_list_for_type(GretlType type) { int i; GList *list; list = 0; for (i = 0; i < n_vars_0; ++i) { if (type == uvars[i]->type) list = (GList *)g_list_append(list, uvars[i]); } return list; }
GList *user_var_list_for_type(GretlType type) { GList *list = NULL; int i; for (i = 0; i < n_vars; i++) { if (uvars[i]->type == type) { list = g_list_append(list, (gpointer)uvars[i]); } } return list; }
user_var_list_for_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_localize(const char *origname, const char *localname, GretlType type) { GretlType typeb; int err; user_var *u; err = 0; if (array_ref_type(type)) typeb = GRETL_TYPE_ARRAY; else typeb = gretl_type_get_plain_type(type); switch (typeb) { case GRETL_TYPE_SCALAR_RE...
int user_var_localize(const char *origname, const char *localname, GretlType type) { user_var *u; int err = 0; if (array_ref_type(type)) { type = GRETL_TYPE_ARRAY; } else { type = gretl_type_get_plain_type(type); } if (type == GRETL_TYPE_SCALAR_REF) { type = GRETL_TYPE_DO...
user_var_localize
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GList *user_var_names_for_type(GretlType type) { int i; GList *list; list = 0; for (i = 0; i < n_vars_0; ++i) { if (type == uvars[i]->type) list = (GList *)g_list_append(list, uvars[i]->name); } return list; }
GList *user_var_names_for_type(GretlType type) { GList *list = NULL; int i; for (i = 0; i < n_vars; i++) { if (uvars[i]->type == type) { list = g_list_append(list, (gpointer)uvars[i]->name); } } return list; }
user_var_names_for_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
user_var *user_var_new(const char *name, int type, void *value, int *err) { int v5; const char *v6; user_var *u; if (type) { u = (user_var *)malloc(0x38u); if (u) { u->type = type; u->level = gretl_function_depth(); if (u->level) v5 = 0; else v5 = 4; u->fla...
static user_var *user_var_new(const char *name, int type, void *value, int *err) { user_var *u; if (type == GRETL_TYPE_NONE) { *err = E_DATA; fputs("user_var_new: type = GRETL_TYPE_NONE\n", stderr); return NULL; } u = malloc(sizeof *u); if (u == NULL) { *err = ...
user_var_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void user_var_privatize_by_name(const char *name) { user_var *u; u = get_user_var_by_name(name); if (u) u->flags |= 1u; }
void user_var_privatize_by_name(const char *name) { user_var *u = get_user_var_by_name(name); if (u != NULL) { u->flags |= UV_PRIVATE; } }
user_var_privatize_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_replace_value(user_var *uvar, void *value, GretlType type) { const char *name; const char *v4; int err; err = 0; if (uvar) { if (value == uvar->ptr || (uvar->flags & 0x10) == 0) { if (type != uvar->type) { err = 37; if (uvar->type == GRETL_TYPE_ARRAY && uvar->ptr && ...
int user_var_replace_value(user_var *uvar, void *value, GretlType type) { int err = 0; if (uvar == NULL) { err = E_UNKVAR; } else if (value != uvar->ptr && (uvar->flags & UV_NOREPL)) { gretl_errmsg_sprintf("The variable %s is read-only", uvar->name); err = E_DATA; } else if (type != uvar->type) { ...
user_var_replace_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_set_flag(user_var *uvar, UVFlags flag) { if (!uvar) return 17; uvar->flags |= flag; return 0; }
int user_var_set_flag(user_var *uvar, UVFlags flag) { if (uvar != NULL) { uvar->flags |= flag; return 0; } else { return E_INVARG; } }
user_var_set_flag
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_set_name(user_var *uvar, const char *name) { int err; err = 0; if (!uvar) return 2; uvar->name[0] = 0; strncat(uvar->name, name, 0x1Fu); return err; }
int user_var_set_name(user_var *uvar, const char *name) { int err = 0; if (uvar == NULL) { err = E_DATA; } else { *uvar->name = '\0'; strncat(uvar->name, name, VNAMELEN - 1); } return err; }
user_var_set_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_set_scalar_value(user_var *uvar, double x) { if (!uvar || uvar->type != GRETL_TYPE_DOUBLE) return 2; *(double *)uvar->ptr = x; return 0; }
int user_var_set_scalar_value(user_var *uvar, double x) { if (uvar != NULL && uvar->type == GRETL_TYPE_DOUBLE) { *(double *)uvar->ptr = x; return 0; } else { return E_DATA; } }
user_var_set_scalar_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *user_var_steal_value(user_var *uvar) { void *ret; ret = 0; if (uvar) { ret = uvar->ptr; uvar->ptr = 0; } return ret; }
void *user_var_steal_value(user_var *uvar) { void *ret = NULL; if (uvar != NULL) { ret = uvar->ptr; uvar->ptr = NULL; } return ret; }
user_var_steal_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int user_var_unset_flag(user_var *uvar, UVFlags flag) { if (!uvar) return 17; uvar->flags &= ~flag; return 0; }
int user_var_unset_flag(user_var *uvar, UVFlags flag) { if (uvar != NULL) { uvar->flags &= ~flag; return 0; } else { return E_INVARG; } }
user_var_unset_flag
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *user_var_unstack_value(user_var *uvar) { int i; int j; void *ret; ret = 0; for (i = 0; i < n_vars_0; ++i) { if (uvar == uvars[i]) { ret = uvar->ptr; uvars[i]->ptr = 0; user_var_destroy(uvars[i]); for (j = i; j < n_vars_0 - 1; ++j) uvars[j] = uvars[j + 1]; set_n...
void *user_var_unstack_value(user_var *uvar) { void *ret = NULL; int i, j; for (i = 0; i < n_vars; i++) { if (uvar == uvars[i]) { ret = uvar->ptr; uvars[i]->ptr = NULL; user_var_destroy(uvars[i]); for (j = i; j < n_vars - 1; j++) { uvars[j] = uvars[j + 1]; } set_nv...
user_var_unstack_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *uservar_name_complete(const char *s) { int n; const char *ret; GList *hk; ret = 0; if (uvars_hash) { hk = (GList *)g_hash_table_get_keys(uvars_hash); n = strlen(s); while (hk) { if (!strncmp((const char *)hk->data, s, n)) { ret = (const char *)hk->data; break; ...
const char *uservar_name_complete(const char *s) { const char *ret = NULL; if (uvars_hash != NULL) { GList *hk = g_hash_table_get_keys(uvars_hash); int n = strlen(s); while (hk != NULL) { if (!strncmp((const char *)hk->data, s, n)) { ret = (const char *)hk->data; break; } ...
uservar_name_complete
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int using_translated_helpfile(int id) { char *v2; char *v3; int ret; int i; gchar *test; ret = 0; if (id) { if (id != 1) return 0; if (force_en_fnref) return 0; i = 4; } else { if (force_en_cmdref) return 0; i = 1; } v2 = gettext(helpfiles[i]); if (strcmp(hel...
int using_translated_helpfile(int id) { int ret = 0; int i = 0; if (id == GRETL_CMDREF) { if (force_en_cmdref) return 0; i = 1; } else if (id == GRETL_FUNCREF) { if (force_en_fnref) return 0; i = 4; } else { return 0; } if (strcmp(helpfiles[i], _(helpfiles[i]))) { gch...
using_translated_helpfile
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int utf8_encoded(const char *s) { int ret; const unsigned char *p; ret = 0; if ((unsigned int)g_utf8_validate(s, -1, 0)) { for (p = (const unsigned char *)s; *p; ++p) { if (*p <= 0x1Fu || *p > 0x7Eu) return 1; } } return ret; }
int utf8_encoded(const char *s) { int ret = 0; if (g_utf8_validate(s, -1, NULL)) { const unsigned char *p = (const unsigned char *)s; while (*p) { if (*p < 32 || *p > 126) { ret = 1; break; } p++; } } return ret; }
utf8_encoded
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int utf8_ok(gzFile fp, int pos) { unsigned char *next; char v3; int i; int ret; GError *gerr; gsize wrote; long mark; char *test; gchar *tr; unsigned long v12; v12 = __readfsqword(0x28u); mark = gztell(fp); test = (char *)malloc(pos + 10); ret = 0; gzseek(fp, mark - pos - 1, 0); for (i ...
static int utf8_ok(gzFile fp, int pos) { long mark = gztell(fp); int len = pos + 9; char *test = malloc(len + 1); int i, ret = 0; gzseek(fp, mark - pos - 1, SEEK_SET); for (i = 0; i < len; i++) { test[i] = gzgetc(fp); } test[i] = '\0'; if (g_utf8_validate(test, -1, NULL)) { ret = 1; } els...
utf8_ok
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *utf8_to_rtf(const char *s) { long v2; short k; int err; const char *p; char *ret; PRN *prn; const char *nextp; unsigned long v9; v9 = __readfsqword(0x28u); p = s; ret = 0; err = 0; prn = gretl_print_new(GRETL_PRINT_BUFFER, &err); if (!prn) return 0; while (*p) { v2 = *(char ...
char *utf8_to_rtf(const char *s) { const char *nextp, *p = s; short int k; PRN *prn; char *ret = NULL; int err = 0; prn = gretl_print_new(GRETL_PRINT_BUFFER, &err); if (prn == NULL) { return NULL; } while (*p) { nextp = g_utf8_next_char(p); if (nextp - p > 1) { k = (short)g_utf8_ge...
utf8_to_rtf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int uv_tv_from_varnames(const char *uname, const char *tname, const DATASET *dset, int *uv, int *tv) { *uv = current_series_index(dset, uname); if (*uv <= 0) return 2; *tv = current_series_index(dset, tname); if (*tv > 0) return 0; else return 2; }
static int uv_tv_from_varnames(const char *uname, const char *tname, const DATASET *dset, int *uv, int *tv) { *uv = current_series_index(dset, uname); if (*uv <= 0) { return E_DATA; } *tv = current_series_index(dset, tname); if (*tv <= 0) { return E_DATA; } return ...
uv_tv_from_varnames
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void uvar_free_value(user_var *u) { if (u->ptr) { switch (u->type) { case GRETL_TYPE_MATRIX: gretl_matrix_free((gretl_matrix *)u->ptr); break; case GRETL_TYPE_BUNDLE: gretl_bundle_destroy((gretl_bundle *)u->ptr); break; case GRETL_TYPE_STRING: bufgets_finalize((const char...
static void uvar_free_value(user_var *u) { if (u->ptr == NULL) { return; } else if (u->type == GRETL_TYPE_MATRIX) { gretl_matrix_free(u->ptr); } else if (u->type == GRETL_TYPE_BUNDLE) { gretl_bundle_destroy(u->ptr); } else if (u->type == GRETL_TYPE_STRING) { bufgets_finalize(u->ptr); free(u-...
uvar_free_value
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void uvar_hash_destroy() { if (uvh0) { g_hash_table_destroy(uvh0); uvh0 = 0; } if (uvh1) { g_hash_table_destroy(uvh1); uvh1 = 0; } uvars_hash = 0; set_previous_depth(-1); }
static void uvar_hash_destroy(void) { #if HDEBUG fprintf(stderr, "uvar_hash_destroy (uvh0=%p, uvh1=%p)\n", (void *)uvh0, (void *)uvh1); #endif if (uvh0 != NULL) { #if HDEBUG fprintf(stderr, " destroying uvh0\n"); #endif g_hash_table_destroy(uvh0); uvh0 = NULL; } if (uvh1 != NULL) { #if H...
uvar_hash_destroy
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int uvar_levels_match(user_var *u, int level) { int ret; ret = 0; if (level == u->level) return 1; if (level == -1 && ((u->flags & 1) != 0 || u->name[0] == 36 || u->name[0] == 95)) return 1; return ret; }
static int uvar_levels_match(user_var *u, int level) { int ret = 0; if (u->level == level) { ret = 1; } else if (level == LEV_PRIVATE && var_is_private(u)) { ret = 1; } return ret; }
uvar_levels_match
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int uvar_type_match(user_var *u, GretlType t) { if (t == u->type) return 1; if (u->type == GRETL_TYPE_ARRAY && (t == GRETL_TYPE_STRINGS || t == GRETL_TYPE_MATRICES || t == GRETL_TYPE_BUNDLES || t == GRETL_TYPE_LISTS || t == GRETL_TYPE_ARRAYS)) { return t == gretl_array_get_type((gretl_ar...
static int uvar_type_match(user_var *u, GretlType t) { if (u->type == t) { return 1; } else if (u->type == GRETL_TYPE_ARRAY && gretl_array_type(t)) { return t == gretl_array_get_type(u->ptr); } else { return 0; } }
uvar_type_match
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int valid_list_maker(ufunc *u) { if (!u->n_params) return 1; return u->n_params == 1 && u->params->type == 5; }
static int valid_list_maker(ufunc *u) { if (u->n_params == 0) { return 1; } else if (u->n_params == 1 && u->params[0].type == GRETL_TYPE_LIST) { return 1; } else { return 0; } }
valid_list_maker
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretlopt valid_long_opt(int ci, const char *s, OptStatus *status) { gretlopt opt; int i; int ia; int got_ci; int got_cia; int nmatch; int slen; opt = OPT_NONE; got_ci = 0; *status = OPT_NO_PARM; if (!*s) return OPT_NONE; if ((ci == 5 || ci == 6 || ci == 7 || ci == 8 || ci == 28 || ci == 30 ...
gretlopt valid_long_opt(int ci, const char *s, OptStatus *status) { gretlopt opt = OPT_NONE; int i, got_ci = 0; *status = 0; if (*s == '\0') { return 0; } if (vcv_opt_ok(ci) && !strcmp(s, "vcv")) { return OPT_O; } if (quiet_opt_ok(ci) && !strcmp(s, "quiet")) { return OPT_Q; } if (wi...
valid_long_opt
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretlopt valid_short_opt(int ci, char c) { gretlopt opt; int i; opt = OPT_NONE; for (i = 0; flag_matches[i].c; ++i) { if (c == flag_matches[i].c) { opt = flag_matches[i].o; break; } } if (opt && !opt_is_valid(opt, ci, c)) return OPT_NONE; return opt; }
gretlopt valid_short_opt(int ci, char c) { gretlopt opt = 0; int i, ok; for (i = 0; flag_matches[i].c != '\0'; i++) { if (c == flag_matches[i].c) { opt = flag_matches[i].o; break; } } if (opt) { ok = opt_is_valid(opt, ci, c); if (!ok) { opt = 0; } } return opt; }
valid_short_opt
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int valid_ymd(int y, int m, int d, int julian) { int ok; ok = 1; if (!(unsigned int)g_date_valid_dmy((unsigned char)d, (unsigned int)m, (unsigned short)y)) { ok = 0; if (julian) { if (y > 0 && m == 2 && d == 29) return (y & 3) == 0; } } return o...
static int valid_ymd(int y, int m, int d, int julian) { int ok = 1; if (!g_date_valid_dmy(d, m, y)) { ok = 0; if (julian && y > 0 && m == 2 && d == 29 && y % 4 == 0) { ok = 1; } } return ok; }
valid_ymd
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int validate_function_package(fnpkg *pkg) { return pkg->pub && pkg->author && pkg->version && pkg->date && pkg->descrip && pkg->name[0] != 0; }
static int validate_function_package(fnpkg *pkg) { if (pkg->pub == NULL || pkg->author == NULL || pkg->version == NULL || pkg->date == NULL || pkg->descrip == NULL) { return 0; } else if (pkg->name[0] == '\0') { return 0; } return 1; }
validate_function_package
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int validate_relationship(int i, int j, int k, const DATASET *dset) { int t; double xi; double xj; for (t = dset->t1; t <= dset->t2; ++t) { xi = dset->Z[i][t]; xj = dset->Z[j][t]; if (k <= 0) { if (fabs(xi) <= 1.797693134862316e308 && xi * xi != xj) return 0; } else if (fabs(xi) <...
static int validate_relationship(int i, int j, int k, const DATASET *dset) { double xi, xj; int t; for (t = dset->t1; t <= dset->t2; t++) { xi = dset->Z[i][t]; xj = dset->Z[j][t]; if (k > 0) { if (!na(xi) && !na(xj) && dset->Z[k][t] != xi * xj) { return 0; } } else { i...
validate_relationship
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void validate_thousep(csvdata *c, const char *s) { int nd; while (*s) { if (*s == c->thousep) { nd = 0; ++s; while (*s && ((*__ctype_b_loc())[*s] & 0x800) != 0) { ++nd; ++s; } if (nd != 3) { c->thousep = -1; return; } } else { ++s; ...
static void validate_thousep(csvdata *c, const char *s) { int nd; while (*s) { if (*s == c->thousep) { nd = 0; s++; while (*s) { if (isdigit(*s)) { nd++; s++; } else { break; } } if (nd != 3) { #if CDEBUG fprintf(stder...
validate_thousep
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int validate_writedir(const char *dirname) { char *v1; char *v3; char *v4; int err; FILE *fp; char testname[4104]; unsigned long v8; v8 = __readfsqword(0x28u); if (*dirname) { err = gretl_mkdir(dirname); if (err) { v3 = gettext("Couldn't create directory '%s'"); gretl_errmsg_sprin...
static int validate_writedir(const char *dirname) { int err = 0; if (*dirname == '\0') { gretl_errmsg_set(_("User directory is not set")); return E_DATA; } err = gretl_mkdir(dirname); if (err) { gretl_errmsg_sprintf(_("Couldn't create directory '%s'"), dirname); } if (!err) { char test...
validate_writedir
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int var_add_full_vcv(GRETL_VAR *var) { int i; int bi; int bj; int vi; int vj; int err; int nc; int k; gretl_matrix *V; MODEL *pmod; err = 0; nc = var->neqns * var->ncoeff; V = gretl_zero_matrix_new(nc, nc); if (!V) return 12; k = var->ncoeff; vj = 0; vi = 0; for (i = 0; i < var-...
static int var_add_full_vcv(GRETL_VAR *var) { gretl_matrix *V; MODEL *pmod; double vij; int i, k, nc; int bi, bj; int vi, vj; int err = 0; nc = var->neqns * var->ncoeff; V = gretl_zero_matrix_new(nc, nc); if (V == NULL) { return E_ALLOC; } k = var->ncoeff; vi = vj = 0; for (i = 0; i <...
var_add_full_vcv
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int var_form_matrices(gretl_restriction *rset) { int i; int j; rrow *r; if (rset_allocate_R_q(rset, *((_DWORD *)rset->obj + 3) * *((_DWORD *)rset->obj + 10))) return 12; for (i = 0; i < rset->g; ++i) { r = rset->rows[i]; for (j = 0; j < r->nterms; ++j) rset...
static int var_form_matrices(gretl_restriction *rset) { GRETL_VAR *var = rset->obj; int nc = var->neqns * var->ncoeff; int col, i, j; int err = 0; if (rset_allocate_R_q(rset, nc)) { return E_ALLOC; } for (i = 0; i < rset->g; i++) { rrow *r = rset->rows[i]; for (j = 0; j < r->nterms; j++) { ...
var_form_matrices
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *var_hac_xox(GRETL_VAR *var, int k, VCVInfo *vi, int *err) { int t; gretl_matrix *XOX; gretl_matrix *uk; XOX = 0; uk = gretl_matrix_alloc(var->T, 1); if (uk) { for (t = 0; t < var->T; ++t) uk->val[t] = var->E->val[k * var->E->rows + t]; XOX = HAC_XOX(var->X, uk, vi, 0, err); ...
static gretl_matrix *var_hac_xox(GRETL_VAR *var, int k, VCVInfo *vi, int *err) { gretl_matrix *XOX = NULL; gretl_matrix *uk; int t; uk = gretl_column_vector_alloc(var->T); if (uk == NULL) { *err = E_ALLOC; } else { for (t = 0; t < var->T; t++) { uk->val[t] = gretl_matrix_get(var->E, t, k); ...
var_hac_xox
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *var_hc_xox(GRETL_VAR *var, int k, int hcv, int *err) { int i; int j; int t; int T; _BYTE g[12]; double xij; double u2; gretl_matrix *XOX; double utk; double ht; *(_DWORD *)&g[8] = 0; T = var->T; *(_QWORD *)g = (unsigned int)var->ncoeff; XOX = gretl_matrix_alloc(*(int *)g, *(in...
static gretl_matrix *var_hc_xox(GRETL_VAR *var, int k, int hcv, int *err) { gretl_matrix *XOX; gretl_matrix *hvec = NULL; int T = var->T; int g = var->ncoeff; XOX = gretl_matrix_alloc(g, g); if (XOX == NULL) { *err = E_ALLOC; } else if (hcv > 1) { hvec = VAR_get_hvec(var->X, var->XTX, err); } ...
var_hc_xox
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int var_is_deleted(const int *dlist, int dmin, int i) { int v; v = dmin + i - 1; if (dlist) return in_gretl_list(dlist, v); else return v >= dmin; }
static int var_is_deleted(const int *dlist, int dmin, int i) { int v = dmin + i - 1; if (dlist != NULL) { return in_gretl_list(dlist, v); } else { return (v >= dmin); } }
var_is_deleted
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int var_is_varying(const panelmod_t *pan, int v) { int i; if (v) { for (i = 2; i <= *pan->vlist; ++i) { if (v == pan->vlist[i]) return 1; } } return 0; }
static int var_is_varying(const panelmod_t *pan, int v) { if (v != 0) { int i; for (i = 2; i <= pan->vlist[0]; i++) { if (pan->vlist[i] == v) { return 1; } } } return 0; }
var_is_varying
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0