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 check_R_matrix(const gretl_matrix *R) {
char *v1;
int err;
gretl_matrix *m;
m = gretl_matrix_alloc(R->rows, R->rows);
if (!m)
return 12;
gretl_matrix_multiply_mod(R, GRETL_MOD_NONE, R, GRETL_MOD_TRANSPOSE, m,
GRETL_MOD_NONE);
err = gretl_invert_general_matrix(m);
if ... | static int check_R_matrix(const gretl_matrix *R) {
gretl_matrix *m;
int err = 0;
m = gretl_matrix_alloc(R->rows, R->rows);
if (m == NULL) {
err = E_ALLOC;
} else {
gretl_matrix_multiply_mod(R, GRETL_MOD_NONE, R, GRETL_MOD_TRANSPOSE, m,
GRETL_MOD_NONE);
err = gretl_... | check_R_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_R_setting(gint8 *var, SetKey key, int val) {
const char *v3;
int err;
err = 0;
if (val) {
if (key == R_FUNCTIONS)
v3 = "R_functions";
else
v3 = "R_lib";
gretl_errmsg_sprintf("%s: not supported", v3);
return 40;
}
return err;
} | static int check_R_setting(gint8 *var, SetKey key, int val) {
int err = 0;
#ifdef USE_RLIB
if (key == R_FUNCTIONS && val != 0) {
libset_set_bool(R_LIB, val);
}
*var = val;
#else
if (val) {
const char *s = (key == R_FUNCTIONS) ? "R_functions" : "R_lib";
gretl_errmsg_sprintf("%s: not supported", ... | check_R_setting | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_add_transform(int ci, int lag, int vnum, const double *x,
const char *vname, const char *label, DATASET *dset,
int parent, int origv) {
int t;
int ta;
int ret;
int chk;
ret = 0;
if (vnum >= dset->v) {
if (dataset_add_series(dset, 1)) {
ret... | static int check_add_transform(int ci, int lag, int vnum, const double *x,
const char *vname, const char *label,
DATASET *dset, int parent, int origv) {
int t, ret = VAR_ADDED_OK;
if (vnum < dset->v) {
int chk = check_vals(x, dset->Z[vnum], dset->n... | check_add_transform | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_adf_options(adf_info *ainfo, gretlopt opt) {
int err;
err = 0;
if ((opt & 0x40) != 0) {
err = incompatible_options(opt, (gretlopt)&loc_A2004);
if (!err && (opt & 0x22008) != 0)
err = 38;
if (!err) {
ainfo->flags |= 8u;
if ((opt & 0x100000) != 0)
ainfo->flags |= 0x1... | static int check_adf_options(adf_info *ainfo, gretlopt opt) {
int err = 0;
if (opt & OPT_G) {
err = incompatible_options(opt, OPT_N | OPT_C | OPT_T | OPT_R);
if (!err && (opt & (OPT_N | OPT_D | OPT_R))) {
err = E_BADOPT;
}
if (!err) {
ainfo->flags |= ADF_GLS;
if (opt & OPT_U) {
... | check_adf_options | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_array_element_type(gretl_array *A, NODE *n) {
_BOOL4 v2;
GretlType t;
GretlType ta;
_BOOL4 ok;
t = gretl_array_get_type(A);
ok = 0;
switch (t) {
case GRETL_TYPE_ANY:
ta = GRETL_TYPE_NONE;
switch (n->t) {
case '9':
case '6':
ta = GRETL_TYPE_MATRICES;
break;
case... | static int check_array_element_type(gretl_array *A, NODE *n) {
GretlType t = gretl_array_get_type(A);
int ok = 0;
if (t == GRETL_TYPE_ANY) {
t = 0;
if (n->t == MAT || n->t == NUM) {
t = GRETL_TYPE_MATRICES;
} else if (n->t == STR) {
t = GRETL_TYPE_STRINGS;
} else if (n->t == BUNDLE) ... | check_array_element_type | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_array_type_compat(GretlType type, user_var *u) {
int err;
err = 0;
if (u->type != GRETL_TYPE_ARRAY)
return 37;
if (type != gretl_array_get_type((gretl_array *)u->ptr))
return 37;
return err;
} | static int check_array_type_compat(GretlType type, user_var *u) {
int err = 0;
if (u->type != GRETL_TYPE_ARRAY) {
err = E_TYPES;
} else {
if (type != gretl_array_get_type(u->ptr)) {
err = E_TYPES;
}
}
return err;
} | check_array_type_compat | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_atof(const char *numstr) {
double v2;
char *v3;
unsigned int v4;
char *v5;
char *v6;
char *test[3];
test[1] = (char *)__readfsqword(0x28u);
if (!*numstr)
return 0;
*__errno_location() = 0;
v2 = strtod(numstr, test);
if (!*test[0] && *__errno_location() != 34)
return 0;
if (!st... | int check_atof(const char *numstr) {
char *test;
if (*numstr == '\0')
return 0;
errno = 0;
strtod(numstr, &test);
if (*test == '\0' && errno != ERANGE)
return 0;
if (!strcmp(numstr, test)) {
gretl_errmsg_sprintf(_("'%s' -- no numeric conversion performed!"), numstr);
return 1;
}
if... | check_atof | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_atoi(const char *numstr) {
char *v2;
unsigned int v3;
char *v4;
char *v5;
char *test;
long val;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (!*numstr)
return 0;
*__errno_location() = 0;
val = strtol(numstr, &test, 10);
if (!*test && *__errno_location() != 34)
return 0;
i... | int check_atoi(const char *numstr) {
long int val;
char *test;
if (*numstr == '\0')
return 0;
errno = 0;
val = strtol(numstr, &test, 10);
if (*test == '\0' && errno != ERANGE)
return 0;
if (!strcmp(numstr, test)) {
gretl_errmsg_sprintf(_("'%s' -- no numeric conversion performed!"), numstr... | check_atoi | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_auto_time_var(const int *targ, int *drop, const DATASET *dset) {
int i;
int ia;
int tnum;
int vi;
tnum = 0;
for (i = 1; i <= *targ; ++i) {
vi = targ[i];
if (!strcmp(dset->varname[vi], "time")) {
tnum = vi;
break;
}
}
if (tnum > 0) {
for (ia = *drop; ia > 0; --ia) ... | static void check_auto_time_var(const int *targ, int *drop,
const DATASET *dset) {
int i, vi, tnum = 0;
for (i = 1; i <= targ[0]; i++) {
vi = targ[i];
if (!strcmp(dset->varname[vi], "time")) {
tnum = vi;
break;
}
}
if (tnum > 0) {
for (i = drop[0]; i... | check_auto_time_var | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_beta_params(int method, double *theta, int k, double eps) {
int err;
err = 0;
if ((method == 2 || method == 5) && k != 2) {
gretl_errmsg_set("theta must be a 2-vector");
return 17;
} else if (method != 3 || k == 3) {
if (eps > *theta || eps > theta[1]) {
if (*theta >= 0.0 && theta[1... | static int check_beta_params(int method, double *theta, int k, double eps) {
int err = 0;
if ((method == MIDAS_BETA0 || method == MIDAS_BETA1) && k != 2) {
gretl_errmsg_set("theta must be a 2-vector");
err = E_INVARG;
} else if (method == MIDAS_BETAN && k != 3) {
gretl_errmsg_set("theta must be a 3-v... | check_beta_params | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_bootstrap(MODEL *pmod, PRN *prn) {
if (bootstrap_ok(pmod->ci))
return 0;
pputs(prn, "Sorry, the bootstrap option is not supported for this test");
pputc(prn, 10);
return 8;
} | static int check_bootstrap(MODEL *pmod, PRN *prn) {
int ok = bootstrap_ok(pmod->ci);
if (!ok) {
pputs(prn, "Sorry, the bootstrap option is not supported for this test");
pputc(prn, '\n');
}
return (ok) ? 0 : E_NOTIMP;
} | check_bootstrap | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_bundled_item(gpointer key, gpointer value, gpointer p) {
int *v3;
int *v4;
int *v5;
const char *name;
const char *v7;
bundled_item *targ;
gretl_matrix *m;
gretl_matrix *m_0;
if (!**((_DWORD **)p + 1) && !**((_DWORD **)p + 2)) {
targ = (bundled_item *)g_hash_table_lookup(*(_QWORD *)(*(_... | static void check_bundled_item(gpointer key, gpointer value, gpointer p) {
bundled_item *targ, *src = (bundled_item *)value;
struct bchecker *bchk = (struct bchecker *)p;
if (*bchk->ret || *bchk->err) {
return;
}
targ = g_hash_table_lookup(bchk->b->ht, (const char *)key);
if (targ == NULL) {
pp... | check_bundled_item | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_clear(gretlopt opt) {
const char *v1;
char *v2;
if (gretl_function_depth() <= 0)
return incompatible_options(opt, OPT_F | OPT_D);
v1 = gretl_command_word(15);
v2 = gettext("The \"%s\" command cannot be used in this context");
gretl_errmsg_sprintf(v2, v1);
return 2;
} | static int check_clear(gretlopt opt) {
int err = 0;
if (gretl_function_depth() > 0) {
gretl_errmsg_sprintf(_("The \"%s\" command cannot be used in this context"),
gretl_command_word(CLEAR));
err = E_DATA;
} else {
err = incompatible_options(opt, OPT_D | OPT_F);
}
return ... | check_clear | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_colspec(const char *s) {
const char *sa;
char c;
int w;
int p;
int err;
const char *ok;
unsigned long v8;
v8 = __readfsqword(0x28u);
ok = "eEfgG";
w = 0;
p = 0;
c = 0;
err = 1;
if (!*s)
return 0;
if (*s != 37)
return 1;
sa = s + 1;
if (s[1] == 35)
sa = s + 2;
i... | static int check_colspec(const char *s) {
const char *ok = "eEfgG";
int w = 0, p = 0;
char c = 0;
int err = 1;
if (*s == '\0') {
return 0;
}
if (*s != '%') {
return 1;
}
s++;
if (*s == '#') {
s++;
}
if (sscanf(s, "%d.%d%c", &w, &p, &c) == 3) {
if (w != 0 && p > 0 && strchr(o... | check_colspec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_cswitch_param(gretl_matrix *m, int *k) {
int err;
err = 0;
if ((unsigned int)*k > 4)
return 17;
if (*k == 1) {
if ((m->cols & 1) != 0)
return 36;
} else if (*k == 3 && (m->rows & 1) != 0) {
return 36;
}
return err;
} | static int check_cswitch_param(gretl_matrix *m, int *k) {
int err = 0;
if (*k < 0 || *k > 4) {
err = E_INVARG;
} else if (*k == 1) {
if (m->cols % 2) {
err = E_NONCONF;
}
} else if (*k == 3) {
if (m->rows % 2) {
err = E_NONCONF;
}
}
return err;
} | check_cswitch_param | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_daily_dates(DATASET *dset, int *pd, int *reversed, PRN *prn) {
guint32 v4;
int v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
int v12;
int v13;
const char *v14;
const char *v15;
int fulln;
int t;
int nbak;
int alt_pd;
int nmiss;
int err;
int T;
int ol... | static int check_daily_dates(DATASET *dset, int *pd, int *reversed, PRN *prn) {
int T = dset->n;
char *lbl1 = dset->S[0];
char *lbl2 = dset->S[T - 1];
int fulln = 0, n, t, nbak;
int alt_pd = 0;
int oldpd = dset->pd;
double oldsd0 = dset->sd0;
guint32 ed1, ed2;
int nmiss = 0, err = 0;
*pd = 0;
ed... | check_daily_dates | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_dataset_is_changed(DATASET *dset) {
int ret;
ret = dset->modflag;
dset->modflag = 0;
return ret;
} | int check_dataset_is_changed(DATASET *dset) {
int ret = dset->modflag;
dset->modflag = 0;
return ret;
} | check_dataset_is_changed | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_db_import_conversion(int pd, DATASET *dset) {
int err;
int target;
target = dset->pd;
err = 0;
if (pd != target && (pd != 1 || target != 4) && (pd != 1 || target != 12) &&
(pd != 4 || target != 12) && (pd != 12 || target != 1) &&
(pd != 4 || target != 1) && (pd != 12 || target != 4)) {
... | int check_db_import_conversion(int pd, DATASET *dset) {
int target = dset->pd;
int err = 0;
if (pd == target) {
;
} else if (pd == 1 && target == 4) {
;
} else if (pd == 1 && target == 12) {
;
} else if (pd == 4 && target == 12) {
;
} else if (pd == 12 && target == 1) {
;
} else if ... | check_db_import_conversion | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_db_import_full(int pd, const char *stobs, const char *endobs,
const char *varname, DATASET *dset) {
char *v5;
int err;
err = check_db_import_conversion(pd, dset);
if (!err)
return db_range_check(pd, stobs, endobs, varname, dset);
v5 = gettext("%s: can't handle conversio... | static int check_db_import_full(int pd, const char *stobs, const char *endobs,
const char *varname, DATASET *dset) {
int err = check_db_import_conversion(pd, dset);
if (err) {
gretl_errmsg_sprintf(_("%s: can't handle conversion"), varname);
} else {
err = db_range_check(pd... | check_db_import_full | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_declarations(char ***pS, parser *p) {
char *expr;
char **v4;
char *v5;
char *v6;
int exists;
int badname;
int i;
int ia;
int n;
const char *s;
char **S;
unsigned long v14;
v14 = __readfsqword(0x28u);
exists = 0;
badname = 0;
n = 1;
gretl_error_clear();
if (p->lh.expr) {
... | int check_declarations(char ***pS, parser *p) {
char **S;
const char *s;
int exists = 0;
int badname = 0;
int i, n = 1;
gretl_error_clear();
if (p->lh.expr == NULL) {
p->err = E_ALLOC;
return 0;
}
s = p->lh.expr;
s += strspn(s, " ");
while (*s) {
if (*s == ',' || *s == ' ') {
... | check_declarations | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_derivative_matrix(int i, gretl_matrix *m, nlspec *s) {
int cols;
int r;
int v;
if (m) {
r = m->rows;
cols = m->cols;
v = s->params[i].nc;
if (cols == v && (r == 1 || r == s->nobs)) {
return 0;
} else {
fprintf(stderr, "matrix deriv for param %d is %d x %d: WRONG\n", i,... | static int check_derivative_matrix(int i, gretl_matrix *m, nlspec *s) {
int r, c, v;
if (m == NULL) {
fprintf(stderr, "param %d, got NULL matrix derivative\n", i);
return 1;
}
r = gretl_matrix_rows(m);
c = gretl_matrix_cols(m);
v = s->params[i].nc;
if (c != v || (r != 1 && r != s->nobs)) {
... | check_derivative_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_derivatives(nlspec *spec, PRN *prn) {
char *v3;
char *v4;
char *v5;
char *v6;
int iflag;
int i;
int badcount;
int zerocount;
int m;
int n;
int ldjac;
double *x;
double *fvec;
double *jac;
double *xp;
double *xerr;
double *fvecp;
unsigned long v20;
v20 = __readfsqword(0x2... | static int check_derivatives(nlspec *spec, PRN *prn) {
double *x = spec->coeff;
double *fvec = spec->fvec;
double *jac = spec->J->val;
int m = spec->nobs;
int n = spec->ncoeff;
int ldjac = m;
int iflag;
double *xp, *xerr, *fvecp;
int i, badcount = 0, zerocount = 0;
xp = malloc((n + m + m) * sizeof ... | check_derivatives | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_dist_count(int d, int f, int *np, int *argc) {
int v4;
int err;
err = 0;
*argc = 0;
*np = *argc;
switch (d) {
case 21:
case 20:
case 19:
if (f == 346 || f == 348 || f == 349) {
if (d == 20)
v4 = 3;
else
v4 = 2;
*np = v4;
} else {
err = 17;
... | static int check_dist_count(int d, int f, int *np, int *argc) {
int err = 0;
*np = *argc = 0;
if (d == D_NC_T || d == D_NC_F || d == D_NC_CHISQ) {
if (f == F_PDF || f == F_CDF || f == F_INVCDF) {
*np = (d == D_NC_F) ? 3 : 2;
} else {
err = E_INVARG;
}
} else if (d == D_UNIFORM || d ==... | check_dist_count | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_downloaded_file(const char *fname, const char *dl_0) {
const char *v2;
int err;
int msg_done;
FILE *fp;
char buf[128];
unsigned long v8;
v8 = __readfsqword(0x28u);
err = 0;
if (!has_suffix(fname, ".zip") || gretl_is_pkzip_file(fname)) {
if (has_suffix(fname, ".gfn") && !gretl_is_xml_fil... | static int check_downloaded_file(const char *fname, const char *dl) {
int err = 0;
if (has_suffix(fname, ".zip") && !gretl_is_pkzip_file(fname)) {
fprintf(stderr, "download: zip suffix but not pkzip\n");
err = E_DATA;
} else if (has_suffix(fname, ".gfn") && !gretl_is_xml_file(fname)) {
fprintf(stderr... | check_downloaded_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_existing_lhs_type(parser *p, int *newvar) {
int err;
int v;
GretlType vtype;
user_var *uvar;
err = gretl_reserved_word(p->lh.name);
if (err)
return err;
v = current_series_index(p->dset, p->lh.name);
if (v < 0) {
uvar = get_user_var_by_name(p->lh.name);
if (uvar) {
vtype = u... | static int check_existing_lhs_type(parser *p, int *newvar) {
user_var *uvar;
int v, err = 0;
if ((err = gretl_reserved_word(p->lh.name))) {
return err;
}
v = current_series_index(p->dset, p->lh.name);
if (v >= 0) {
p->lh.vnum = v;
p->lh.t = SERIES;
*newvar = 0;
return 0;
}
uvar = ... | check_existing_lhs_type | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_first_field(const char *line, csvdata *c, PRN *prn) {
char *v3;
unsigned int v4;
char *v5;
char *v6;
unsigned int i;
const char *s;
char field1[24];
unsigned long v11;
v11 = __readfsqword(0x28u);
tryagain:
s = line;
if (c->delim == 32 || *line != c->delim) {
i = 0;
if (c->delim... | static void check_first_field(const char *line, csvdata *c, PRN *prn) {
const char *s;
tryagain:
s = line;
if (c->delim != ' ' && *s == c->delim) {
csv_set_blank_column(c);
} else {
char field1[OBSLEN];
int i = 0;
if (c->delim == ' ' && *s == ' ') {
s++;
}
while (*s && i < size... | check_first_field | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_for_daily_date_strings(DATASET *dset) {
int m;
int d;
int y1;
int y2;
int n;
int oldfmt;
int k;
unsigned long v8;
v8 = __readfsqword(0x28u);
y1 = 0;
y2 = 0;
oldfmt = 0;
n = __isoc99_sscanf(*dset->S, "%d-%d-%d", &y1, &m, &d);
if (n != 3) {
oldfmt = 1;
n = __isoc99_sscanf(*... | static void check_for_daily_date_strings(DATASET *dset) {
int m, d, n;
int y1 = 0, y2 = 0;
int oldfmt = 0;
n = sscanf(dset->S[0], YMD_READ_FMT, &y1, &m, &d);
if (n != 3) {
oldfmt = 1;
n = sscanf(dset->S[0], "%d/%d/%d", &y1, &m, &d);
}
if (n == 3) {
int k = dset->n - 1;
if (oldfmt) {
... | check_for_daily_date_strings | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_db_duplicates(const int *list, const DATASET *dset,
const char *idxname, int *err) {
int oldv;
int i;
int j;
int ret;
int v;
char **snames[2];
snames[1] = (char **)__readfsqword(0x28u);
snames[0] = 0;
oldv = 0;
ret = 0;
*err = get_db_series_names(idxname,... | static int check_for_db_duplicates(const int *list, const DATASET *dset,
const char *idxname, int *err) {
char **snames = NULL;
int i, j, v, oldv = 0;
int ret = 0;
#if DB_DEBUG
printlist(list, "check_for_db_duplicates: input save list");
#endif
*err = get_db_series_names(i... | check_for_db_duplicates | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_effective_const(MODEL *pmod, const DATASET *dset) {
int t;
_BOOL4 ret;
double ubar;
double ubara;
double ybar;
double ybara;
ubar = 0.0;
ybar = 0.0;
ret = 0;
for (t = pmod->t1; t <= pmod->t2; ++t) {
if (fabs(pmod->uhat[t]) <= 1.797693134862316e308) {
ubar = pmod->uhat[t] + u... | int check_for_effective_const(MODEL *pmod, const DATASET *dset) {
double ubar = 0.0, ybar = 0.0;
const double *y = dset->Z[pmod->list[1]];
int t, ret = 0;
for (t = pmod->t1; t <= pmod->t2; t++) {
if (!na(pmod->uhat[t])) {
ubar += pmod->uhat[t];
ybar += y[t];
}
}
ubar = fabs(ubar / pmod... | check_for_effective_const | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_for_inline_typespec(const char **ps, parser *p) {
const char *s;
s = *ps;
if (!strncmp(*ps, "scalar ", 7u)) {
p->targ = 54;
s += 7;
} else if (!strncmp(s, "series ", 7u)) {
p->targ = 55;
s += 7;
} else if (!strncmp(s, "matrix ", 7u)) {
p->targ = 57;
s += 7;
} else if (!st... | static void check_for_inline_typespec(const char **ps, parser *p) {
const char *s = *ps;
if (!strncmp(s, "scalar ", 7)) {
p->targ = NUM;
s += 7;
} else if (!strncmp(s, "series ", 7)) {
p->targ = SERIES;
s += 7;
} else if (!strncmp(s, "matrix ", 7)) {
p->targ = MAT;
s += 7;
} else if (... | check_for_inline_typespec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_lags(MODEL *pmod, const DATASET *dset) {
int pmax;
int ldv;
unsigned long v5;
v5 = __readfsqword(0x28u);
pmax = 0;
ldv = model_lags(pmod->list, dset, &pmax);
if (pmax <= 0) {
if (gretl_model_get_int(pmod, "maxlag"))
gretl_model_destroy_data_item(pmod, "maxlag");
} else {
gre... | static int check_for_lags(MODEL *pmod, const DATASET *dset) {
int pmax = 0;
int ldv = model_lags(pmod->list, dset, &pmax);
if (pmax > 0) {
gretl_model_set_int(pmod, "maxlag", pmax);
} else if (gretl_model_get_int(pmod, "maxlag")) {
gretl_model_destroy_data_item(pmod, "maxlag");
}
if (ldv) {
gr... | check_for_lags | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
fnpkg *check_for_loaded(const char *fname, gretlopt opt) {
fnpkg *pkg;
pkg = get_loaded_pkg_by_filename(fname, 0);
if (pkg && (opt & 0x20) != 0) {
real_function_package_unload(pkg, 1);
return 0;
}
return pkg;
} | static fnpkg *check_for_loaded(const char *fname, gretlopt opt) {
fnpkg *pkg = get_loaded_pkg_by_filename(fname, NULL);
if (pkg != NULL) {
if (opt & OPT_F) {
real_function_package_unload(pkg, 1);
pkg = NULL;
}
}
return pkg;
} | check_for_loaded | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_loop_only_options(int ci, gretlopt opt, PRN *prn) {
char *v3;
int ret;
const char *flagstr;
ret = 0;
if (ci == 88 && (opt & 0x8000) != 0) {
flagstr = print_flags(OPT_P, 88);
v3 = gettext("Warning: option%s ignored outside of loop");
pprintf(prn, v3, flagstr);
pputc(prn, 10);
... | int check_for_loop_only_options(int ci, gretlopt opt, PRN *prn) {
int ret = 0;
if (ci == OLS && (opt & OPT_P)) {
const char *flagstr = print_flags(OPT_P, OLS);
pprintf(prn, _("Warning: option%s ignored outside of loop"), flagstr);
pputc(prn, '\n');
ret = 1;
}
return ret;
} | check_for_loop_only_options | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_matrix_updates(kalman *K, ufunc *uf) {
size_t v3;
ufunc *ufa;
int nlines;
int i;
int j;
int n;
char **lines;
const char *bname;
const char *s;
char test[40];
unsigned long v13;
ufa = uf;
v13 = __readfsqword(0x28u);
nlines = 0;
if (K->varying) {
free(K->varying);
K->v... | static int check_for_matrix_updates(kalman *K, ufunc *uf) {
char **lines;
int nlines = 0;
if (K->varying != NULL) {
free(K->varying);
K->varying = NULL;
}
if (uf == NULL) {
uf = get_user_function_by_name(K->matcall);
if (uf == NULL) {
gretl_errmsg_sprintf("Couldn't find function '%s'",... | check_for_matrix_updates | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_missing_columns(joinspec *jspec) {
char *v1;
int i;
const char *name;
for (i = 0; i < jspec->ncols; ++i) {
if (i != 1 && i != 2 && i != 3) {
name = jspec->colnames[i];
if (name) {
if (!jspec->colnums[i]) {
v1 = gettext("%s: column '%s' was not found");
... | static int check_for_missing_columns(joinspec *jspec) {
const char *name;
int i;
for (i = 0; i < jspec->ncols; i++) {
if (i == JOIN_F1 || i == JOIN_F2 || i == JOIN_F3) {
continue;
}
name = jspec->colnames[i];
if (name != NULL && jspec->colnums[i] == 0) {
gretl_errmsg_sprintf(_("%s: co... | check_for_missing_columns | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_overlap(const DATASET *dset, const DATASET *addset, int *offset) {
int at1;
int at2;
at1 = merge_dateton(addset->stobs, dset);
at2 = merge_dateton(addset->endobs, dset);
if (at1 >= dset->n || at2 < 0) {
gretl_errmsg_set("No overlap in data ranges");
return 2;
} else {
*offset = at... | static int check_for_overlap(const DATASET *dset, const DATASET *addset,
int *offset) {
int at1 = merge_dateton(addset->stobs, dset);
int at2 = merge_dateton(addset->endobs, dset);
if (!(at1 >= dset->n) && !(at2 < 0)) {
*offset = at1;
return 0;
} else {
gretl_errmsg_s... | check_for_overlap | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_pdf_ref(const char *s, fnpkg *pkg, int *err) {
char *v3;
const char *sa;
int ret;
int len;
char *tmp;
sa = s;
ret = 0;
if (!strncmp(s, "pdfdoc:", 7u))
sa = s + 7;
len = strlen(sa);
if (len <= 63 && !strchr(sa, 32) && has_suffix(sa, ".pdf")) {
tmp = gretl_strndup(sa, len - 4);
... | static int check_for_pdf_ref(const char *s, fnpkg *pkg, int *err) {
int len, ret = 0;
if (!strncmp(s, "pdfdoc:", 7)) {
s += 7;
}
len = strlen(s);
if (len < 64 && strchr(s, ' ') == NULL && has_suffix(s, ".pdf")) {
char *tmp = gretl_strndup(s, len - 4);
if (strcmp(tmp, pkg->name)) {
gretl_e... | check_for_pdf_ref | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_quarterly_format(obskey *auto_keys, int pd) {
int i;
int err;
char *s;
s = auto_keys->timefmt;
err = 0;
for (i = 0; s[i]; ++i) {
if (s[i] == 37 && (s[i + 1] == 113 || s[i + 1] == 81) &&
(!i || s[i - 1] != 37)) {
if (pd == 4 || pd == 1) {
s[i + 1] = 109;
auto_... | static int check_for_quarterly_format(obskey *auto_keys, int pd) {
char *s = auto_keys->timefmt;
int i, err = 0;
#if JDEBUG
fprintf(stderr, "check_for_quarterly_format: '%s'\n", s);
#endif
for (i = 0; s[i]; i++) {
if (s[i] == '%' && (s[i + 1] == 'q' || s[i + 1] == 'Q') &&
(i == 0 || s[i - 1] != '%... | check_for_quarterly_format | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_state() {
if (state)
return 0;
else
return libset_init();
} | static int check_for_state(void) {
if (state == NULL) {
return libset_init();
} else {
#if PDEBUG > 1
fprintf(stderr, "check_for_state: state = %p\n", (void *)state);
#endif
return 0;
}
} | check_for_state | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_stop() {
if (query_stop)
return query_stop();
else
return 0;
} | int check_for_stop(void) {
if (query_stop != NULL) {
return (*query_stop)();
} else {
return 0;
}
} | check_for_stop | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_for_tsls_style_lists(equation_system *sys, int *err) {
int i;
int tsls_style;
tsls_style = 0;
for (i = 0; i < sys->neqns; ++i) {
if (gretl_list_has_separator(sys->lists[i])) {
tsls_style = 1;
break;
}
}
if (tsls_style) {
if (sys->ylist || sys->ilist) {
gretl_errmsg_s... | static int check_for_tsls_style_lists(equation_system *sys, int *err) {
int i, tsls_style = 0;
for (i = 0; i < sys->neqns; i++) {
if (gretl_list_has_separator(sys->lists[i])) {
tsls_style = 1;
break;
}
}
if (tsls_style) {
if (sys->ylist != NULL || sys->ilist != NULL) {
gretl_errm... | check_for_tsls_style_lists | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_for_yscale(gnuplot_info *gi, const double **Z, int *oddman) {
GptFlags flags;
GptFlags v4;
GptFlags v5;
int lmax;
int i;
int ia;
int j;
int oddcount;
double ratio;
double ymin[6];
double ymax[8];
*(_QWORD *)&ymax[7] = __readfsqword(0x28u);
lmax = *gi->list;
if ((gi->flags & 0x100... | static void check_for_yscale(gnuplot_info *gi, const double **Z, int *oddman) {
double ymin[6], ymax[6];
double ratio;
int lmax = gi->list[0];
int i, j, oddcount;
#if GP_DEBUG
fprintf(stderr, "gnuplot: doing check_for_yscale, listlen %d\n", gi->list[0]);
#endif
if (gi->flags & GPT_IDX) {
if (gi->list... | check_for_yscale | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_freq_opts(gretlopt opt, int *n_bins, double *fmin, double *fwid) {
int err;
int n;
double x;
unsigned long v10;
v10 = __readfsqword(0x28u);
err = 0;
if ((opt & 0x2000) != 0) {
if ((opt & 0x401000) != 0)
return 38;
n = get_optval_int(44, OPT_N, &err);
if (!err) {
if (n > ... | static int check_freq_opts(gretlopt opt, int *n_bins, double *fmin,
double *fwid) {
double x;
int err = 0;
if (opt & OPT_N) {
if (opt & (OPT_M | OPT_W)) {
return E_BADOPT;
} else {
int n = get_optval_int(FREQ, OPT_N, &err);
if (!err) {
if (n < 2 || ... | check_freq_opts | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_full_dataset() {
DATASET *fset;
fset = fetch_full_dataset();
if (fset && fset->structure == 2)
return 0;
gretl_errmsg_set(
"You cannot use the --panel-vars option with the setobs command when\n"
"\n"
"* the dataset is currently sub-sampled and\n"
"* the full dataset is not... | static int check_full_dataset(void) {
DATASET *fset = fetch_full_dataset();
if (!dataset_is_panel(fset)) {
const char *msg =
"You cannot use the --panel-vars option with the setobs command when\n"
"\n"
"* the dataset is currently sub-sampled and\n"
"* the full dataset is not a p... | check_full_dataset | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_func_name(const char *name, ufunc **pfun, const DATASET *dset,
PRN *prn) {
char *v4;
char *v5;
char *v6;
int i;
int err;
err = 0;
if (((*__ctype_b_loc())[*(unsigned char *)name] & 0x400) != 0) {
if (gretl_reserved_word(name)) {
return 1;
} else if (function_loo... | static int check_func_name(const char *name, ufunc **pfun, const DATASET *dset,
PRN *prn) {
int i, err = 0;
#if FN_DEBUG
fprintf(stderr, "check_func_name: '%s'\n", name);
#endif
if (!isalpha((unsigned char)*name)) {
gretl_errmsg_set(_("Function names must start with a letter"));
... | check_func_name | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_function_args(fncall *call, PRN *prn) {
const char *name;
const char *v3;
char *v4;
char *v5;
char *v6;
int i;
int ia;
int ib;
int err;
int scalar_check;
ufunc *u;
fn_arg *arg;
fn_param *fp;
fn_param *fpa;
double x;
u = call->fun;
err = 0;
for (i = 0; i < u->n_params; ++i)... | static int check_function_args(fncall *call, PRN *prn) {
ufunc *u = call->fun;
fn_arg *arg;
fn_param *fp;
double x;
int i, err = 0;
for (i = 0; i < u->n_params; i++) {
fp = &u->params[i];
fp->immut = fp->flags & FP_CONST;
}
for (i = 0; i < call->argc && !err; i++) {
int scalar_check = 1;
... | check_function_args | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_function_needs(const DATASET *dset, DataReq dreq, int minver) {
char vstr[8];
unsigned long v6;
v6 = __readfsqword(0x28u);
if (!thisver_2)
thisver_2 = gretl_version_number("2021d");
if (minver <= thisver_2) {
if (dset && dset->v || dreq == FN_NODATA_OK) {
if (dreq != FN_NEEDS_TS ||
... | int check_function_needs(const DATASET *dset, DataReq dreq, int minver) {
static int thisver = 0;
if (thisver == 0) {
thisver = gretl_version_number(GRETL_VERSION);
}
if (minver > thisver) {
char vstr[8];
gretl_version_string(vstr, minver);
gretl_errmsg_sprintf("This function needs gretl vers... | check_function_needs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_gmm_requirements(nlspec *spec) {
char *v1;
ocset *oc;
int err;
err = 0;
if (spec->oc) {
if (spec->oc->W) {
spec->oc->userwts = 1;
} else {
oc = spec->oc;
oc->W = gretl_identity_matrix_new(oc->noc);
if (spec->oc->W) {
strcpy(spec->oc->Wname, "auto");
r... | int check_gmm_requirements(nlspec *spec) {
int err = 0;
if (spec->oc == NULL) {
gretl_errmsg_set(_("No orthogonality conditions have been specified"));
err = E_DATA;
} else if (spec->oc->W == NULL) {
spec->oc->W = gretl_identity_matrix_new(spec->oc->noc);
if (spec->oc->W == NULL) {
err = E... | check_gmm_requirements | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_gretl_errno() { return gretl_errno; } | int check_gretl_errno(void) { return gretl_errno; } | check_gretl_errno | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_gretl_warning() { return gretl_warnnum; } | int check_gretl_warning(void) { return gretl_warnnum; } | check_gretl_warning | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_gretldir(char *config_path) {
int gotit;
pid_t pid;
FILE *fp;
FILE *fpa;
gchar *proc_exe;
long nr;
char *s;
char testname[4104];
unsigned long v9;
v9 = __readfsqword(0x28u);
gotit = 0;
sprintf(testname, "%sCOPYING", paths.gretldir);
fp = gretl_fopen(testname, "r");
if (fp) {
... | static void check_gretldir(char *config_path) {
char testname[FILENAME_MAX];
FILE *fp;
int gotit = 0;
sprintf(testname, "%sCOPYING", paths.gretldir);
fp = gretl_fopen(testname, "r");
if (fp != NULL) {
fclose(fp);
gotit = 1;
} else if (*config_path != '\0') {
slash_terminate(config_path);
... | check_gretldir | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_hf_difflist(const int *list, const DATASET *dset, int ci,
int *n_add) {
char *v4;
int i;
int err;
char vname[40];
unsigned long v11;
v11 = __readfsqword(0x28u);
err = 0;
for (i = 1; i <= *list && !err; ++i) {
make_transform_varname(vname, dset->varname[list[i]], ci, ... | static int check_hf_difflist(const int *list, const DATASET *dset, int ci,
int *n_add) {
char vname[VNAMELEN];
int i, v, li, err = 0;
for (i = 1; i <= list[0] && !err; i++) {
li = list[i];
make_transform_varname(vname, dset->varname[li], ci, 0, VNAMELEN - 8);
v = current_... | check_hf_difflist | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_identifier(const char *varname) {
return real_check_varname(varname, 0);
} | int check_identifier(const char *varname) {
return real_check_varname(varname, 0);
} | check_identifier | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_import_names(char **S, int ns, int ci, DATASET *dset) {
int i;
int err;
err = 0;
for (i = 0; i < ns && !err; ++i) {
if (S[i] && *S[i]) {
if ((ci != 61 || !strchr(S[i], 42) && !strchr(S[i], 63)) && ci == 61 &&
current_series_index(dset, S[i]) < 0) {
err = check_varname(S[i]... | static int check_import_names(char **S, int ns, int ci, DATASET *dset) {
int i, err = 0;
for (i = 0; i < ns && !err; i++) {
if (S[i] == NULL || S[i][0] == '\0') {
err = E_DATA;
} else if (ci == JOIN && (strchr(S[i], '*') || strchr(S[i], '?'))) {
;
} else if (ci == JOIN && current_series_ind... | check_import_names | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_import_subsetting(CMD *cmd, OpenOp *op) {
gretlopt opt;
const char *s;
if (cmd->ci != 90 || op->ftype >= 2u)
return 38;
s = get_optval_string(90, OPT_E);
if (get_array_by_name(s)) {
opt = cmd->opt;
BYTE1(opt) |= 0x80u;
cmd->opt = opt;
}
return 0;
} | static int check_import_subsetting(CMD *cmd, OpenOp *op) {
if (cmd->ci != OPEN ||
(op->ftype != GRETL_XML_DATA && op->ftype != GRETL_BINARY_DATA)) {
return E_BADOPT;
} else {
const char *s = get_optval_string(OPEN, OPT_E);
if (get_array_by_name(s)) {
cmd->opt |= OPT_P;
}
return 0;
... | check_import_subsetting | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_imported_string(char *src, int i, size_t len) {
int err;
gsize bytes;
gchar *trstr;
unsigned long v8;
v8 = __readfsqword(0x28u);
err = 0;
if (!(unsigned int)g_utf8_validate(src, -1, 0)) {
trstr = 0;
trstr = (gchar *)g_locale_to_utf8(src, -1, 0, &bytes, 0);
if (trstr) {
*src = ... | static int check_imported_string(char *src, int i, size_t len) {
int err = 0;
if (!g_utf8_validate(src, -1, NULL)) {
gchar *trstr = NULL;
gsize bytes;
trstr = g_locale_to_utf8(src, -1, NULL, &bytes, NULL);
if (trstr == NULL) {
gretl_errmsg_sprintf("Invalid characters in imported string, lin... | check_imported_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_index_in_parentage(LOOPSET *loop, const char *vname) {
char *v2;
LOOPSET *loopa;
int thistype;
loopa = loop;
thistype = loop->type;
while (1) {
loopa = loopa->parent;
if (!loopa)
break;
if ((loopa->type != 4 || thistype != loopa->type) &&
!strcmp(vname, loopa->idxname)) ... | static int check_index_in_parentage(LOOPSET *loop, const char *vname) {
int thistype = loop->type;
while ((loop = loop->parent) != NULL) {
if ((loop->type != FOR_LOOP || loop->type != thistype) &&
strcmp(vname, loop->idxname) == 0) {
gretl_errmsg_sprintf(
_("Using the same index variabl... | check_index_in_parentage | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_index_values(const double *x, int n) {
int i;
for (i = 1; i < n; ++i) {
if (x[i] < 0.0)
return 2;
if (fabs(x[i]) > 1.797693134862316e308)
return 34;
}
return 0;
} | static int check_index_values(const double *x, int n) {
int i;
for (i = 1; i < n; i++) {
if (x[i] < 0) {
return E_DATA;
} else if (na(x[i])) {
return E_MISSDATA;
}
}
return 0;
} | check_index_values | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_indices(sorter *s, int n) {
double v2;
char *v3;
double v5;
int i;
for (i = 0; i < n; ++i) {
if (*(int *)(*(_QWORD *)&s->t + 24LL * i) < 0) {
v5 = *(double *)(*(_QWORD *)&s->t + 24LL * i + 16);
v2 = *(double *)(*(_QWORD *)&s->t + 24LL * i + 8);
v3 = gettext("Error: unit %g, pe... | static int check_indices(sorter *s, int n) {
int i;
for (i = 0; i < n; i++) {
if (s->points[i].obsnum < 0) {
gretl_errmsg_sprintf(
_("Error: unit %g, period %g: duplicated observation"),
s->points[i].val1, s->points[i].val2);
return E_DATA;
}
}
return 0;
} | check_indices | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_integrated_forecast_option(MODEL *pmod, DATASET *dset, int *pyno) {
int parent;
int err;
int yno;
unsigned long v9;
v9 = __readfsqword(0x28u);
err = 0;
if (pmod->ci != 88)
return inapplicable_option_error(40, OPT_I);
yno = gretl_model_get_depvar(pmod);
if (!is_standard_diff(yno, dset, &... | static int check_integrated_forecast_option(MODEL *pmod, DATASET *dset,
int *pyno) {
int err = 0;
if (pmod->ci != OLS) {
err = inapplicable_option_error(FCAST, OPT_I);
} else {
int yno = gretl_model_get_depvar(pmod);
int d, parent;
d = is_standard_diff... | check_integrated_forecast_option | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_lhs_vec(nlspec *s) {
int rows;
if (s->lvec) {
if (s->lvec->cols == 1) {
rows = s->lvec->rows;
} else if (s->lvec->rows == 1) {
rows = s->lvec->cols;
} else {
rows = 0;
}
} else {
rows = 0;
}
if (rows == s->nobs)
return 0;
fprintf(stderr, "LHS vector shoul... | static int check_lhs_vec(nlspec *s) {
int v = gretl_vector_get_length(s->lvec);
if (v != s->nobs) {
fprintf(stderr, "LHS vector should be of length %d, is %d\n", s->nobs, v);
return 1;
}
return 0;
} | check_lhs_vec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_list_bounds(int *list, int arrdim) {
int i;
for (i = 1; i <= *list; ++i) {
if (list[i] <= 0 || arrdim < list[i])
return 0;
}
return 1;
} | static int check_list_bounds(int *list, int arrdim) {
int i;
for (i = 1; i <= list[0]; i++) {
if (list[i] <= 0 || list[i] > arrdim) {
return 0;
}
}
return 1;
} | check_list_bounds | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_matrix_dims(kalman *K, const gretl_matrix *m, int i) {
_BOOL4 v3;
int cols;
int rows;
const char *v6;
const char *v7;
int r;
int c;
int err;
r = 0;
c = 0;
v3 = i == 3 || i == 4;
err = 0;
switch (i) {
case 0:
case 3:
case 9:
c = K->r;
r = c;
break;
case 1:
r =... | static int check_matrix_dims(kalman *K, const gretl_matrix *m, int i) {
int r = 0, c = 0, symm = (i == K_Q || i == K_R);
int err = 0;
if (i == K_F || i == K_Q || i == K_P) {
r = c = K->r;
} else if (i == K_A) {
r = K->k;
c = K->n;
} else if (i == K_H) {
r = K->r;
c = K->n;
} else if (i ... | check_matrix_dims | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_matrix_file(const char *fname, int *csv) {
int r;
int c;
int n;
FILE *fp;
char line[1032];
unsigned long v8;
v8 = __readfsqword(0x28u);
*csv = 1;
fp = gretl_fopen(fname, "rb");
if (!fp)
return 0;
while (fgets(line, 1024, fp)) {
if (line[0] != 35) {
n = __isoc99_sscanf(line... | static int check_matrix_file(const char *fname, int *csv) {
char line[1024];
FILE *fp;
int r, c, n;
*csv = 1;
fp = gretl_fopen(fname, "rb");
if (fp == NULL) {
return 0;
}
while (fgets(line, sizeof line, fp)) {
if (*line != '#') {
n = sscanf(line, "%d\t%d", &r, &c);
if (n == 2 &&... | check_matrix_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_matrix_param(const char *name, gretl_bundle *b) {
char *v3;
int err;
gretl_matrix *m;
unsigned long v7;
v7 = __readfsqword(0x28u);
err = 0;
if (b)
m = gretl_bundle_get_matrix(b, name, &err);
else
m = get_matrix_by_name(name);
if (err || !m)
goto LABEL_14;
if (m->cols == 1) {
... | static int check_matrix_param(const char *name, gretl_bundle *b) {
gretl_matrix *m;
int err = 0;
if (b == NULL) {
m = get_matrix_by_name(name);
} else {
m = gretl_bundle_get_matrix(b, name, &err);
}
if (err || m == NULL || gretl_vector_get_length(m) == 0) {
gretl_errmsg_sprintf(_("'%s': expect... | check_matrix_param | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_matrix_scan_format(const char *fmt, int ns, int *n) {
int err;
char *p;
long len;
unsigned long v8;
v8 = __readfsqword(0x28u);
err = 0;
if (*fmt != 37)
return 17;
len = strtol(fmt + 1, &p, 10);
if (fmt + 1 == p) {
*n = ns;
} else if (len >= 0) {
if (len <= ns)
*n = len;
... | static int check_matrix_scan_format(const char *fmt, int ns, int *n) {
int err = 0;
if (*fmt == '%') {
char *p;
long len = strtol(++fmt, &p, 10);
if (p == fmt) {
*n = ns;
} else if (len < 0) {
err = E_INVARG;
} else if (len > ns) {
*n = ns;
} else {
*n = len;
}... | check_matrix_scan_format | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_matrix_subspec(matrix_subspec *spec, const gretl_matrix *m) {
int rows;
char *v4;
int v5;
int offset;
int nelem;
int err;
int veclen;
unsigned long v10;
v10 = __readfsqword(0x28u);
err = 0;
if (spec->checked)
return 0;
if (spec->ltype != SEL_REAL || m->is_complex) {
if (spec->... | int check_matrix_subspec(matrix_subspec *spec, const gretl_matrix *m) {
int veclen, err = 0;
if (spec->checked) {
return 0;
} else if (spec->ltype == SEL_REAL && !m->is_complex) {
spec->ltype = spec->rtype = SEL_ALL;
goto check_done;
} else if (is_sel_dummy(spec->ltype)) {
goto check_done;
}... | check_matrix_subspec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_matrix_varnames(DATASET *dset) {
int i;
int ia;
int j;
int err;
err = 0;
for (i = 1; i < dset->v; ++i) {
for (j = 1; j < i; ++j) {
if (!strcmp(dset->varname[i], dset->varname[j])) {
err = 1;
break;
}
}
}
if (err) {
for (ia = 1; ia < dset->v; ++ia)
... | static void check_matrix_varnames(DATASET *dset) {
int i, j, err = 0;
for (i = 1; i < dset->v; i++) {
for (j = 1; j < i; j++) {
if (!strcmp(dset->varname[i], dset->varname[j])) {
err = 1;
break;
}
}
}
if (err) {
for (i = 1; i < dset->v; i++) {
sprintf(dset->varnam... | check_matrix_varnames | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_models_for_subsample(char *newmask, int *ndropped) {
GretlObjType type;
int err;
int moderr;
GList *fromgui;
GList *togui;
void *ptr;
MODEL *pmod;
unsigned long v10;
v10 = __readfsqword(0x28u);
fromgui = 0;
err = 0;
if (get_or_send_gui_models)
fromgui = get_or_send_gui_models(0);
... | int check_models_for_subsample(char *newmask, int *ndropped) {
GList *fromgui = NULL;
GretlObjType type;
MODEL *pmod;
void *ptr;
int moderr;
int err = 0;
if (get_or_send_gui_models != NULL) {
fromgui = (*get_or_send_gui_models)(NULL);
}
if (ndropped != NULL) {
*ndropped = 0;
while (from... | check_models_for_subsample | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_operator_validity(parser *p, const char *opstr) {
char *v2;
char *v4;
char *v5;
char *v6;
char *v7;
char *v8;
if (p->lh.t == 57 && p->op != 6 && p->op != 34 && p->op != 7 && p->op != 8 &&
p->op != 9 && p->op != 10 && p->op != 36 && p->op != 37) {
v2 = gettext("'%s' : not implemented f... | static int check_operator_validity(parser *p, const char *opstr) {
if (p->lh.t == MAT && !ok_matrix_op(p->op)) {
gretl_errmsg_sprintf(_("'%s' : not implemented for matrices"), opstr);
return E_PARSE;
} else if (p->lh.t == LIST && !ok_list_op(p->op)) {
gretl_errmsg_sprintf(_("'%s' : not implemented for... | check_operator_validity | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_optimizer_callback(umax *u, const char *fncall) {
int err;
int n;
user_var *uvar;
ufunc *ufun;
char fname[40];
unsigned long v8;
v8 = __readfsqword(0x28u);
n = strcspn(fncall, "(");
err = 0;
if (n <= 0 || n > 31) {
if (n > 31)
return 17;
} else {
uvar = 0;
fname[0] = 0... | static int check_optimizer_callback(umax *u, const char *fncall) {
int n = strcspn(fncall, "(");
int err = 0;
if (n > 0 && n < FN_NAMELEN) {
char fname[FN_NAMELEN];
user_var *uvar = NULL;
ufunc *ufun;
*fname = '\0';
strncat(fname, fncall, n);
ufun = get_user_function_by_name(fname);
... | check_optimizer_callback | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_optimizer_scalar_parm(umax *u, const char *s) {
int err;
int n;
char vname[40];
unsigned long v6;
v6 = __readfsqword(0x28u);
n = gretl_namechar_spn(s);
err = 0;
if (n <= 0 || n > 31) {
if (n > 31)
return 17;
} else {
vname[0] = 0;
strncat(vname, s, n);
if (!gretl_is_sc... | static int check_optimizer_scalar_parm(umax *u, const char *s) {
int n = gretl_namechar_spn(s);
int err = 0;
if (n > 0 && n < VNAMELEN) {
char vname[VNAMELEN];
*vname = '\0';
strncat(vname, s, n);
if (!gretl_is_scalar(vname)) {
err = gretl_scalar_add(vname, NADBL);
}
if (!err) {
... | check_optimizer_scalar_parm | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_panel_options(gretlopt opt) {
if ((opt & 0x100000) != 0 && (opt & 0x80) != 0)
return 38;
if ((opt & 0x80000) != 0 && (opt & 0x80) == 0)
return 38;
if ((opt & 0x2000) != 0 && (opt & 0x100000) == 0)
return 38;
if ((opt & 4) != 0 && (opt & 0x8000) == 0)
return 38;
if (incompatible_optio... | static int check_panel_options(gretlopt opt) {
if ((opt & OPT_U) && (opt & OPT_H)) {
return E_BADOPT;
} else if ((opt & OPT_T) && !(opt & OPT_H)) {
return E_BADOPT;
} else if ((opt & OPT_N) && !(opt & OPT_U)) {
return E_BADOPT;
} else if ((opt & OPT_C) && !(opt & OPT_P)) {
return E_BADOPT;
... | check_panel_options | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_param_name(char **pname, GretlType *type, gretl_bundle **pbundle) {
int berr;
int err;
GretlType btype;
gretl_bundle *b;
char *name;
gchar **S;
unsigned long v11;
v11 = __readfsqword(0x28u);
b = 0;
name = *pname;
err = 0;
if (pbundle && strchr(name, 46)) {
S = (gchar **)g_strsplit... | static int check_param_name(char **pname, GretlType *type,
gretl_bundle **pbundle) {
gretl_bundle *b = NULL;
char *name = *pname;
int err = 0;
if (pbundle != NULL && strchr(name, '.') != NULL) {
gchar **S = g_strsplit(name, ".", 2);
b = get_bundle_by_name(S[0]);
if (b... | check_param_name | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_parm_min_max(fn_param *p, const char *name, int *nvals) {
const char *v3;
int err;
err = 0;
if (p->type != 6 && fabs(p->deflt) > 1.797693134862316e308) {
v3 = gretl_type_get_name((GretlType)p->type);
gretl_errmsg_sprintf(
"%s: parameters of type %s cannot have a default value of NA", ... | static int check_parm_min_max(fn_param *p, const char *name, int *nvals) {
int err = 0;
if (p->type != GRETL_TYPE_DOUBLE && na(p->deflt)) {
gretl_errmsg_sprintf("%s: parameters of type %s cannot have a "
"default value of NA",
name, gretl_type_get_name(p->type)... | check_parm_min_max | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_permanent_option(gretlopt opt, DATASET *dset, int *n_models) {
char *v3;
char *v5;
if (gretl_function_depth() <= 0) {
if ((opt & 0x27005) != 0) {
if (!gretl_in_gui_mode())
return 0;
if ((opt & 0x20) != 0)
return 0;
*n_models = n_stacked_models();
if (*n_model... | static int check_permanent_option(gretlopt opt, DATASET *dset, int *n_models) {
if (gretl_function_depth() > 0) {
gretl_errmsg_set(_("The dataset cannot be modified at present"));
return E_DATA;
} else if (!(opt & (OPT_O | OPT_M | OPT_A | OPT_N | OPT_R | OPT_C))) {
return E_ARGS;
} else if (gretl_in... | check_permanent_option | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_plot_data_source(const char *s, const DATASET *dset) {
GretlType type;
int err;
int id;
unsigned long v6;
v6 = __readfsqword(0x28u);
err = 0;
if (plot.datatype) {
err = 2;
} else {
if (!s)
return 0;
id = current_series_index(dset, s);
if (id < 0) {
type = GRETL_TYP... | static int check_plot_data_source(const char *s, const DATASET *dset) {
int err = 0;
if (plot.datatype != 0) {
err = E_DATA;
} else if (s == NULL) {
return 0;
} else {
int id = current_series_index(dset, s);
if (id >= 0) {
plot.datatype = GRETL_TYPE_SERIES;
} else {
GretlType... | check_plot_data_source | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_plot_option(const char *s) {
const char *sa;
OptStatus status;
gretlopt opt;
int err;
char *param;
const char *p;
char *flag;
unsigned long v9;
sa = s;
v9 = __readfsqword(0x28u);
p = 0;
param = 0;
err = 0;
if (!strncmp(s, "--", 2u))
sa = s + 2;
p = strchr(sa, 61);
if (p) {... | static int check_plot_option(const char *s) {
const char *p = NULL;
char *param = NULL;
OptStatus status;
gretlopt opt;
int err = 0;
if (!strncmp(s, "--", 2)) {
s += 2;
}
#if PDEBUG
fprintf(stderr, "check_plot_option: '%s'\n", s);
#endif
if ((p = strchr(s, '=')) != NULL) {
char *flag = gre... | check_plot_option | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_prn_size(const int *list, const DATASET *dset, PRN *prn) {
int err;
int nx;
nx = *list * (dset->t2 - dset->t1 + 1);
err = 0;
if (nx > 1000)
return gretl_print_alloc(prn, 12 * nx);
return err;
} | static int check_prn_size(const int *list, const DATASET *dset, PRN *prn) {
int nx = list[0] * (dset->t2 - dset->t1 + 1);
int err = 0;
if (nx > 1000) {
err = gretl_print_alloc(prn, nx * 12);
}
return err;
} | check_prn_size | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_remote_db(const char *dbname) {
int err;
char *getbuf[2];
getbuf[1] = (char *)__readfsqword(0x28u);
getbuf[0] = 0;
err = retrieve_url(dbserver, CHECK_DB, dbname, 0, 0, 0, getbuf);
if (!err && getbuf[0])
err = strncmp(getbuf[0], "OK", 2u) != 0;
free(getbuf[0]);
if (err)
return 11;
re... | int check_remote_db(const char *dbname) {
char *getbuf = NULL;
int err;
err = retrieve_url(dbserver, CHECK_DB, dbname, NULL, NULL, 0, &getbuf);
if (!err && getbuf != NULL) {
err = strncmp(getbuf, "OK", 2) != 0;
}
free(getbuf);
if (err) {
err = E_FOPEN;
}
return err;
} | check_remote_db | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_replacement_dims(const gretl_matrix *orig, const gretl_matrix *repl,
int id) {
if (id == 2 || id == 1 || id == 4 || !id || id == 3 || id == 5 || id == 8 ||
id == 9) {
if (repl->rows != orig->rows || repl->cols != orig->cols) {
LABEL_15:
gretl_errmsg_set("You ca... | static int check_replacement_dims(const gretl_matrix *orig,
const gretl_matrix *repl, int id) {
if (id == K_H || id == K_A || id == K_R || id == K_F || id == K_Q ||
id == K_m || id == K_S || id == K_P) {
if (repl->rows != orig->rows || repl->cols != orig->cols) {
gret... | check_replacement_dims | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_restrict_options(gretlopt opt, const char *param) {
if (incompatible_options(opt, OPT_O | OPT_N | OPT_M | OPT_A) ||
incompatible_options(opt, OPT_R | OPT_N | OPT_M | OPT_A))
return 38;
if ((opt & 4) != 0 && (opt & 0xFFF7EFFB) != 0)
return 38;
if ((opt & 0x26000) == 0 || param && *param)
... | static int check_restrict_options(gretlopt opt, const char *param) {
if (incompatible_options(opt, OPT_O | OPT_M | OPT_A | OPT_N) ||
incompatible_options(opt, OPT_R | OPT_M | OPT_A | OPT_N)) {
return E_BADOPT;
}
if (opt & OPT_C) {
if ((opt & ~(OPT_C | OPT_M | OPT_T)) != OPT_NONE) {
return E_... | check_restrict_options | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_set_bool(SetKey key, const char *name, const char *arg) {
char *v4;
if (!strcmp(arg, "on") || !strcmp(arg, "1") || !strcmp(arg, "true") ||
!strcmp(arg, "TRUE"))
return libset_set_bool(key, 1);
if (!strcmp(arg, "off") || !strcmp(arg, "0") || !strcmp(arg, "false") ||
!strcmp(arg, "FALSE")... | static int check_set_bool(SetKey key, const char *name, const char *arg) {
if (boolean_on(arg)) {
return libset_set_bool(key, 1);
} else if (boolean_off(arg)) {
return libset_set_bool(key, 0);
} else {
gretl_errmsg_sprintf(_("%s: invalid value '%s'"), name, arg);
return E_PARSE;
}
} | check_set_bool | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_simul_inputs(kalman *K, const gretl_matrix *U,
const gretl_matrix *Sim0, const gretl_matrix *SimX,
int ssfsim, PRN *prn) {
int v6;
int v7;
int v8;
const gretl_matrix *x;
int err;
int ncols;
int r;
err = 0;
if (U) {
if (K->p <= 0) {
if ... | static int check_simul_inputs(kalman *K, const gretl_matrix *U,
const gretl_matrix *Sim0,
const gretl_matrix *SimX, int ssfsim, PRN *prn) {
int err = 0;
if (U == NULL) {
err = missing_matrix_error("U");
} else {
int ncols;
if (K->p > 0) {
... | check_simul_inputs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_smpl_full(gretlopt opt) {
gretlopt opta;
opta = opt ^ 0x20;
if (((opt ^ 0x20) & 0x10000) != 0)
opta = opt ^ 0x10020;
if (opta)
return 38;
else
return 0;
} | static int check_smpl_full(gretlopt opt) {
opt ^= OPT_F;
if (opt & OPT_Q) {
opt ^= OPT_Q;
}
return opt == OPT_NONE ? 0 : E_BADOPT;
} | check_smpl_full | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_spec_requirements(nlspec *spec) {
char *v1;
int err;
err = 0;
if (spec->nparam <= 0) {
v1 = gettext("No parameters have been specified");
gretl_errmsg_set(v1);
err = 1;
}
if (spec->ci == 49)
return check_gmm_requirements(spec);
return err;
} | static int check_spec_requirements(nlspec *spec) {
int err = 0;
if (spec->nparam < 1) {
gretl_errmsg_set(_("No parameters have been specified"));
err = 1;
}
if (spec->ci == GMM) {
err = check_gmm_requirements(spec);
}
return err;
} | check_spec_requirements | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_special_comments(ufunc *fun) {
int i;
for (i = 0; i < fun->n_lines; ++i) {
if (strstr(fun->lines[i].s, "## plugin-wrapper ##")) {
fun->flags |= 2u;
} else if (strstr(fun->lines[i].s, "## no-print ##")) {
fun->flags |= 4u;
} else if (strstr(fun->lines[i].s, "## menu-only ##")) {
... | static void check_special_comments(ufunc *fun) {
int i;
for (i = 0; i < fun->n_lines; i++) {
if (strstr(fun->lines[i].s, "## plugin-wrapper ##")) {
fun->flags |= UFUN_PLUGIN;
} else if (strstr(fun->lines[i].s, "## no-print ##")) {
fun->flags |= UFUN_NOPRINT;
} else if (strstr(fun->lines[i].... | check_special_comments | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_sub_object_return(fn_arg *arg, fn_param *fp) {
GretlType plain_type;
int err;
int i;
int found;
GretlType uptype;
int n;
void *orig;
void *curr;
gretl_array *updata;
plain_type = gretl_type_get_plain_type((GretlType)arg->type);
orig = arg_get_data_0(arg, plain_type);
curr = user_var_g... | static int check_sub_object_return(fn_arg *arg, fn_param *fp) {
GretlType type = gretl_type_get_plain_type(arg->type);
void *orig = arg_get_data(arg, type);
void *curr = user_var_get_value_by_name(fp->name);
int err = 0;
if (curr == NULL) {
fprintf(stderr, "sub_object return: value has disappeared!\n");
... | check_sub_object_return | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_subsample_n(int n, DATASET *dset, char **pmask, PRN *prn) {
char *v4;
char *v6;
if (n) {
if (n == dset->n) {
if (gretl_messages_on()) {
v6 = gettext("No observations were dropped!");
pputs(prn, v6);
pputc(prn, 10);
}
free(*pmask);
*pmask = 0;
}
... | static int check_subsample_n(int n, DATASET *dset, char **pmask, PRN *prn) {
if (n == 0) {
gretl_errmsg_set(_("No observations would be left!"));
return E_DATA;
} else if (n == dset->n) {
if (gretl_messages_on()) {
pputs(prn, _("No observations were dropped!"));
pputc(prn, '\n');
}
... | check_subsample_n | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_tic_labels(double vmin, double vmax, gnuplot_info *gi, char axis) {
int d;
char s1[32];
char s2[40];
unsigned long v8;
v8 = __readfsqword(0x28u);
for (d = 6; d <= 11; ++d) {
sprintf(s1, "%.*g", d, vmin);
sprintf(s2, "%.*g", d, vmax);
if (strcmp(s1, s2))
break;
}
if (d > 6) {... | static int check_tic_labels(double vmin, double vmax, gnuplot_info *gi,
char axis) {
char s1[32], s2[32];
int d, err = 0;
for (d = 6; d < 12; d++) {
sprintf(s1, "%.*g", d, vmin);
sprintf(s2, "%.*g", d, vmax);
if (strcmp(s1, s2)) {
break;
}
}
if (d > 6) {
... | check_tic_labels | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_vals(const double *test, const double *cand, int n) {
int t;
unsigned int ret;
ret = 0;
for (t = 0; t < n; ++t) {
if (test[t] != cand[t] && (fabs(test[t]) <= 1.797693134862316e308 ||
fabs(cand[t]) <= 1.797693134862316e308)) {
if (fabs(test[t]) <= 1.79769313486... | static int check_vals(const double *test, const double *cand, int n) {
int t, ret = VARS_IDENTICAL;
for (t = 0; t < n; t++) {
if (test[t] == cand[t] || (na(test[t]) && na(cand[t]))) {
continue;
}
if (na(test[t]) && !na(cand[t])) {
if (ret == VARS_IDENTICAL || ret == NEW_HAS_MISSING) {
... | check_vals | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_variable_deletion_list(int *list, const DATASET *dset) {
int pruned;
int i;
int vsave;
pruned = 0;
vsave = highest_numbered_var_in_saved_object(dset);
for (i = *list; i > 0; --i) {
if (vsave >= list[i]) {
gretl_list_delete_at_pos(list, i);
pruned = 1;
}
}
return pruned;
} | int check_variable_deletion_list(int *list, const DATASET *dset) {
int pruned = 0;
int i, vsave;
vsave = highest_numbered_var_in_saved_object(dset);
for (i = list[0]; i > 0; i--) {
if (list[i] <= vsave) {
gretl_list_delete_at_pos(list, i);
pruned = 1;
}
}
return pruned;
} | check_variable_deletion_list | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_varname(const char *varname) {
return real_check_varname(varname, 1);
} | int check_varname(const char *varname) {
return real_check_varname(varname, 1);
} | check_varname | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int check_weight_var(MODEL *pmod, const double *w, int *effobs, gretlopt opt) {
char *v4;
char *v6;
char *v7;
int ones;
int zeros;
int nobs;
int t;
int is_dummy;
ones = 0;
zeros = 0;
nobs = 0;
is_dummy = 1;
for (t = pmod->t1; t <= pmod->t2; ++t) {
if (w[t] < 0.0) {
v4 = gettext("Wei... | static int check_weight_var(MODEL *pmod, const double *w, int *effobs,
gretlopt opt) {
const char *all_zeros =
N_("Weight variable is all zeros, aborting regression");
const char *some_neg = N_("Weight variable contains negative values");
const char *bad_zeros =
N_("Weight ... | check_weight_var | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void check_y_tics(gnuplot_info *gi, const double **Z, FILE *fp) {
double ymin;
double ymax[2];
*(_QWORD *)&ymax[1] = __readfsqword(0x28u);
gi->yfmt[0] = 0;
gretl_minmax(gi->t1, gi->t2, Z[gi->list[1]], &ymin, ymax);
check_tic_labels(ymin, ymax[0], gi, 121);
if (gi->yfmt[0])
fprintf(fp, "set format y \... | static void check_y_tics(gnuplot_info *gi, const double **Z, FILE *fp) {
double ymin, ymax;
*gi->yfmt = '\0';
gretl_minmax(gi->t1, gi->t2, Z[gi->list[1]], &ymin, &ymax);
check_tic_labels(ymin, ymax, gi, 'y');
if (*gi->yfmt != '\0') {
fprintf(fp, "set format y \"%s\"\n", gi->yfmt);
}
} | check_y_tics | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int chinese_locale() {
const char *loc;
loc = setlocale(6, 0);
return loc && !strncmp(loc, "zh", 2u);
} | int chinese_locale(void) {
int ret = 0;
#ifdef WIN32
gchar *loc = g_win32_getlocale();
ret = (loc != NULL && !strncmp(loc, "zh", 2));
g_free(loc);
#elif defined(ENABLE_NLS)
char *loc = setlocale(LC_ALL, NULL);
ret = (loc != NULL && !strncmp(loc, "zh", 2));
#endif
return ret;
} | chinese_locale | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double chisq_cdf(double df_0, double x) {
double p;
p = chdtr(df_0, x);
if (get_cephes_errno() == 1)
return NAN;
return p;
} | double chisq_cdf(double df, double x) {
double p = chdtr(df, x);
if (get_cephes_errno() == CEPHES_DOMAIN) {
p = NADBL;
}
return p;
} | chisq_cdf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double chisq_cdf_comp(double df_0, double x) {
double p;
p = chdtrc(df_0, x);
if (get_cephes_errno() == 1)
return NAN;
return p;
} | double chisq_cdf_comp(double df, double x) {
double p = chdtrc(df, x);
if (get_cephes_errno() == CEPHES_DOMAIN) {
p = NADBL;
}
return p;
} | chisq_cdf_comp | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double chisq_cdf_inverse(int df_0, double a) {
double x;
x = NAN;
if (df_0 > 0 && a >= 0.0) {
x = chdtri((double)df_0, 1.0 - a);
if (get_cephes_errno())
return NAN;
}
return x;
} | static double chisq_cdf_inverse(int df, double a) {
double x = NADBL;
if (df >= 1 && a >= 0.0) {
x = chdtri(df, 1 - a);
if (get_cephes_errno()) {
x = NADBL;
}
}
return x;
} | chisq_cdf_inverse | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double chisq_critval(int df_0, double a) {
double x;
x = chdtri((double)df_0, a);
if (get_cephes_errno() == 1)
return NAN;
return x;
} | static double chisq_critval(int df, double a) {
double x = chdtri(df, a);
if (get_cephes_errno() == CEPHES_DOMAIN) {
x = NADBL;
}
return x;
} | chisq_critval | 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.