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 gretl_read_gdt_varnames(const char *fname, char ***vnames, int *nvars) {
const char *v3;
int err;
int gdtb;
gchar *zdir;
char xmlfile[4104];
unsigned long v10;
v10 = __readfsqword(0x28u);
gdtb = has_suffix(fname, ".gdtb");
err = 0;
if (gdtb && is_purebin_file(fname))
return read_gbin_varnam... | int gretl_read_gdt_varnames(const char *fname, char ***vnames, int *nvars) {
int gdtb = has_suffix(fname, ".gdtb");
int err = 0;
if (gdtb && is_purebin_file(fname)) {
err = read_gbin_varnames(fname, vnames, nvars);
} else if (gdtb) {
gchar *zdir;
int err;
zdir = g_strdup_printf("%stmp-unzip",... | gretl_read_gdt_varnames | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_read_native_data(const char *fname, DATASET *dset) {
if (!fname || !dset)
return 17;
if (!dset->Z)
return gretl_read_gdt(fname, dset, OPT_NONE, 0);
fwrite("gretl_read_native_data: Z must be NULL on entry\n", 1u, 0x30u,
stderr);
return 17;
} | int gretl_read_native_data(const char *fname, DATASET *dset) {
int err = 0;
if (fname == NULL || dset == NULL) {
err = E_INVARG;
} else if (dset->Z != NULL) {
fprintf(stderr, "gretl_read_native_data: Z must be NULL on entry\n");
err = E_INVARG;
} else {
err = gretl_read_gdt(fname, dset, OPT_NON... | gretl_read_native_data | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
FILE *gretl_read_user_file(const char *fname) {
FILE *fp;
char fullname[4104];
unsigned long v4;
v4 = __readfsqword(0x28u);
fp = gretl_fopen(fname, "r");
if (!fp) {
strcpy(fullname, fname);
gretl_maybe_prepend_dir(fullname);
if (fullname[0])
return gretl_fopen(fullname, "r");
}
return... | FILE *gretl_read_user_file(const char *fname) {
FILE *fp = gretl_fopen(fname, "r");
if (fp == NULL) {
char fullname[FILENAME_MAX];
strcpy(fullname, fname);
gretl_maybe_prepend_dir(fullname);
if (*fullname != '\0') {
fp = gretl_fopen(fullname, "r");
}
}
return fp;
} | gretl_read_user_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_recode_file(const char *path1, const char *path2,
const char *from_set, const char *to_set, PRN *prn) {
int err;
gsize bytes;
gsize written;
gchar *buf;
gchar *trbuf;
unsigned long v14;
v14 = __readfsqword(0x28u);
buf = 0;
bytes = 0;
err = 0;
buf = file_get_content... | int gretl_recode_file(const char *path1, const char *path2,
const char *from_set, const char *to_set, PRN *prn) {
gchar *buf = NULL;
gsize bytes = 0;
int err = 0;
buf = file_get_content(path1, &bytes, prn, &err);
if (!err) {
gsize written = 0;
gchar *trbuf =
glib_recode... | gretl_recode_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_record_command(CMD *cmd, const char *line, PRN *prn) {
real_echo_command(cmd, line, 1, prn);
} | void gretl_record_command(CMD *cmd, const char *line, PRN *prn) {
real_echo_command(cmd, line, 1, prn);
} | gretl_record_command | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_remove(const char *path) { return remove(path); } | int gretl_remove(const char *path) {
#ifdef WIN32
return g_remove(path);
#else
return remove(path);
#endif
} | gretl_remove | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_rename(const char *oldpath, const char *newpath) {
int *v3;
int err;
if (!strcmp(oldpath, newpath))
return 0;
gretl_error_clear();
err = rename(oldpath, newpath);
if (*__errno_location()) {
perror("rename");
v3 = __errno_location();
gretl_errmsg_set_from_errno("gretl_rename", *v3)... | int gretl_rename(const char *oldpath, const char *newpath) {
int err = 0;
if (!strcmp(oldpath, newpath)) {
return 0;
}
gretl_error_clear();
#ifdef WIN32
err = win32_rename(oldpath, newpath);
#else
err = rename(oldpath, newpath);
#endif
if (errno != 0) {
perror("rename");
gretl_errmsg_set_... | gretl_rename | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_reserved_word(const char *str) {
char *v1;
int i;
int ret;
ret = gretl_command_number(str);
for (i = 0; i < n_0_0 && !ret; ++i) {
if (!strcmp(str, reswords[i]))
ret = 17;
}
if (ret) {
v1 = gettext("'%s' is a reserved word");
gretl_errmsg_sprintf(v1, str);
}
return ret;
} | int gretl_reserved_word(const char *str) {
static int n = sizeof reswords / sizeof reswords[0];
int i, ret = gretl_command_number(str);
for (i = 0; i < n && !ret; i++) {
if (!strcmp(str, reswords[i])) {
ret = E_INVARG;
}
}
if (ret) {
gretl_errmsg_sprintf(_("'%s' is a reserved word"), str);... | gretl_reserved_word | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_restricted_mean(int t1, int t2, const double *x, const double *y,
GretlOp yop, double yval) {
int t;
int ta;
int n;
double sum;
double suma;
double xbar;
sum = 0.0;
n = 0;
for (t = t1; t <= t2; ++t) {
if (fabs(x[t]) <= 1.797693134862316e308 && eval_ytest(... | double gretl_restricted_mean(int t1, int t2, const double *x, const double *y,
GretlOp yop, double yval) {
double xbar, sum = 0.0;
int t, n = 0;
for (t = t1; t <= t2; t++) {
if (!na(x[t]) && eval_ytest(y[t], yop, yval)) {
sum += x[t];
n++;
}
}
if (n == 0) {
... | gretl_restricted_mean | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_restricted_stddev(int t1, int t2, const double *x, const double *y,
GretlOp yop, double yval) {
double xx;
xx = gretl_restricted_variance(t1, t2, x, y, yop, yval);
if (fabs(xx) > 1.797693134862316e308)
return xx;
else
return sqrt(xx);
} | double gretl_restricted_stddev(int t1, int t2, const double *x, const double *y,
GretlOp yop, double yval) {
double xx = gretl_restricted_variance(t1, t2, x, y, yop, yval);
return (na(xx)) ? xx : sqrt(xx);
} | gretl_restricted_stddev | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_restricted_variance(int t1, int t2, const double *x,
const double *y, GretlOp yop, double yval) {
double v6;
double result;
int t;
int n;
double sumsq;
double xx;
n = 0;
v6 = gretl_restricted_mean(t1, t2, x, y, yop, yval);
if (fabs(v6) > 1.797693134862316... | double gretl_restricted_variance(int t1, int t2, const double *x,
const double *y, GretlOp yop, double yval) {
double sumsq, xx, xbar;
int t, n = 0;
xbar = gretl_restricted_mean(t1, t2, x, y, yop, yval);
if (na(xbar)) {
return NADBL;
}
sumsq = 0.0;
for (t = t1; t <=... | gretl_restricted_variance | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GRETL_VAR *gretl_restricted_vecm(gretl_restriction *rset, const DATASET *dset,
gretlopt opt, PRN *prn, int *err) {
GRETL_VAR *jvar;
jvar = 0;
if (rset && rset->otype == GRETL_OBJ_VAR) {
rset->opt |= opt;
*err = restriction_set_form_matrices(rset);
if (rset->rows && (o... | GRETL_VAR *gretl_restricted_vecm(gretl_restriction *rset, const DATASET *dset,
gretlopt opt, PRN *prn, int *err) {
GRETL_VAR *jvar = NULL;
#if RDEBUG
fprintf(stderr, "gretl_restricted_vecm: starting\n");
#endif
if (rset == NULL || rset->otype != GRETL_OBJ_VAR) {
*err = E_DAT... | gretl_restricted_vecm | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_restriction_finalize(gretl_restriction *rset, const DATASET *dset,
gretlopt opt, PRN *prn) {
return gretl_restriction_finalize_full(0, rset, dset, opt, prn);
} | int gretl_restriction_finalize(gretl_restriction *rset, const DATASET *dset,
gretlopt opt, PRN *prn) {
return gretl_restriction_finalize_full(NULL, rset, dset, opt, prn);
} | gretl_restriction_finalize | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_restriction_finalize_full(ExecState *state, gretl_restriction *rset,
const DATASET *dset, gretlopt opt,
PRN *prn) {
int err;
int erra;
int silent;
equation_system *sys;
err = 0;
if (!rset)
return 1;
rset->opt |= opt;
... | int gretl_restriction_finalize_full(ExecState *state, gretl_restriction *rset,
const DATASET *dset, gretlopt opt,
PRN *prn) {
int silent, err = 0;
#if RDEBUG
fprintf(stderr, "gretl_restriction_finalize_full: starting\n");
#endif
if (rset ==... | gretl_restriction_finalize_full | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_restriction_get_boot_params(int *pB, gretlopt *popt) {
*pB = restrict_B;
*popt |= rboot_opt;
restrict_B = 0;
rboot_opt = OPT_NONE;
} | void gretl_restriction_get_boot_params(int *pB, gretlopt *popt) {
*pB = restrict_B;
*popt |= rboot_opt;
restrict_B = 0;
rboot_opt = OPT_NONE;
} | gretl_restriction_get_boot_params | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretlopt gretl_restriction_get_options(const gretl_restriction *rset) {
if (rset)
return rset->opt;
else
return OPT_NONE;
} | gretlopt gretl_restriction_get_options(const gretl_restriction *rset) {
return (rset != NULL) ? rset->opt : OPT_NONE;
} | gretl_restriction_get_options | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GretlObjType gretl_restriction_get_type(const gretl_restriction *rset) {
if (rset)
return rset->otype;
else
return GRETL_OBJ_NULL;
} | GretlObjType gretl_restriction_get_type(const gretl_restriction *rset) {
return (rset != NULL) ? rset->otype : GRETL_OBJ_NULL;
} | gretl_restriction_get_type | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_restriction_set_boot_params(int B, gretlopt opt) {
int err;
err = 0;
rboot_opt = opt;
if (B <= 0)
return 2;
restrict_B = B;
return err;
} | int gretl_restriction_set_boot_params(int B, gretlopt opt) {
int err = 0;
rboot_opt = opt;
if (B > 0) {
restrict_B = B;
} else {
err = E_DATA;
}
return err;
} | gretl_restriction_set_boot_params | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretlRGB gretl_rgb_get(const char *s) {
gretlRGB x;
unsigned long v3;
v3 = __readfsqword(0x28u);
x = 0;
if ((unsigned int)__isoc99_sscanf(s, "#%x", &x) != 1)
return 0;
return x;
} | gretlRGB gretl_rgb_get(const char *s) {
gretlRGB x = 0;
if (sscanf(s, "#%x", &x) != 1) {
x = 0;
}
return x;
} | gretl_rgb_get | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *gretl_rlib_path() { return paths.rlibpath; } | const char *gretl_rlib_path(void) {
#ifdef WIN32
static int checked;
if (!checked) {
R_path_try_registry(RLIB, paths.rlibpath);
checked = 1;
}
#endif
#if 0
fprintf(stderr, "gretl_rlib_path: '%s'\n", paths.rlibpath);
#endif
return paths.rlibpath;
} | gretl_rlib_path | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *gretl_rmatrix_vector_stat(const gretl_matrix *m, GretlVecStat vs,
int rowwise, int *err) {
int rows;
int cols;
double v7;
double v8;
double v9;
double v10;
int i;
int ia;
int j;
int ja;
int r;
double x;
double xa;
gretl_matrix *ret;
if... | gretl_matrix *gretl_rmatrix_vector_stat(const gretl_matrix *m, GretlVecStat vs,
int rowwise, int *err) {
gretl_matrix *ret;
double x;
int r, c, i, j;
if (gretl_is_null_matrix(m)) {
*err = E_DATA;
return NULL;
}
r = rowwise ? m->rows : 1;
c = rowwise ? 1 : ... | gretl_rmatrix_vector_stat | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_round(double x) {
double fx;
fx = floor(x);
if (x >= 0.0) {
if (x - fx < 0.5)
return fx;
return ceil(x);
}
if (x - fx > 0.5)
return ceil(x);
return fx;
} | double gretl_round(double x) {
double fx = floor(x);
if (x < 0) {
return (x - fx <= 0.5) ? fx : ceil(x);
} else {
return (x - fx < 0.5) ? fx : ceil(x);
}
} | gretl_round | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_saved_objects_cleanup() {
int i;
GretlObjType lmt;
MODEL *lmp;
lmp = (MODEL *)last_model.ptr;
lmt = last_model.type;
for (i = 0; i < n_obj; ++i) {
if (lmp == ostack[i].ptr) {
gretl_object_unref(lmp, lmt);
last_model.ptr = 0;
last_model.type = 0;
lmp = 0;
}
sav... | void gretl_saved_objects_cleanup(void) {
void *lmp = last_model.ptr;
int lmt = last_model.type;
int i;
#if ODEBUG
fprintf(stderr, "gretl_saved_objects_cleanup, n_obj = %d\n", n_obj);
#endif
for (i = 0; i < n_obj; i++) {
if (ostack[i].ptr == lmp) {
#if ODEBUG
fprintf(stderr, " ostack[%d] = last mo... | gretl_saved_objects_cleanup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_scalar_add(const char *name, double val) {
return real_scalar_add(name, val, OPT_NONE);
} | int gretl_scalar_add(const char *name, double val) {
return real_scalar_add(name, val, OPT_NONE);
} | gretl_scalar_add | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_scalar_add_mutable(const char *name, double val) {
return real_scalar_add(name, val, OPT_C);
} | int gretl_scalar_add_mutable(const char *name, double val) {
return real_scalar_add(name, val, OPT_C);
} | gretl_scalar_add_mutable | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_scalar_convert_to_matrix(user_var *u) {
gretl_matrix *m;
if (!u)
return 14;
if (u->type != GRETL_TYPE_DOUBLE)
return 37;
m = gretl_matrix_alloc(1, 1);
if (!m)
return 12;
*m->val = *(double *)u->ptr;
free(u->ptr);
u->ptr = m;
u->type = GRETL_TYPE_MATRIX;
if (!gretl_function_dep... | int gretl_scalar_convert_to_matrix(user_var *u) {
gretl_matrix *m = NULL;
if (u == NULL) {
return E_UNKVAR;
} else if (u->type != GRETL_TYPE_DOUBLE) {
return E_TYPES;
}
m = gretl_matrix_alloc(1, 1);
if (m == NULL) {
return E_ALLOC;
}
m->val[0] = *(double *)u->ptr;
free(u->ptr);
u->ptr... | gretl_scalar_convert_to_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_scalar_get_value(const char *name, int *err) {
user_var *u;
u = get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE);
if (u)
return *(double *)u->ptr;
else
return get_const_by_name(name, err);
} | double gretl_scalar_get_value(const char *name, int *err) {
user_var *u;
double ret = NADBL;
u = get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE);
if (u != NULL) {
ret = *(double *)u->ptr;
} else {
ret = get_const_by_name(name, err);
}
return ret;
} | gretl_scalar_get_value | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_scalar_qform(const gretl_vector *b, const gretl_matrix *X,
int *err) {
int rows;
int v5;
int i;
int j;
int p;
int k;
double tmp;
double ret;
ret = 0.0;
if (b && b->rows && b->cols && X && X->rows && X->cols) {
if (b->cols == 1) {
rows = b->rows;
... | double gretl_scalar_qform(const gretl_vector *b, const gretl_matrix *X,
int *err) {
double tmp, ret = 0.0;
int i, j, k, p;
if (gretl_is_null_matrix(b) || gretl_is_null_matrix(X)) {
*err = E_DATA;
return NADBL;
}
k = gretl_vector_get_length(b);
if (k == 0 || X->rows != k ... | gretl_scalar_qform | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_scalar_set_value(const char *name, double val) {
char *v2;
int err;
user_var *u;
err = 0;
u = get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE);
if (u) {
if (scalar_is_read_only_index(name)) {
err = 2;
v2 = gettext("The variable %s is currently read-only");
gretl_errmsg_... | int gretl_scalar_set_value(const char *name, double val) {
user_var *u;
int err = 0;
u = get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE);
if (u == NULL) {
gretl_errmsg_sprintf("%s: no such scalar", name);
err = E_DATA;
} else if (scalar_is_read_only_index(name)) {
err = E_DATA;
gretl_e... | gretl_scalar_set_value | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_script_dirs_cleanup() {
if (script_dirs) {
g_list_free_full(script_dirs, &g_free);
script_dirs = 0;
}
} | void gretl_script_dirs_cleanup(void) {
if (script_dirs != NULL) {
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28
GList *l0 = g_list_first(script_dirs);
while (l0) {
g_free(l0->data);
l0 = l0->next;
}
g_list_free(script_dirs);
#else
g_list_free_full(script_dirs, g_free);
#endif... | gretl_script_dirs_cleanup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_set_batch_mode(int b) { batch_mode_switch(1, b); } | void gretl_set_batch_mode(int b) { batch_mode_switch(1, b); } | gretl_set_batch_mode | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_set_gui_mode() { gui_mode = 1; } | void gretl_set_gui_mode(void) { gui_mode = 1; } | gretl_set_gui_mode | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_set_path_by_name(const char *name, const char *path) {
int builtin;
char *targ;
builtin = 0;
if (!name || !path)
return 1;
if (!strcmp(name, "workdir"))
return set_gretl_workdir(path);
if (!strcmp(name, "gnuplot")) {
targ = paths.gnuplot;
} else if (!strcmp(name, "plotfile")) {
... | int gretl_set_path_by_name(const char *name, const char *path) {
char *targ = NULL;
int builtin = 0;
if (name == NULL || path == NULL) {
return 1;
} else if (!strcmp(name, "workdir")) {
return set_gretl_workdir(path);
} else if (!strcmp(name, "gnuplot")) {
targ = paths.gnuplot;
} else if (!strc... | gretl_set_path_by_name | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_set_paths(ConfigPaths *cpaths) {
int err0;
int err1;
const char *defpath;
err0 = 0;
err1 = 0;
paths.workdir[0] = 0;
paths.plotfile[0] = 0;
initialize_gretldir(cpaths->gretldir, OPT_NONE);
if (!cpaths->no_dotdir)
err0 = initialize_dotdir();
copy_paths_with_fallback(cpaths);
if (cpath... | int gretl_set_paths(ConfigPaths *cpaths) {
int err0 = 0, err1 = 0;
int retval = 0;
*paths.workdir = '\0';
*paths.plotfile = '\0';
initialize_gretldir(cpaths->gretldir, OPT_NONE);
if (!cpaths->no_dotdir) {
err0 = initialize_dotdir();
}
copy_paths_with_fallback(cpaths);
if (cpaths->no_dotdir) {... | gretl_set_paths | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_set_script_dir(const char *s) {
gchar *add;
GList *L;
add = (gchar *)g_path_get_dirname(s);
L = (GList *)g_list_find_custom(script_dirs, add, pathcomp);
if (L) {
if (L->next) {
g_free(L->next->data);
script_dirs = (GList *)g_list_delete_link(script_dirs, L->next);
}
g_free(... | void gretl_set_script_dir(const char *s) {
gchar *add = g_path_get_dirname(s);
GList *L = g_list_find_custom(script_dirs, add, pathcomp);
if (L != NULL) {
if (L->next != NULL) {
g_free(L->next->data);
script_dirs = g_list_delete_link(script_dirs, L->next);
}
g_free(add);
} else {
... | gretl_set_script_dir | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_set_sf_cgi(int s) {
if (s <= 1)
SF_CGI = s != 0;
else
SF_CGI = 2;
set_server_paths();
} | void gretl_set_sf_cgi(int s) {
if (s > 1) {
SF_CGI = 2;
} else if (s != 0) {
SF_CGI = 1;
} else {
SF_CGI = 0;
}
set_server_paths();
} | gretl_set_sf_cgi | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_set_tool_mode() {
set_gretl_echo(0);
set_gretl_messages(0);
tool_mode = 1;
} | void gretl_set_tool_mode(void) {
set_gretl_echo(0);
set_gretl_messages(0);
tool_mode = 1;
} | gretl_set_tool_mode | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_setenv(const char *name, const char *value) {
return setenv(name, value, 1);
} | int gretl_setenv(const char *name, const char *value) {
#ifdef WIN32
gchar *estr;
int ok;
estr = g_strdup_printf("%s=%s", name, value);
putenv(estr);
ok = SetEnvironmentVariable(name, value);
return !ok;
#else
return setenv(name, value, 1);
#endif
} | gretl_setenv | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_sfmt_set_seed(unsigned int seed) {
sfmt_seed = seed;
sfmt_init_gen_rand(&gretl_sfmt, seed);
} | static void gretl_sfmt_set_seed(unsigned int seed) {
sfmt_seed = seed;
sfmt_init_gen_rand(&gretl_sfmt, sfmt_seed);
} | gretl_sfmt_set_seed | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_sgn(double x) {
if (x == 0.0)
return 0.0;
if (x > 0.0)
return 1.0;
if (x >= 0.0)
return NAN;
return -1.0;
} | double gretl_sgn(double x) {
if (x == 0) {
return 0;
} else if (x > 0) {
return 1;
} else if (x < 0) {
return -1;
} else {
return NADBL;
}
} | gretl_sgn | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_shell(const char *arg, gretlopt opt, PRN *prn) {
char *v4;
const char *arga;
if (!arg || !*arg)
return 0;
if (libset_get_bool(SHELL_OK)) {
arga = &arg[strspn(arg, " \t")];
if ((opt & 1) != 0)
return gretl_shell_async(arga, prn);
else
return gretl_shell_sync(arga, 0, prn);
... | static int gretl_shell(const char *arg, gretlopt opt, PRN *prn) {
int err = 0;
if (arg == NULL || *arg == '\0') {
return 0;
}
if (!libset_get_bool(SHELL_OK)) {
gretl_errmsg_set(_("The shell command is not activated."));
return 1;
}
arg += strspn(arg, " \t");
if (opt & OPT_A) {
err = g... | gretl_shell | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_shell_async(const char *cmdline, PRN *prn) {
gchar **v2;
const char *v3;
gint argc;
int err;
GError *gerr;
gchar **argv[3];
argv[1] = (gchar **)__readfsqword(0x28u);
gerr = 0;
argv[0] = 0;
argc = 0;
err = 0;
g_shell_parse_argv(cmdline, &argc, argv, &gerr);
if (!gerr) {
v2 = argv... | static int gretl_shell_async(const char *cmdline, PRN *prn) {
GError *gerr = NULL;
gchar **argv = NULL;
gint argc = 0;
int err = 0;
g_shell_parse_argv(cmdline, &argc, &argv, &gerr);
if (gerr == NULL) {
g_spawn_async(gretl_workdir(), argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
NULL, ... | gretl_shell_async | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_shell_grab(const char *arg, char **sout) {
return gretl_shell_sync(arg, sout, 0);
} | int gretl_shell_grab(const char *arg, char **sout) {
return gretl_shell_sync(arg, sout, NULL);
} | gretl_shell_grab | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_shell_sync(const char *arg, gchar **psout, PRN *prn) {
const char *v3;
int status;
int err;
gchar *sout;
gchar *serr;
GError *gerr;
const char *theshell;
const char *namep;
gchar *argv[5];
char shellnam[40];
unsigned long v15;
v15 = __readfsqword(0x28u);
sout = 0;
serr = 0;
gerr... | static int gretl_shell_sync(const char *arg, gchar **psout, PRN *prn) {
gchar *sout = NULL;
gchar *serr = NULL;
GError *gerr = NULL;
int status;
gchar *argv[5];
const char *theshell = getenv("SHELL");
const char *namep;
char shellnam[40];
int err = 0;
if (theshell == NULL) {
#ifdef HAVE_PATHS_H
... | gretl_shell_sync | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_simann(double *theta, int n, int maxit, BFGS_CRIT_FUNC cfunc,
void *data, gretlopt opt, PRN *prn) {
int maxita;
int improved;
int i;
int err;
unsigned int minimize;
double f0;
double fbest;
double fworst;
double Temp;
double radius;
gretl_matrix *b0;
gretl_matrix *b1;
... | int gretl_simann(double *theta, int n, int maxit, BFGS_CRIT_FUNC cfunc,
void *data, gretlopt opt, PRN *prn) {
gretl_matrix b;
gretl_matrix *b0 = NULL;
gretl_matrix *b1 = NULL;
gretl_matrix *bstar = NULL;
gretl_matrix *d = NULL;
double f0, f1;
double fbest, fworst;
double Temp = 1.0;
d... | gretl_simann | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_array *gretl_singleton_array(void *ptr, GretlType atype, int copy,
int *err) {
GretlType singular;
gretl_array *A;
A = gretl_array_new(atype, 1, err);
if (A) {
singular = gretl_type_get_singular(atype);
*err = gretl_array_set_element(A, 0, ptr, singular, copy);
... | gretl_array *gretl_singleton_array(void *ptr, GretlType atype, int copy,
int *err) {
gretl_array *A = gretl_array_new(atype, 1, err);
if (A != NULL) {
GretlType t = gretl_type_get_singular(atype);
*err = gretl_array_set_element(A, 0, ptr, t, copy);
if (*err) {
... | gretl_singleton_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_skewness(int t1, int t2, const double *x) {
double v3;
int t;
int ta;
int n;
double s;
double sa;
double sb;
double xbar;
double sd;
double xx;
n = 0;
v3 = j_gretl_mean(t1, t2, x);
xbar = v3;
if (fabs(v3) > 1.797693134862316e308)
return NAN;
s = 0.0;
for (t = t1; t <= t... | double gretl_skewness(int t1, int t2, const double *x) {
double s, sd, xx, xbar, ret;
int t, n = 0;
xbar = gretl_mean(t1, t2, x);
if (na(xbar)) {
return NADBL;
}
s = 0.0;
for (t = t1; t <= t2; t++) {
if (!na(x[t])) {
xx = x[t] - xbar;
s += xx * xx;
n++;
}
}
s /= n;
... | gretl_skewness | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_sort_by(const double *x, const double *y, double *z,
const DATASET *dset) {
int v4;
int v6;
int i;
int ia;
int t;
int ta;
int tb;
int n;
pair_sorter *xy;
if (dset)
v4 = dset->t2 - dset->t1 + 1;
else
v4 = 0;
n = v4;
for (t = dset->t1; t <= dset->t2; ++t) {
... | int gretl_sort_by(const double *x, const double *y, double *z,
const DATASET *dset) {
struct pair_sorter *xy;
int n = sample_size(dset);
int i, t;
for (t = dset->t1; t <= dset->t2; t++) {
if (na(x[t])) {
return E_MISSDATA;
}
}
xy = malloc(n * sizeof *xy);
if (xy == NULL) ... | gretl_sort_by | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double *gretl_sorted_series(int v, const DATASET *dset, gretlopt opt, int *n,
int *err) {
char *v6;
int v7;
int t;
int ta;
int k;
int ka;
double *y;
k = 0;
if (*n <= 0)
*n = 1;
for (t = dset->t1; t <= dset->t2; ++t) {
if (fabs(dset->Z[v][t]) > 1.797693134862316e3... | double *gretl_sorted_series(int v, const DATASET *dset, gretlopt opt, int *n,
int *err) {
double *y = NULL;
int t, k = 0;
if (*n < 1) {
*n = 1;
}
for (t = dset->t1; t <= dset->t2; t++) {
if (!na(dset->Z[v][t])) {
k++;
} else if (opt & OPT_M) {
*err = E_MIS... | gretl_sorted_series | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_spawn(char *cmdline) {
char *v1;
int status;
int ret;
GError *error;
gchar *errout;
gchar *sout[2];
sout[1] = (gchar *)__readfsqword(0x28u);
error = 0;
errout = 0;
sout[0] = 0;
ret = 0;
gretl_error_clear();
if ((unsigned int)g_spawn_command_line_sync(cmdline, sout, &errout, &status,... | int gretl_spawn(char *cmdline) {
GError *error = NULL;
gchar *errout = NULL;
gchar *sout = NULL;
int ok, status;
int ret = 0;
gretl_error_clear();
ok = g_spawn_command_line_sync(cmdline, &sout, &errout, &status, &error);
if (!ok) {
gretl_errmsg_set(error->message);
fprintf(stderr, "gretl_spaw... | gretl_spawn | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_sprint_fullwidth_double(double x, int digits, char *targ, PRN *prn) {
int digitsa;
char decpoint;
int n;
char tmp[40];
unsigned long v9;
digitsa = digits;
v9 = __readfsqword(0x28u);
*targ = 0;
if (fabs(x) > 1.797693134862316e308) {
strcpy(targ, "NA");
return;
}
decpoint = get_l... | void gretl_sprint_fullwidth_double(double x, int digits, char *targ, PRN *prn) {
char decpoint;
int n;
*targ = '\0';
if (na(x)) {
strcpy(targ, "NA");
return;
}
decpoint = get_local_decpoint();
if (digits == -4) {
if (x < .0001 && x > 0.0) {
sprintf(targ, "%#.3g", x);
digits = 3... | gretl_sprint_fullwidth_double | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_square_matrix_transpose(gretl_matrix *m) {
int i;
int j;
int mij;
int mji;
double x;
if (m->rows == m->cols) {
for (i = 0; i < m->rows - 1; ++i) {
for (j = i + 1; j < m->rows; ++j) {
mij = j * m->rows + i;
mji = i * m->rows + j;
x = m->val[mij];
m->val[mi... | int gretl_square_matrix_transpose(gretl_matrix *m) {
double x, y;
int mij, mji;
int i, j;
if (m->rows != m->cols) {
fputs("gretl_square_matrix_transpose: matrix must be square\n", stderr);
return 1;
}
for (i = 0; i < m->rows - 1; i++) {
for (j = i + 1; j < m->rows; j++) {
mij = mdx(m, i,... | gretl_square_matrix_transpose | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_sst(int t1, int t2, const double *x) {
double v4;
int t;
double sumsq;
if (t2 - t1 == -1)
return NAN;
v4 = j_gretl_mean(t1, t2, x);
if (fabs(v4) > 1.797693134862316e308)
return NAN;
sumsq = 0.0;
for (t = t1; t <= t2; ++t) {
if (fabs(x[t]) <= 1.797693134862316e308)
sumsq =... | double gretl_sst(int t1, int t2, const double *x) {
int t, n = t2 - t1 + 1;
double sumsq, xx, xbar;
if (n == 0) {
return NADBL;
}
xbar = gretl_mean(t1, t2, x);
if (na(xbar)) {
return NADBL;
}
sumsq = 0.0;
for (t = t1; t <= t2; t++) {
if (!na(x[t])) {
xx = x[t] - xbar;
sumsq... | gretl_sst | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_stack_object(void *ptr, GretlObjType type) {
char *name;
name = gretl_object_get_name(ptr, type);
return real_stack_object(ptr, type, name, 0);
} | int gretl_stack_object(void *ptr, GretlObjType type) {
char *name = gretl_object_get_name(ptr, type);
return real_stack_object(ptr, type, name, NULL);
} | gretl_stack_object | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_stack_object_as(void *ptr, GretlObjType type, const char *name) {
return real_stack_object(ptr, type, name, 0);
} | int gretl_stack_object_as(void *ptr, GretlObjType type, const char *name) {
return real_stack_object(ptr, type, name, NULL);
} | gretl_stack_object_as | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_start_compiling_function(const char *line, const DATASET *dset,
PRN *prn) {
int n_params;
int err;
int rettype;
int nf;
ufunc *fun;
fn_param *params;
char *p;
char *name;
char s1[32];
char s2[40];
unsigned long v15;
v15 = __readfsqword(0x28u);
fun ... | int gretl_start_compiling_function(const char *line, const DATASET *dset,
PRN *prn) {
ufunc *fun = NULL;
fn_param *params = NULL;
int nf, n_params = 0;
int rettype = 0;
char s1[FN_NAMELEN];
char s2[FN_NAMELEN];
char *p = NULL, *name = NULL;
int err = 0;
if (gretl_fu... | gretl_start_compiling_function | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_stat(const char *fname, stat *buf) {
struct stat *p_tmp;
stat tmp;
unsigned long v5;
v5 = __readfsqword(0x28u);
memset(&tmp, 0, sizeof(tmp));
gretl_error_clear();
if (buf)
p_tmp = buf;
else
p_tmp = &tmp;
return stat(fname, p_tmp);
} | int gretl_stat(const char *fname, struct stat *buf) {
struct stat tmp = {0};
gretl_error_clear();
#ifdef WIN32
if (utf8_encoded(fname)) {
gunichar2 *wname;
wname = g_utf8_to_utf16(fname, -1, NULL, NULL, NULL);
if (wname != NULL) {
int ret = wstat(wname, buf == NULL ? &tmp : buf);
g_fr... | gretl_stat | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *gretl_stata_path() { return paths.statapath; } | const char *gretl_stata_path(void) { return paths.statapath; } | gretl_stata_path | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_stddev(int t1, int t2, const double *x) {
double v;
v = j_gretl_variance(t1, t2, x);
if (fabs(v) > 1.797693134862316e308)
return v;
else
return sqrt(v);
} | double gretl_stddev(int t1, int t2, const double *x) {
double v = gretl_variance(t1, t2, x);
return (na(v)) ? v : sqrt(v);
} | gretl_stddev | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_stopwatch() { return xtimer_stopwatch(); } | double gretl_stopwatch(void) {
#if defined(HAVE_MPI)
if (gretl_mpi_initialized()) {
return xtimer_stopwatch();
}
#endif
#if defined(_OPENMP)
return xtimer_stopwatch();
#else
return itimer_stopwatch();
#endif
} | gretl_stopwatch | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_stopwatch_cleanup() {
guint i;
if (xtimers) {
for (i = 0; xtimers->len > i; ++i)
g_free(xtimers->pdata[i]);
g_ptr_array_free(xtimers, 1);
xtimers = 0;
}
} | static void gretl_stopwatch_cleanup(void) {
int i;
#ifdef WANT_XTIMER
if (xtimers != NULL) {
for (i = 0; i < xtimers->len; i++) {
g_free(xtimers->pdata[i]);
}
g_ptr_array_free(xtimers, TRUE);
xtimers = NULL;
}
#endif
#ifdef NEED_ITIMER
if (itimers != NULL) {
for (i = 0; i < itimers->... | gretl_stopwatch_cleanup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_stopwatch_init() { xtimer_init(); } | static void gretl_stopwatch_init(void) {
#if defined(HAVE_MPI)
if (gretl_mpi_initialized()) {
xtimer_init();
return;
}
#endif
#if defined(_OPENMP)
xtimer_init();
#else
itimer_init();
#endif
} | gretl_stopwatch_init | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *gretl_strerror(int errnum) { return strerror(errnum); } | char *gretl_strerror(int errnum) {
#if 0
static locale_t loc = (locale_t) 0;
if (loc == (locale_t) 0) {
loc = newlocale(LC_ALL_MASK, "", loc);
}
if (loc != (locale_t) 0) {
uselocale(loc);
return strerror_l(errnum, loc);
} else {
return strerror(errnum);
}
#else
return strerror(errnu... | gretl_strerror | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_string_serialize(const char *s, const char *name, PRN *prn) {
pprintf(prn, "<string name=\"%s\" value=\"%s\"/>\n", name, s);
} | void gretl_string_serialize(const char *s, const char *name, PRN *prn) {
pprintf(prn, "<string name=\"%s\" value=\"%s\"/>\n", name, s);
} | gretl_string_serialize | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
series_table *gretl_string_table_add_column(gretl_string_table *gst,
int colnum) {
int err;
int n;
series_table **cols;
err = 0;
if (!gretl_list_append_term(&gst->cols_list, colnum))
return 0;
n = *gst->cols_list;
cols = (series_table **)realloc(gst->cols, ... | static series_table *gretl_string_table_add_column(gretl_string_table *gst,
int colnum) {
series_table **cols;
int *newlist;
int n, err = 0;
newlist = gretl_list_append_term(&gst->cols_list, colnum);
if (newlist == NULL) {
return NULL;
}
n = gst->co... | gretl_string_table_add_column | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_string_table_add_extra(gretl_string_table *gst, PRN *prn) {
if (gst) {
if (prn)
gst->extra = gretl_print_steal_buffer(prn);
}
} | void gretl_string_table_add_extra(gretl_string_table *gst, PRN *prn) {
if (gst != NULL && prn != NULL) {
gst->extra = gretl_print_steal_buffer(prn);
}
} | gretl_string_table_add_extra | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_string_table *gretl_string_table_alloc() {
gretl_string_table *gst;
gst = (gretl_string_table *)malloc(0x18u);
if (gst) {
gst->cols_list = 0;
gst->cols = 0;
gst->extra = 0;
}
return gst;
} | static gretl_string_table *gretl_string_table_alloc(void) {
gretl_string_table *gst = malloc(sizeof *gst);
if (gst != NULL) {
gst->cols_list = NULL;
gst->cols = NULL;
gst->extra = NULL;
}
return gst;
} | gretl_string_table_alloc | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_string_table_destroy(gretl_string_table *gst) {
int v1;
int i;
int ncols;
if (gst) {
if (gst->cols_list)
v1 = *gst->cols_list;
else
v1 = 0;
ncols = v1;
for (i = 0; i < ncols; ++i)
series_table_destroy(gst->cols[i]);
free(gst->cols);
free(gst->cols_list);
... | void gretl_string_table_destroy(gretl_string_table *gst) {
int i, ncols;
if (gst == NULL)
return;
ncols = (gst->cols_list != NULL) ? gst->cols_list[0] : 0;
for (i = 0; i < ncols; i++) {
series_table_destroy(gst->cols[i]);
}
free(gst->cols);
free(gst->cols_list);
if (gst->extra != NULL) {
... | gretl_string_table_destroy | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
series_table *gretl_string_table_detach_col(gretl_string_table *gst, int col) {
int i;
int pos;
int n;
series_table *st;
st = 0;
if (gst) {
pos = in_gretl_list(gst->cols_list, col);
n = *gst->cols_list;
if (pos > 0) {
st = gst->cols[pos - 1];
for (i = pos - 1; i < n - 1; ++i)
... | series_table *gretl_string_table_detach_col(gretl_string_table *gst, int col) {
series_table *st = NULL;
if (gst != NULL) {
int pos = in_gretl_list(gst->cols_list, col);
int i, n = gst->cols_list[0];
if (pos > 0) {
st = gst->cols[pos - 1];
for (i = pos - 1; i < n - 1; i++) {
gst->c... | gretl_string_table_detach_col | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_index(gretl_string_table *gst, const char *s, int col,
int addcol, PRN *prn) {
const char *v6;
char *v7;
int i;
int idx;
series_table *st;
char *tmp;
st = 0;
tmp = 0;
idx = 0;
if (!gst)
return 0;
if (gst->cols_list) {
for (i = 1; i <= *g... | int gretl_string_table_index(gretl_string_table *gst, const char *s, int col,
int addcol, PRN *prn) {
series_table *st = NULL;
char *tmp = NULL;
int i, idx = 0;
if (gst == NULL) {
return idx;
}
if (gst->cols_list != NULL) {
for (i = 1; i <= gst->cols_list[0]; i++) {
... | gretl_string_table_index | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_string_table *gretl_string_table_new(const int *list) {
series_table **v2;
int ncols;
int err;
int i;
int j;
gretl_string_table *gst;
ncols = 0;
err = 0;
gst = gretl_string_table_alloc();
if (!gst)
return 0;
if (list && *list > 0) {
gst->cols_list = gretl_list_copy(list);
if (gs... | gretl_string_table *gretl_string_table_new(const int *list) {
gretl_string_table *gst;
int ncols = 0;
int err = 0;
gst = gretl_string_table_alloc();
if (gst == NULL) {
return NULL;
}
if (list != NULL && list[0] > 0) {
gst->cols_list = gretl_list_copy(list);
if (gst->cols_list == NULL) {
... | gretl_string_table_new | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_print(gretl_string_table *gst, DATASET *dset,
const char *fname, PRN *prn) {
int v5;
const char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
int i;
int ia;
int j;
int n_strvars;
int ncols;
unsigned int vi;
FILE *fp;
char *fsho... | int gretl_string_table_print(gretl_string_table *gst, DATASET *dset,
const char *fname, PRN *prn) {
series_table *st;
const char *fshort;
char stname[MAXLEN];
FILE *fp = NULL;
int i, j, ncols = 0;
int n_strvars = 0;
int err = 0;
if (gst == NULL) {
return E_DATA;
}
... | gretl_string_table_print | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_reset_column_id(gretl_string_table *gst, int oldid,
int newid) {
int i;
if (gst) {
for (i = 1; i <= *gst->cols_list; ++i) {
if (oldid == gst->cols_list[i]) {
gst->cols_list[i] = newid;
return 0;
}
}
}
return 2;
} | int gretl_string_table_reset_column_id(gretl_string_table *gst, int oldid,
int newid) {
if (gst != NULL) {
int i;
for (i = 1; i <= gst->cols_list[0]; i++) {
if (gst->cols_list[i] == oldid) {
gst->cols_list[i] = newid;
return 0;
}
}
}
... | gretl_string_table_reset_column_id | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_save(gretl_string_table *gst, DATASET *dset) {
int v3;
int i;
int ncols;
if (!gst || !dset->varinfo)
return 2;
if (gst->cols_list)
v3 = *gst->cols_list;
else
v3 = 0;
ncols = v3;
for (i = 0; i < ncols; ++i) {
if (gst->cols[i]) {
series_attach_string_table(dse... | int gretl_string_table_save(gretl_string_table *gst, DATASET *dset) {
series_table *st;
int i, vi, ncols = 0;
if (gst == NULL || dset->varinfo == NULL) {
return E_DATA;
}
ncols = (gst->cols_list != NULL) ? gst->cols_list[0] : 0;
for (i = 0; i < ncols; i++) {
st = gst->cols[i];
if (st != NULL)... | gretl_string_table_save | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_validate(gretl_string_table *gst, gretlopt opt) {
size_t v2;
int i;
int ncols;
int err;
int nint;
int ndbl;
int j;
int myerr;
const char *s;
series_table *st;
ncols = 0;
err = 0;
if (gst && gst->cols_list)
ncols = *gst->cols_list;
for (i = 0; i < ncols; ++i) {
... | int gretl_string_table_validate(gretl_string_table *gst, gretlopt opt) {
const char *test = "0123456789.,";
int ssheet = (opt & OPT_S);
int i, ncols = 0;
int err = 0;
if (gst != NULL && gst->cols_list != NULL) {
ncols = gst->cols_list[0];
}
for (i = 0; i < ncols; i++) {
series_table *st = gst->c... | gretl_string_table_validate | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_string_table_written() {
_BOOL4 ret;
ret = (paths.status & 1) != 0;
paths.status &= ~1u;
return ret;
} | int gretl_string_table_written(void) {
int ret = 0;
if (paths.status & STRING_TABLE_WRITTEN)
ret = 1;
paths.status &= ~STRING_TABLE_WRITTEN;
return ret;
} | gretl_string_table_written | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *gretl_strings_array_flatten(gretl_array *A, int space, int *err) {
const char *v3;
int i;
int ia;
int len;
char *s;
const char *sep;
if (space)
v3 = " ";
else
v3 = "\n";
sep = v3;
s = 0;
if (A) {
if (A->type == GRETL_TYPE_STRINGS) {
len = 0;
for (i = 0; i < A->n; ++i... | char *gretl_strings_array_flatten(gretl_array *A, int space, int *err) {
const char *sep = space ? " " : "\n";
char *s = NULL;
if (A == NULL) {
*err = E_DATA;
} else if (A->type != GRETL_TYPE_STRINGS) {
*err = E_TYPES;
} else {
int i, len = 0;
for (i = 0; i < A->n; i++) {
if (A->data[i... | gretl_strings_array_flatten | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *gretl_strings_array_pos(gretl_array *A, const char *s, int *err) {
const char *v3;
const char *v4;
int v5;
int i;
int ia;
int np;
int j;
gretl_matrix *ret;
np = 0;
for (i = 0; i < A->n; ++i) {
if (A->data[i])
v3 = (const char *)A->data[i];
else
v3 = byte_330CC0;
... | gretl_matrix *gretl_strings_array_pos(gretl_array *A, const char *s, int *err) {
gretl_matrix *ret = NULL;
const char *si;
int i, np = 0;
for (i = 0; i < A->n; i++) {
si = A->data[i] == NULL ? "" : A->data[i];
if (strcmp(si, s) == 0) {
np++;
}
}
if (np == 0) {
ret = gretl_null_matrix... | gretl_strings_array_pos | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_array *gretl_strings_sort(const gretl_array *A, int descending,
int *err) {
int (*v3)(const void *, const void *);
gretl_array *Asrt;
Asrt = 0;
if (A) {
if (A->type == GRETL_TYPE_STRINGS)
Asrt = gretl_array_new(A->type, A->n, err);
else
*err = 37;
i... | gretl_array *gretl_strings_sort(const gretl_array *A, int descending,
int *err) {
gretl_array *Asrt = NULL;
if (A != NULL) {
if (A->type != GRETL_TYPE_STRINGS) {
*err = E_TYPES;
} else {
Asrt = gretl_array_new(A->type, A->n, err);
}
if (!*err) {
*er... | gretl_strings_sort | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_sum(int t1, int t2, const double *x) {
int n;
double sum;
sum = 0.0;
n = 0;
while (t1 <= t2) {
if (fabs(x[t1]) <= 1.797693134862316e308) {
sum = x[t1] + sum;
++n;
}
++t1;
}
if (n)
return sum;
else
return NAN;
} | double gretl_sum(int t1, int t2, const double *x) {
double sum = 0.0;
int t, n = 0;
for (t = t1; t <= t2; t++) {
if (!(na(x[t]))) {
sum += x[t];
n++;
}
}
return (n == 0) ? NADBL : sum;
} | gretl_sum | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_sum_test(const int *list, MODEL *pmod, DATASET *dset, gretlopt opt,
PRN *prn) {
char *v5;
char *v7;
double bsum;
char *v9;
double bse;
char *v11;
double pval;
char *v13;
double v14;
char *v15;
double v16;
char *v17;
int i;
int ia;
int len;
int err;
int quie... | int gretl_sum_test(const int *list, MODEL *pmod, DATASET *dset, gretlopt opt,
PRN *prn) {
gretl_restriction *r;
char line[MAXLEN];
char bstr[36];
int quiet = (opt & OPT_Q);
int i, len, err = 0;
if (list[0] < 2) {
pprintf(prn, _("Invalid input\n"));
return E_DATA;
}
if (!comm... | gretl_sum_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *gretl_symm_matrix_eigenvals_descending(gretl_matrix *m,
int eigenvecs, int *err) {
return real_symm_eigenvals_descending(m, eigenvecs, 0, err);
} | gretl_matrix *gretl_symm_matrix_eigenvals_descending(gretl_matrix *m,
int eigenvecs, int *err) {
return real_symm_eigenvals_descending(m, eigenvecs, 0, err);
} | gretl_symm_matrix_eigenvals_descending | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_symm_matrix_lambda_max(const gretl_matrix *m, int *err) {
return get_extreme_eigenvalue((gretl_matrix *)m, 1, err);
} | double gretl_symm_matrix_lambda_max(const gretl_matrix *m, int *err) {
return get_extreme_eigenvalue((gretl_matrix *)m, 1, err);
} | gretl_symm_matrix_lambda_max | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_symm_matrix_lambda_min(const gretl_matrix *m, int *err) {
return get_extreme_eigenvalue((gretl_matrix *)m, 0, err);
} | double gretl_symm_matrix_lambda_min(const gretl_matrix *m, int *err) {
return get_extreme_eigenvalue((gretl_matrix *)m, 0, err);
} | gretl_symm_matrix_lambda_min | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_symmetric_eigen_sort(gretl_matrix *evals, gretl_matrix *evecs,
int rank) {
int rows;
int ranka;
int m;
int err;
int i;
int j;
int k;
int n;
double *tmp;
double *colj;
double *colk;
long colsize;
double x;
ranka = rank;
tmp = 0;
err = 0;
if (eva... | int gretl_symmetric_eigen_sort(gretl_matrix *evals, gretl_matrix *evecs,
int rank) {
double *tmp = NULL;
int n, m, err = 0;
n = gretl_vector_get_length(evals);
if (n == 0) {
return E_DATA;
}
if (evecs != NULL && (evecs->rows != n || evecs->cols != n)) {
return E_DATA... | gretl_symmetric_eigen_sort | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *gretl_symmetric_matrix_eigenvals(gretl_matrix *m, int eigenvecs,
int *err) {
int v4;
int save_nt;
gretl_matrix *ret;
save_nt = 0;
*err = 0;
if (m && m->rows && m->cols) {
if (blas_is_openblas()) {
save_nt = blas_get_num_threads();
... | gretl_matrix *gretl_symmetric_matrix_eigenvals(gretl_matrix *m, int eigenvecs,
int *err) {
gretl_matrix *ret = NULL;
static int ev_ver;
int save_nt = 0;
*err = 0;
if (gretl_is_null_matrix(m)) {
*err = E_DATA;
return NULL;
}
if (blas_is_openblas()) ... | gretl_symmetric_matrix_eigenvals | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double gretl_symmetric_matrix_rcond(const gretl_matrix *m, int *err) {
char uplo;
integer n;
integer lda;
integer info;
double rcond;
double anorm;
gretl_matrix *a;
integer *iwork;
double *work;
unsigned long v12;
v12 = __readfsqword(0x28u);
a = 0;
uplo = 76;
iwork = 0;
work = 0;
rcond ... | double gretl_symmetric_matrix_rcond(const gretl_matrix *m, int *err) {
gretl_matrix *a = NULL;
char uplo = 'L';
integer n, lda;
integer info, *iwork = NULL;
double *work = NULL;
double rcond = NADBL;
*err = 0;
if (gretl_is_null_matrix(m)) {
return NADBL;
}
n = m->rows;
lda = m->rows;
a =... | gretl_symmetric_matrix_rcond | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_system_get_sample(const equation_system *sys, int *t1, int *t2) {
if (!sys)
return 2;
*t1 = sys->smpl_t1;
*t2 = sys->smpl_t2;
return 0;
} | int gretl_system_get_sample(const equation_system *sys, int *t1, int *t2) {
if (sys != NULL) {
*t1 = sys->smpl_t1;
*t2 = sys->smpl_t2;
return 0;
}
return E_DATA;
} | gretl_system_get_sample | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_system_print(equation_system *sys, const DATASET *dset, gretlopt opt,
PRN *prn) {
char *v4;
char *v5;
char *v6;
unsigned int iters;
char *v8;
char *v9;
double ll;
char *v11;
int i;
int tex;
int nr;
char *name;
const char *sysstr;
name = sys->name;
tex = te... | int gretl_system_print(equation_system *sys, const DATASET *dset, gretlopt opt,
PRN *prn) {
const char *name = sys->name;
gchar *sysstr = NULL;
int tex = tex_format(prn);
int nr = system_n_restrictions(sys);
int i;
if (sys->models != NULL && sys->method == SYS_METHOD_LIML &&
sy... | gretl_system_print | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_system_residual_mplot(void *p, int ci, const DATASET *dset) {
double v4;
int err;
int i;
int v;
int t;
int nvars;
int nobs;
int t1;
int incr;
double xmin;
double xmax;
const gretl_matrix *E;
GRETL_VAR *var;
equation_system *sys;
FILE *fp;
const double *obs;
double startdate;
... | int gretl_system_residual_mplot(void *p, int ci, const DATASET *dset) {
const gretl_matrix *E = NULL;
GRETL_VAR *var = NULL;
equation_system *sys = NULL;
FILE *fp = NULL;
const double *obs;
double startdate;
double xmin, xmax, xrange;
int nvars, nobs, incr;
int i, v, t, t1;
int err = 0;
if (ci ==... | gretl_system_residual_mplot | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_system_residual_plot(void *p, int ci, int eqn, const DATASET *dset) {
char *v5;
int err;
int single;
int i;
int v;
int t;
int imin;
int imax;
int nvars;
int nobs;
int t1;
GRETL_VAR *var;
equation_system *sys;
const gretl_matrix *E;
FILE *fp;
const double *obs;
double eti;
c... | int gretl_system_residual_plot(void *p, int ci, int eqn, const DATASET *dset) {
GRETL_VAR *var = NULL;
equation_system *sys = NULL;
const gretl_matrix *E = NULL;
FILE *fp = NULL;
const double *obs;
char lwstr[8];
int single = 0;
int nvars, nobs;
int i, v, t, t1;
int imin, imax;
int err = 0;
if ... | gretl_system_residual_plot | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_test_fopen(const char *fname, const char *mode) {
_BYTE err[12];
*(_DWORD *)err = 0;
gretl_error_clear();
*(_QWORD *)&err[4] = fopen(fname, mode);
if (*(_QWORD *)&err[4]) {
fclose(*(FILE **)&err[4]);
if (*mode == 119)
remove(fname);
} else {
*(_QWORD *)err = (unsigned int)*__err... | int gretl_test_fopen(const char *fname, const char *mode) {
FILE *fp = NULL;
int err = 0;
gretl_error_clear();
#ifdef WIN32
fp = g_fopen(fname, mode);
#else
fp = fopen(fname, mode);
#endif
if (fp == NULL) {
err = errno;
} else {
fclose(fp);
if (*mode == 'w') {
remove(fname);
}
}... | gretl_test_fopen | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_test_init(ModelTest *test, ModelTestType ttype) {
test->type = ttype;
test->order = 0;
test->param = 0;
test->teststat = 0;
test->dfn = 0;
test->dfd = 0.0;
test->pvalue = NAN;
test->value = test->pvalue;
test->alpha = NAN;
test->crit = test->alpha;
test->opt = OPT_NONE;
} | static void gretl_test_init(ModelTest *test, ModelTestType ttype) {
test->type = ttype;
test->order = 0;
test->param = NULL;
test->teststat = GRETL_STAT_NONE;
test->dfn = 0;
test->dfd = 0;
test->value = test->pvalue = NADBL;
test->crit = test->alpha = NADBL;
test->opt = OPT_NONE;
} | gretl_test_init | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_test_print_h_0(const ModelTest *test, int heading, PRN *prn) {
char *v3;
char *v4;
char *v5;
char *v6;
char *v7;
char *v8;
int i;
const char *H0;
H0 = 0;
if (test->type == 19 && test->teststat == 11) {
H0 = "No first-order autocorrelation (rho = 0)";
} else {
for (i = 0; tstrin... | static void gretl_test_print_h_0(const ModelTest *test, int heading, PRN *prn) {
const char *H0 = NULL;
int i;
if (test->type == GRETL_TEST_PANEL_AR &&
test->teststat == GRETL_STAT_STUDENT) {
H0 = N_("No first-order autocorrelation (rho = 0)");
} else {
for (i = 0; tstrings[i].ID < GRETL_TEST_MAX... | gretl_test_print_h_0 | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int gretl_test_print_heading(const ModelTest *test, PRN *prn) {
char *v3;
char *v4;
char *param;
const char *descrip;
char ordstr[24];
unsigned long v8;
v8 = __readfsqword(0x28u);
param = 0;
descrip = test_get_descrip(test);
if (!descrip)
return 1;
if (test->order <= 0) {
if (test->type =... | static int gretl_test_print_heading(const ModelTest *test, PRN *prn) {
const char *descrip, *param = NULL;
char ordstr[16];
descrip = test_get_descrip(test);
if (descrip == NULL) {
return 1;
}
if (test->order > 0) {
sprintf(ordstr, "%d", test->order);
param = ordstr;
} else if (test->type ==... | gretl_test_print_heading | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_tests_cleanup() { record_or_get_test_matrix(0, 0, 5, 0); } | static void gretl_tests_cleanup(void) {
record_or_get_test_matrix(NULL, NULL, TESTS_CLEANUP, NULL);
} | gretl_tests_cleanup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void gretl_tex_preamble(PRN *prn, int fmt) {
const char *v2;
const char *v3;
int userfile;
const char *margin;
const char *lang;
FILE *fp;
const char *paper;
const char *driver;
char line[264];
unsigned long v11;
v11 = __readfsqword(0x28u);
lang = getenv("LANG");
userfile = 0;
if (tex_pream... | void gretl_tex_preamble(PRN *prn, int fmt) {
char *lang = getenv("LANG");
FILE *fp = NULL;
int userfile = 0;
if (*tex_preamble_file != '\0') {
fp = gretl_fopen(tex_preamble_file, "r");
if (fp != NULL) {
char line[256];
while (fgets(line, sizeof line, fp)) {
if (strstr(line, "docume... | gretl_tex_preamble | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *gretl_tex_term_line(char *term_line, PlotType ptype, GptFlags flags) {
if (gnuplot_has_tikz())
strcpy(term_line, "set term tikz");
else
strcpy(term_line, "set term cairolatex");
append_gp_encoding(term_line);
return term_line;
} | static char *gretl_tex_term_line(char *term_line, PlotType ptype,
GptFlags flags) {
if (gnuplot_has_tikz()) {
strcpy(term_line, "set term tikz");
} else {
strcpy(term_line, "set term cairolatex");
}
append_gp_encoding(term_line);
return term_line;
} | gretl_tex_term_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_vector *gretl_toeplitz_solve(const gretl_vector *c, const gretl_vector *r,
const gretl_vector *b, int *err) {
int rows;
int cols;
int v7;
int m;
gretl_matrix *y;
if (c) {
if (c->cols == 1) {
rows = c->rows;
} else if (c->rows == 1) {
rows = c->co... | gretl_vector *gretl_toeplitz_solve(const gretl_vector *c, const gretl_vector *r,
const gretl_vector *b, int *err) {
int m = gretl_vector_get_length(c);
gretl_matrix *y = NULL;
if (gretl_is_complex(c) || gretl_is_complex(r) || gretl_is_complex(b)) {
fprintf(stderr, "E_CMPLX ... | gretl_toeplitz_solve | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *gretl_tramo() { return paths.tramo; } | const char *gretl_tramo(void) { return paths.tramo; } | gretl_tramo | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.