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
gretl_matrix *import_csv_as_matrix(const char *fname, int *err) { int http; gretlopt opt; gretl_matrix *m; PRN *prn; char csvname[512]; char fullname[4104]; unsigned long v9; v9 = __readfsqword(0x28u); prn = 0; m = 0; memset(csvname, 0, sizeof(csvname)); opt = OPT_A; http = 0; *err = try_ht...
gretl_matrix *import_csv_as_matrix(const char *fname, int *err) { #if CDEBUG PRN *prn = gretl_print_new(GRETL_PRINT_STDERR, NULL); #else PRN *prn = NULL; #endif gretl_matrix *m = NULL; char csvname[MAXLEN] = {0}; gretlopt opt = OPT_A; int http = 0; *err = try_http(fname, csvname, &http); if (!*err && ...
import_csv_as_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void import_na_init() { const char *s; s = get_csv_na_read_string(); strcpy(import_na, s); }
void import_na_init(void) { const char *s = get_csv_na_read_string(); strcpy(import_na, s); }
import_na_init
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int import_na_string(const char *s) { int i; const char *defaults[15]; unsigned long v4; v4 = __readfsqword(0x28u); if (import_na[0] && strcmp(import_na, "default")) return strcmp(s, import_na) == 0; defaults[0] = "NA"; defaults[1] = "N.A."; defaults[2] = "n.a."; defaults[3] = "na"; defaults[4]...
int import_na_string(const char *s) { if (*import_na != '\0' && strcmp(import_na, "default")) { return !strcmp(s, import_na); } else { const char *defaults[] = {"NA", "N.A.", "n.a.", "na", "n/a", "N/A", "#N/A", "NaN", ".NaN", ".", "..", "-...
import_na_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int import_obs_label(const char *s) { const char *sa; char tmp[40]; unsigned long v4; sa = s; v4 = __readfsqword(0x28u); if (!s) return 1; if (!strcmp(s, "\"\"") || !strcmp(s, "''")) return 1; if (*s == 34 || *s == 39) sa = s + 1; if (!*sa) return 1; if (strlen(sa) > 0x1F) retur...
int import_obs_label(const char *s) { char tmp[VNAMELEN]; if (s == NULL) { return 1; } if (!strcmp(s, "\"\"") || !strcmp(s, "''")) { return 1; } if (*s == '"' || *s == '\'') s++; if (*s == '\0') { return 1; } if (strlen(s) > VNAMELEN - 1) { return 0; } *tmp = '\0'; strn...
import_obs_label
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int import_octave(const char *fname, DATASET *dset, gretlopt opt, PRN *prn) { char *v5; char *v6; unsigned int v7; unsigned int v8; char *v9; char *v10; char *v11; char *v12; char *v13; int v14; char *v15; int brows; int bcols; int nrows; int ncols; int nblocks; int oldbcols; int got...
static int import_octave(const char *fname, DATASET *dset, gretlopt opt, PRN *prn) { DATASET *octset = NULL; FILE *fp = NULL; char *line = NULL; char tmp[8], fmt[16], name[32]; int nrows = 0, ncols = 0, nblocks = 0; int brows = 0, bcols = 0, oldbcols = 0; int maxlen, got_type = 0,...
import_octave
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int import_other(const char *fname, GretlFileType ftype, DATASET *dset, gretlopt opt, PRN *prn) { char *v5; char *v7; int (*importer)(const char *, DATASET *, gretlopt, PRN *); FILE *fp; fp = gretl_fopen(fname, "r"); if (fp) { fclose(fp); switch (ftype) { case GRETL_OCTAVE: ...
int import_other(const char *fname, GretlFileType ftype, DATASET *dset, gretlopt opt, PRN *prn) { FILE *fp; int (*importer)(const char *, DATASET *, gretlopt, PRN *); int err = 0; fp = gretl_fopen(fname, "r"); if (fp == NULL) { pprintf(prn, _("Couldn't open %s\n"), fname); err = E_FO...
import_other
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int import_spreadsheet(const char *fname, GretlFileType ftype, int *list, char *sheetname, DATASET *dset, gretlopt opt, PRN *prn) { char *v7; char *v8; int err; int (*importer)(const char *, int *, char *, DATASET *, gretlopt, PRN *); FILE *fp; gchar *thisdir; import_na_init(); f...
int import_spreadsheet(const char *fname, GretlFileType ftype, int *list, char *sheetname, DATASET *dset, gretlopt opt, PRN *prn) { FILE *fp; int (*importer)(const char *, int *, char *, DATASET *, gretlopt, PRN *); int err = 0; import_na_init(); fp = gretl_fopen(fname, "r"); if (f...
import_spreadsheet
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void impose_model_smpl(const MODEL *pmod, DATASET *dset) { dset->t1 = pmod->smpl.t1; dset->t2 = pmod->smpl.t2; }
void impose_model_smpl(const MODEL *pmod, DATASET *dset) { dset->t1 = pmod->smpl.t1; dset->t2 = pmod->smpl.t2; #if MDEBUG fprintf(stderr, "impose_model_smpl: set t1=%d, t2=%d\n", dset->t1, dset->t2); #endif }
impose_model_smpl
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in7_get_obs(int y0, int p0, int y1, int p1, SERIESINFO *sinfo) { int err; int n; n = sinfo->pd * (y1 - y0 + 1) - (p0 - 1) - (sinfo->pd - p1); err = 0; if (n <= 0) return 1; sinfo->nobs = n; sinfo->t2 = n - 1; return err; }
static int in7_get_obs(int y0, int p0, int y1, int p1, SERIESINFO *sinfo) { int pd = sinfo->pd; int n = (y1 - y0 + 1) * pd - (p0 - 1) - (pd - p1); int err = 0; if (n <= 0) { err = 1; } else { sinfo->nobs = n; sinfo->t2 = n - 1; } return err; }
in7_get_obs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in7_to_sinfo(const char *varname, const char *comment, int y0, int p0, int y1, int p1, int pd, int offset, SERIESINFO *sinfo) { char *v9; int err; err = 0; switch (pd) { case 4: sprintf(sinfo->stobs, "%d.%d", y0, p0); sprintf(sinfo->endobs, "%d.%d", y1, p1); break; case 12:...
static int in7_to_sinfo(const char *varname, const char *comment, int y0, int p0, int y1, int p1, int pd, int offset, SERIESINFO *sinfo) { int err = 0; if (pd == 4) { sprintf(sinfo->stobs, "%d.%d", y0, p0); sprintf(sinfo->endobs, "%d.%d", y1, p1); } else if...
in7_to_sinfo
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in_gretl_list(const int *list, int k) { int i; if (list) { for (i = 1; i <= *list; ++i) { if (k == list[i]) return i; } } return 0; }
int in_gretl_list(const int *list, int k) { int i; if (list != NULL) { for (i = 1; i <= list[0]; i++) { if (list[i] == k) { return i; } } } return 0; }
in_gretl_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in_ivreg_list(const int *list, int v, gretlopt opt) { int i; int imin; int imax; int pos; pos = gretl_list_separator_position(list); if (!pos) return 0; if ((opt & 0x80000) != 0) { imin = pos + 1; imax = *list; } else { imin = 2; if ((opt & 2) != 0) imax = *list; else ...
static int in_ivreg_list(const int *list, int v, gretlopt opt) { int pos = gretl_list_separator_position(list); int i, imin, imax; if (pos == 0) { return 0; } if (opt & OPT_T) { imin = pos + 1; imax = list[0]; } else if (opt & OPT_B) { imin = 2; imax = list[0]; } else { imin = 2;...
in_ivreg_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *in_list_node(NODE *l, NODE *r, parser *p) { int k; NODE *ret; int *list; ret = get_aux_node(p, 54, 0, 0); if (!p->err && (!p->dset || !p->dset->v)) p->err = 42; if (ret) { if ((p->flags & 2) != 0) { list = node_get_list(l, p); if (list) { k = -1; if (r->t == 55 && ...
static NODE *in_list_node(NODE *l, NODE *r, parser *p) { NODE *ret = aux_scalar_node(p); if (p->err == 0 && (p->dset == NULL || p->dset->v == 0)) { p->err = E_NODATA; } if (ret != NULL && starting(p)) { int *list = node_get_list(l, p); if (list != NULL) { int k = -1; if (useries_node...
in_list_node
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in_midas_list(int ID, const DATASET *dset, char *listname) { int i; int ret; int level; int *list; level = gretl_function_depth(); ret = 0; for (i = 0; i < n_vars_0 && !ret; ++i) { if (uvars[i]->type == GRETL_TYPE_LIST && level == uvars[i]->level) { list = (int *)uvars[i]->ptr; if (*l...
int in_midas_list(int ID, const DATASET *dset, char *listname) { int level = gretl_function_depth(); int *list; int i, ret = 0; for (i = 0; i < n_vars && !ret; i++) { if (uvars[i]->type == GRETL_TYPE_LIST && uvars[i]->level == level) { list = uvars[i]->ptr; if (list[0] > 2 && in_gretl_list(list...
in_midas_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in_string_table(gretl_string_table *gst, int id) { if (gst) return in_gretl_list(gst->cols_list, id); else return 0; }
int in_string_table(gretl_string_table *gst, int id) { if (gst != NULL) { return in_gretl_list(gst->cols_list, id); } else { return 0; } }
in_string_table
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int in_usa() { tm t; char test[12]; unsigned long v3; v3 = __readfsqword(0x28u); if (ustime_0 < 0) { *(_QWORD *)&t.tm_sec = 0; *(_QWORD *)&t.tm_hour = 0x1F00000000LL; *(_QWORD *)&t.tm_mon = 0x6400000000LL; memset(&t.tm_wday, 0, 32); strftime(test, 0xCu, "%x", &t); ustime_0 = strncmp(t...
int in_usa(void) { static int ustime = -1; if (ustime < 0) { char test[12]; struct tm t = {0}; t.tm_year = 100; t.tm_mon = 0; t.tm_mday = 31; strftime(test, sizeof test, "%x", &t); if (!strncmp(test, "01/31", 5)) { ustime = 1; } else { ustime = 0; } } return ...
in_usa
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int inapplicable_option_error(int ci, gretlopt opt) { char *v2; const char *s; s = print_flags(opt, ci); v2 = gettext("%s: inapplicable option"); gretl_errmsg_sprintf(v2, s); return 38; }
int inapplicable_option_error(int ci, gretlopt opt) { const char *s = print_flags(opt, ci); gretl_errmsg_sprintf(_("%s: inapplicable option"), s); return E_BADOPT; }
inapplicable_option_error
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double incbcf(double a, double b, double x) { int n; double pkm1; double pkm1a; double pkm2; double pkm2a; double qkm1; double qkm1a; double qkm2; double qkm2a; double k1_0; double k2_0; double k3_0; double k4_0; double k5_0; double k6_0; double k7_0; double k8; double r; double t;...
static double incbcf(double a, double b, double x) { double xk, pk, pkm1, pkm2, qk, qkm1, qkm2; double k1, k2, k3, k4, k5, k6, k7, k8; double r, t, ans, thresh; int n; k1 = a; k2 = a + b; k3 = a; k4 = a + 1.0; k5 = 1.0; k6 = b - 1.0; k7 = k4; k8 = a + 2.0; pkm2 = 0.0; qkm2 = 1.0; pkm1 = ...
incbcf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double incbd(double a, double b, double x) { int n; double pkm1; double pkm1a; double pkm2; double pkm2a; double qkm1; double qkm1a; double qkm2; double qkm2a; double k1_0; double k2_0; double k3_0; double k4_0; double k5_0; double k6_0; double k7_0; double k8; double r; double t; ...
static double incbd(double a, double b, double x) { double xk, pk, pkm1, pkm2, qk, qkm1, qkm2; double k1, k2, k3, k4, k5, k6, k7, k8; double r, t, ans, z, thresh; int n; k1 = a; k2 = b - 1.0; k3 = a; k4 = a + 1.0; k5 = 1.0; k6 = a + b; k7 = a + 1.0; ; k8 = a + 2.0; pkm2 = 0.0; qkm2 = 1.0...
incbd
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double incbet(double aa, double bb, double xx) { double v4; double v5; double v6; double v7; int flag; double a; double b; double t; double ta; double tb; double tc; double x; double xc; double w; double y; double yb; double ya; if (aa <= 0.0 || bb <= 0.0) { domerr: mtherr("in...
double incbet(double aa, double bb, double xx) { double a, b, t, x, xc, w, y; int flag; if (aa <= 0.0 || bb <= 0.0) { goto domerr; } if (xx <= 0.0 || xx >= 1.0) { if (xx == 0.0) { return 0.0; } if (xx == 1.0) { return 1.0; } domerr: mtherr("incbet", CEPHES_DOMAIN); ...
incbet
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double incbi(double aa, double bb, double yy0) { double v4; double v5; double v6; double v7; double v8; int i; int ia; int rflg; int dir; int nflg; double a; double b; double y0; double y; double x; double xa; double x0; double x1; double yp; double di_0; double dithresh; dou...
double incbi(double aa, double bb, double yy0) { double a, b, y0, d, y, x, x0, x1, lgm, yp, di, dithresh, yl, yh, xt; int i, rflg, dir, nflg; i = 0; if (yy0 <= 0) return 0.0; if (yy0 >= 1.0) return 1.0; x0 = 0.0; yl = 0.0; x1 = 1.0; yh = 1.0; nflg = 0; if (aa <= 1.0 || bb <= 1.0) { ...
incbi
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int include_gfn(const char *fname, gretlopt opt, PRN *prn) { int err; gchar *pkgname; gchar *p; GArray *pstack; unsigned long v9; v9 = __readfsqword(0x28u); pkgname = (gchar *)g_path_get_basename(fname); p = strrchr(pkgname, 46); if (p) *p = 0; pstack = (GArray *)g_array_new(0, 0, 8); g_array...
int include_gfn(const char *fname, gretlopt opt, PRN *prn) { GArray *pstack; gchar *p, *pkgname; int err; pkgname = g_path_get_basename(fname); p = strrchr(pkgname, '.'); if (p != NULL) { *p = '\0'; } pstack = g_array_new(FALSE, FALSE, sizeof(char *)); g_array_append_val(pstack, pkgname); err ...
include_gfn
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int incompatible_options(gretlopt opt, gretlopt test) { int optcount; gretlopt o; optcount = 0; for (o = OPT_A; (unsigned int)o <= OPT_Z; o *= 2) { if ((o & opt) != 0 && (o & test) != 0 && ++optcount > 1) return 38; } return 0; }
int incompatible_options(gretlopt opt, gretlopt test) { int optcount = 0; gretlopt o; for (o = OPT_A; o <= OPT_Z; o = o << 1) { if ((opt & o) && (test & o)) { optcount++; if (optcount > 1) { return E_BADOPT; } } } return 0; }
incompatible_options
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int index_get_limit(LOOPSET *loop, controller *clr, const char *s, DATASET *dset) { char *v4; size_t v5; const char *sa; int err; sa = s; err = 0; if (integer_string(s)) { clr->val = (double)atoi(sa); } else { if (*sa == 45) { clr->vsign = -1; ++sa; } if ...
static int index_get_limit(LOOPSET *loop, controller *clr, const char *s, DATASET *dset) { int v, err = 0; if (integer_string(s)) { clr->val = atoi(s); } else { if (*s == '-') { clr->vsign = -1; s++; } if (gretl_is_scalar(s)) { *clr->vname = '\0'; ...
index_get_limit
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int inf_check(double val, const gretl_matrix *theta, const char *context, int *err) { if (fabs(val) <= 1.797693134862316e308) *__errno_location() = 0; else *err = 35; return *err; }
static int inf_check(double val, const gretl_matrix *theta, const char *context, int *err) { if (isinf(val)) { #if INF_CHECK_VERBOSE fprintf(stderr, "range error in %s\n", context); gretl_matrix_print(theta, "theta"); #endif *err = E_NAN; } else { errno = 0; } return *err;...
inf_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int init_VECM_dataset(irfboot *b, GRETL_VAR *var, const DATASET *dset) { int nv; int i; int ia; int j; int t; int ta; int vi; int via; nv = var->neqns + 1; if (var->rlist) nv += *var->rlist; b->dset = create_auxiliary_dataset(nv, dset->n, OPT_NONE); if (!b->dset) return 12; copy_datas...
static int init_VECM_dataset(irfboot *b, GRETL_VAR *var, const DATASET *dset) { int nv = var->neqns + 1; int i, j, vi, t; if (var->rlist != NULL) { nv += var->rlist[0]; } b->dset = create_auxiliary_dataset(nv, dset->n, 0); if (b->dset == NULL) { return E_ALLOC; } copy_dataset_obs_info(b->dset...
init_VECM_dataset
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void init_datainfo_from_sinfo(DATASET *dset, SERIESINFO *sinfo) { dset->pd = sinfo->pd; strcpy(dset->stobs, sinfo->stobs); strcpy(dset->endobs, sinfo->endobs); colonize_obs(dset->stobs); colonize_obs(dset->endobs); dset->sd0 = get_date_x(dset->pd, dset->stobs); dset->n = sinfo->nobs; dset->v = 2; dset...
static void init_datainfo_from_sinfo(DATASET *dset, SERIESINFO *sinfo) { dset->pd = sinfo->pd; strcpy(dset->stobs, sinfo->stobs); strcpy(dset->endobs, sinfo->endobs); colonize_obs(dset->stobs); colonize_obs(dset->endobs); dset->sd0 = get_date_x(dset->pd, dset->stobs); dset->n = sinfo->nobs; dset->v = ...
init_datainfo_from_sinfo
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
mt_struct *init_mt_search(check32_t *ck, prescr_t *pre, int w, int p) { int m; int n; int r; mt_struct *mts; if (w <= 32 && w > 30) { if (proper_mersenne_exponent(p)) { n = p / w + 1; mts = alloc_mt_struct(n); if (mts) { m = n / 2; if (n / 2 <= 1) m = p / w; ...
static mt_struct *init_mt_search(check32_t *ck, prescr_t *pre, int w, int p) { int n, m, r; mt_struct *mts; if (w > 32 || w < 31) { printf("Sorry, currently only w = 32 or 31 is allowed.\n"); return NULL; } if (!proper_mersenne_exponent(p)) { if (p < 521) { printf("\"p\" is too small.\n");...
init_mt_search
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void init_tempering(eqdeg_t *eq, mt_struct *mts) { int i; int ia; eq->mmm = mts->mm; eq->nnn = mts->nn; eq->rrr = mts->rr; eq->www = mts->ww; eq->shift_0 = 12; eq->shift_1 = 18; eq->shift_s = 7; eq->shift_t = 15; eq->ggap = 32 - eq->www; eq->aaa[0] = 0; eq->aaa[1] = mts->aaa << eq->ggap; fo...
static void init_tempering(eqdeg_t *eq, mt_struct *mts) { int i; eq->mmm = mts->mm; eq->nnn = mts->nn; eq->rrr = mts->rr; eq->www = mts->ww; eq->shift_0 = S00; eq->shift_1 = S01; eq->shift_s = SSS; eq->shift_t = TTT; eq->ggap = WORD_LEN - eq->www; eq->aaa[0] = 0; eq->aaa[1] = (mts->aaa) << eq-...
init_tempering
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int initial_midas_check(int nvars, int any_wild, int pd, DATASET *dset) { int v4; char *v5; int err; if (!pd || pd == 12 || pd == 4 || pd == 5 || pd == 6 || pd == 7) { if (nvars == 1 && (dset && dset->structure == 1 && dset->pd == 1 || dset && dset->structure == 1 && (dset->pd == 4 || dset...
static int initial_midas_check(int nvars, int any_wild, int pd, DATASET *dset) { int err; if (pd != 0 && pd != 12 && pd != 4 && pd != 5 && pd != 6 && pd != 7) { err = E_PDWRONG; } else if (nvars == 1 && (annual_data(dset) || quarterly_or_monthly(dset))) { err = any_wild ? E_DATA : 0; } else { err...
initial_midas_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int initialize_dotdir() { int err; const char *dirname; paths.dotdir[0] = 0; dirname = getenv("HOME"); if (dirname) sprintf(paths.dotdir, "%s/.gretl/", dirname); err = validate_writedir(paths.dotdir); if (!err) return set_extra_dot_paths(); paths.x12adir[0] = 0; paths.tramodir[0] = 0; retur...
static int initialize_dotdir(void) { char *dirname; int err = 0; *paths.dotdir = '\0'; #ifdef WIN32 dirname = appdata_path(); if (dirname != NULL) { sprintf(paths.dotdir, "%s\\gretl\\", dirname); free(dirname); } else { sprintf(paths.dotdir, "%s\\user\\", paths.gretldir); } #else dirname =...
initialize_dotdir
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void initialize_gretldir(char *dirname, gretlopt opt) { const char *ghome; ghome = getenv("GRETL_HOME"); if (ghome) { strcpy(paths.gretldir, ghome); slash_terminate(paths.gretldir); } else if (dirname && *dirname && !paths.gretldir[0]) { strcpy(paths.gretldir, dirname); slash_terminate(paths.gr...
static void initialize_gretldir(char *dirname, gretlopt opt) { char *ghome = getenv("GRETL_HOME"); int err = 0; if (ghome != NULL) { strcpy(paths.gretldir, ghome); slash_terminate(paths.gretldir); } else if (dirname != NULL && *dirname != '\0' && *paths.gretldir == '\0') { strcpy(paths.gretldir, ...
initialize_gretldir
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void initpx(int n, char *pp) { int i; *pp = 124; for (i = 1; i <= n; ++i) pp[i] = 32; pp[n + 1] = 10; }
static void initpx(int n, char *pp) { int i; pp[0] = '|'; for (i = 1; i <= n; i++) { pp[i] = ' '; } pp[n + 1] = '\n'; }
initpx
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void inject_gp_style(int offset, FILE *fp) { gchar *v2; const char *v3; char *sub; const char *sty; char targ[40]; unsigned long v7; v7 = __readfsqword(0x28u); if (alt_sty) v2 = alt_sty; else v2 = (gchar *)classic_sty; sty = v2; sub = 0; if (offset > 0) { sprintf(targ, "set linetype...
static void inject_gp_style(int offset, FILE *fp) { const char *sty = alt_sty != NULL ? alt_sty : classic_sty; const char *sub = NULL; if (offset > 0) { char targ[32]; sprintf(targ, "set linetype %d", offset + 1); sub = strstr(sty, targ); } fputs(sub != NULL ? sub : sty, fp); }
inject_gp_style
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int inline_map_data(const char *datfile, FILE *fp) { char *v2; FILE *fsrc; size_t n; char buf[8192]; unsigned long v7; v7 = __readfsqword(0x28u); fsrc = gretl_fopen(datfile, "rb"); if (fsrc) { fwrite("$MapData << EOD\n", 1u, 0x10u, fp); while (1) { n = fread(buf, 1u, 0x2000u, fsrc); ...
static int inline_map_data(const char *datfile, FILE *fp) { char buf[8192]; FILE *fsrc; size_t n; fsrc = gretl_fopen(datfile, "rb"); if (fsrc == NULL) { gretl_errmsg_sprintf(_("Couldn't open %s"), datfile); return E_FOPEN; } fputs("$MapData << EOD\n", fp); while ((n = fread(buf, 1, sizeof buf,...
inline_map_data
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int input_matrix_slot(const char *s) { int i; for (i = 0; i <= 9; ++i) { if (!strcmp(s, K_input_mats[i].name)) return K_input_mats[i].sym; } return -1; }
static int input_matrix_slot(const char *s) { int i; for (i = 0; i < K_MMAX; i++) { if (!strcmp(s, K_input_mats[i].name)) { return K_input_mats[i].sym; } } return -1; }
input_matrix_slot
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void inscribe_lag(gretl_matrix *targ, const gretl_matrix *src, int h, int inicol) { int j; int t; for (j = 0; j < src->cols; ++j) { for (t = h; t < targ->rows; ++t) targ->val[inicol * targ->rows + t] = src->val[j * src->rows + t - h]; ++inicol; } }
static void inscribe_lag(gretl_matrix *targ, const gretl_matrix *src, int h, int inicol) { double xij; int j, t, k = inicol; for (j = 0; j < src->cols; j++) { for (t = h; t < targ->rows; t++) { xij = gretl_matrix_get(src, t - h, j); gretl_matrix_set(targ, t, k, xij); ...
inscribe_lag
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int insert_missing_hidden_obs(DATASET *dset, int nmiss) { int v3; int v5; int i; int s; int sa; int t; int ta; int skip; int err; int oldn; double **Z; double *tmp; oldn = dset->n; err = dataset_add_observations(dset, nmiss, OPT_NONE); if (err) return err; Z = dset->Z; tmp = *Z; ...
static int insert_missing_hidden_obs(DATASET *dset, int nmiss) { int oldn = dset->n; double *tmp, **Z; int i, s, t, skip; int err = 0; err = dataset_add_observations(dset, nmiss, OPT_NONE); if (err) { return err; } #if DB_DEBUG fprintf(stderr, "daily data: expanded n from %d to %d\n", oldn, dset->...
insert_missing_hidden_obs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int insert_obs(int n, DATASET *dset, PRN *prn) { char *v3; if (complex_subsampled()) { v3 = gettext("The data set is currently sub-sampled.\n"); pprintf(prn, v3); return 2; } else if (dset && dset->structure == 2) { return 10; } else if (n > 0 && n <= dset->n) { return real_insert_observati...
static int insert_obs(int n, DATASET *dset, PRN *prn) { int err = 0; if (complex_subsampled()) { pprintf(prn, _("The data set is currently sub-sampled.\n")); err = E_DATA; } else if (dataset_is_panel(dset)) { err = E_PDWRONG; } else if (n <= 0 || n > dset->n) { err = E_DATA; } else { err ...
insert_obs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int install_function_override(const char *funname, const char *pkgname, gpointer data) { gchar *key; if (funname) { if (!oht) oht = (GHashTable *)g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, 0); if (oht) { ...
int install_function_override(const char *funname, const char *pkgname, gpointer data) { if (funname == NULL) { if (oht != NULL) { g_hash_table_destroy(oht); oht = NULL; } return 0; } if (oht == NULL) { oht = g_hash_table_new_full(g_str_hash, g_str_equal...
install_function_override
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *int_to_string_func(NODE *n, int f, parser *p) { int i; NODE *ret; gretl_matrix *v; ret = 0; if ((p->flags & 2) == 0) return get_aux_node(p, 0, 0, 0); v = 0; i = 0; if (n->t == 54 || n->t == 57 && n->v.str && !*((_DWORD *)n->v.str + 6) && *n->v.ivec == 1 && *((_DWORD *)...
static NODE *int_to_string_func(NODE *n, int f, parser *p) { NODE *ret = NULL; if (starting(p)) { gretl_matrix *v = NULL; int i = 0; if (scalar_node(n)) { i = node_get_int(n, p); } else if (n->t == SERIES && f == F_VARNAME) { i = n->vnum; } else if (n->t == MAT && f == F_OBSLABEL) ...
int_to_string_func
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int integer_length(int k) { double v1; int len; double x; x = (double)k; len = 0; if ((double)k < 0.0) { x = fabs(x); len = 1; } if (x < 10.0) return len + 1; v1 = log(x); return (k % 10 == 0) + (int)ceil(v1 / 2.302585092994046) + len; }
static int integer_length(int k) { double x = k; int len = 0; if (x < 0) { x = fabs(x); len = 1; } if (x < 10) { len += 1; } else { len += (int)ceil(log(x) / LN_10); len += (k % 10 == 0); } return len; }
integer_length
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int integrated_fcast(Forecast *fc, const MODEL *pmod, int yno, const DATASET *dset) { double *v4; int dyn_start; int i; int t; int ta; _BOOL4 miss; int s; double s2; double yht; double xval; s2 = NAN; yht = 0.0; if (fc->method) { if (fc->method == 1) dyn_start =...
static int integrated_fcast(Forecast *fc, const MODEL *pmod, int yno, const DATASET *dset) { double s2 = NADBL; int dyn_start; double xval, yht = 0.0; int i, vi, t; if (fc->method == FC_STATIC) { dyn_start = dset->n; } else if (fc->method == FC_DYNAMIC) { dyn_start = fc-...
integrated_fcast
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int intercept_nan_as_name(const char *s) { int result; char screen[4]; unsigned long v3; v3 = __readfsqword(0x28u); result = 0; if (strlen(s) == 3) { strcpy(screen, s); gretl_lower(screen); if (!strcmp(screen, "nan")) return 1; } return result; }
static int intercept_nan_as_name(const char *s) { if (strlen(s) == 3) { char screen[4]; strcpy(screen, s); gretl_lower(screen); if (!strcmp(screen, "nan")) { return 1; } } return 0; }
intercept_nan_as_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
MODEL *interval_model(MODEL *__return_ptr retstr, int *list, DATASET *dset, gretlopt opt, PRN *prn) { _BYTE v6[376]; PRN *prna; gretlopt opta; DATASET *dseta; int *lista; MODEL *v11; MODEL (*interval_estimate)(int *, DATASET *, gretlopt, PRN *); MODEL intmod; unsigned long v14; ...
MODEL interval_model(int *list, DATASET *dset, gretlopt opt, PRN *prn) { MODEL intmod; MODEL (*interval_estimate)(int *, DATASET *, gretlopt, PRN *); gretl_error_clear(); interval_estimate = get_plugin_function("interval_estimate"); if (interval_estimate == NULL) { gretl_model_init(&intmod, dset); ...
interval_model
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int invalid_field_error(const char *s) { char *v1; v1 = gettext("field '%s' in command is invalid"); gretl_errmsg_sprintf(v1, s); return 2; }
int invalid_field_error(const char *s) { gretl_errmsg_sprintf(_("field '%s' in command is invalid"), s); return E_DATA; }
invalid_field_error
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int invalid_stobs(const char *s) { char *v1; v1 = gettext("starting obs '%s' is invalid"); gretl_errmsg_sprintf(v1, s); return 2; }
static int invalid_stobs(const char *s) { gretl_errmsg_sprintf(_("starting obs '%s' is invalid"), s); return E_DATA; }
invalid_stobs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int inverse_compare_strings(const void *a, const void *b) { long v2; long v3; long v4; return -g_strcmp0(*(_QWORD *)a, *(_QWORD *)b, *(_QWORD *)b, v2, v3, v4, b); }
static int inverse_compare_strings(const void *a, const void *b) { const char **sa = (const char **)a; const char **sb = (const char **)b; return -g_strcmp0(*sa, *sb); }
inverse_compare_strings
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int inverse_compare_values(const void *a, const void *b) { int ret; ret = unstable_comp(*(double *)b, *(double *)a); if (!ret) { if ((_BYTE *)a - (_BYTE *)b <= 0) return -1; else return 1; } return ret; }
static int inverse_compare_values(const void *a, const void *b) { const double *da = (const double *)a; const double *db = (const double *)b; int ret = unstable_comp(*db, *da); if (ret == 0) { ret = a - b > 0 ? 1 : -1; } return ret; }
inverse_compare_values
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *inverse_wishart_matrix(const gretl_matrix *S, int v, int *err) { gretl_matrix *B; gretl_matrix *W; double *Z; gretl_matrix *C; unsigned long v9; v9 = __readfsqword(0x28u); B = 0; W = 0; Z = 0; if (S && S->cols == S->rows && v >= S->rows) { *err = 0; C = cholesky_factor_of_inve...
gretl_matrix *inverse_wishart_matrix(const gretl_matrix *S, int v, int *err) { gretl_matrix *C, *B = NULL, *W = NULL; double *Z = NULL; if (S == NULL || S->cols != S->rows || v < S->rows) { *err = E_INVARG; return NULL; } *err = 0; C = cholesky_factor_of_inverse(S, err); if (!*err) { *err ...
inverse_wishart_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *inverse_wishart_sequence(const gretl_matrix *S, int v, int replics, int *err) { int k; int np; gretl_matrix *B; gretl_matrix *W; double *Z; gretl_matrix *Seq; gretl_matrix *C; unsigned long v14; v14 = __readfsqword(0x28u); B = 0; W = 0; Seq =...
gretl_matrix *inverse_wishart_sequence(const gretl_matrix *S, int v, int replics, int *err) { gretl_matrix *C, *B = NULL, *W = NULL; gretl_matrix *Seq = NULL; double *Z = NULL; int k, np = 0; if (S == NULL || S->cols != S->rows || v < S->rows) { *err = E_INVARG; ...
inverse_wishart_sequence
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int invgenr(int v, DATASET *dset) { return get_transform(148, v, 0, 0.0, dset, 29, dset->v, 0); }
int invgenr(int v, DATASET *dset) { return get_transform(INVERSE, v, 0, 0.0, dset, VNAMELEN - 3, dset->v, NULL); }
invgenr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double invmills(double x) { double v2; long xb; double a; double aa; double a1; double a2; double b1; double b2; double r; double ra; double s; double sa; double t; double ta; double ret; double a0; double b0; double b; if (x == 0.0) return 0.7978845608028653; if (x < -22.9)...
double invmills(double x) { double a, a0, a1, a2; double b, b0, b1, b2; double r, s, t, d; double ret; if (x == 0.0) { return 1.0 / SQRT_HALF_PI; } if (x < MILLS_BOTTOM) { return 0; } if (x > MILLS_TOP) { a0 = 1.0 / (x * x); a1 = 1.0 - 9.0 * a0 * (1.0 - 11.0 * a0); a2 = 1.0 - 5....
invmills
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void irf_boot_free(irfboot *b) { if (b) { gretl_matrix_block_destroy(b->MB); gretl_matrix_free(b->Xt); gretl_matrix_free(b->Yt); gretl_matrix_free(b->Et); gretl_matrix_free(b->C0); if (b->dset) destroy_dataset(b->dset); if (b->aresp) gretl_array_destroy(b->aresp); free(b->s...
static void irf_boot_free(irfboot *b) { if (b == NULL) { return; } gretl_matrix_block_destroy(b->MB); gretl_matrix_free(b->Xt); gretl_matrix_free(b->Yt); gretl_matrix_free(b->Et); gretl_matrix_free(b->C0); if (b->dset != NULL) { destroy_dataset(b->dset); } if (b->aresp != NULL) { gre...
irf_boot_free
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
irfboot *irf_boot_new(const GRETL_VAR *var, int periods, int nresp) { int ncoeff; int neqns; int rank; irfboot *b; b = (irfboot *)malloc(0x78u); if (!b) return 0; b->MB = 0; b->Xt = 0; b->Yt = 0; b->Et = 0; b->C0 = 0; b->sample = 0; b->dset = 0; b->nresp = nresp; b->resp = 0; b->are...
static irfboot *irf_boot_new(const GRETL_VAR *var, int periods, int nresp) { irfboot *b; int err = 0; b = malloc(sizeof *b); if (b == NULL) { return NULL; } b->MB = NULL; b->Xt = NULL; b->Yt = NULL; b->Et = NULL; b->C0 = NULL; b->sample = NULL; b->dset = NULL; b->nresp = nresp; b->res...
irf_boot_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int irf_boot_quantiles(irfboot *b, gretl_matrix *R, double alpha, gretl_matrix *point) { int i; int ia; int j; int Rcol; int nr; int ilo; int ihi; double *ri; double r0; double r0a; gretl_matrix *resp; nr = b->iters + 1; ri = (double *)malloc(8LL * nr); if (!ri) r...
static int irf_boot_quantiles(irfboot *b, gretl_matrix *R, double alpha, gretl_matrix *point) { double r0, *ri; int nr = b->iters + 1; int i, ilo, ihi; ri = malloc(nr * sizeof *ri); if (ri == NULL) { return E_ALLOC; } #if BDEBUG ilo = 1; ihi = b->iters; fprintf(stde...
irf_boot_quantiles
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *irf_bootstrap(GRETL_VAR *var, int targ, int shock, int periods, double alpha, gretl_matrix *point, const DATASET *dset, int *err) { int v9; int scount; int nresp; int iter; gretl_matrix *R; GRETL_VAR *vbak; irfboot *boot; scount = 0;...
gretl_matrix *irf_bootstrap(GRETL_VAR *var, int targ, int shock, int periods, double alpha, gretl_matrix *point, const DATASET *dset, int *err) { gretl_matrix *R = NULL; GRETL_VAR *vbak = NULL; irfboot *boot = NULL; int scount = 0; int nresp = 1; int i...
irf_bootstrap
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int irf_fatal(int err, irfboot *b, int iter, int scount) { return err != 3 || !iter || (double)scount / (double)b->iters > 0.1; }
static int irf_fatal(int err, irfboot *b, int iter, int scount) { if (err != E_SINGULAR || iter == 0) { return 1; } else if ((scount / (double)b->iters) > MAXSING) { return 1; } else { return 0; } }
irf_fatal
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void irf_resample_resids(irfboot *b, const GRETL_VAR *vbak) { int i; int t; int ta; for (t = 0; t < vbak->T; ++t) b->sample[t] = gretl_rand_int_max(vbak->T); for (i = 0; i < vbak->neqns; ++i) { for (ta = 0; ta < vbak->T; ++ta) b->rE->val[i * b->rE->rows + ta] = vbak->E->val[i * vbak->...
static void irf_resample_resids(irfboot *b, const GRETL_VAR *vbak) { double eti; int i, t; #if BDEBUG > 1 gretl_matrix_copy_values(b->rE, vbak->E); return; #endif for (t = 0; t < vbak->T; t++) { b->sample[t] = gretl_rand_int_max(vbak->T); } for (i = 0; i < vbak->neqns; i++) { for (t = 0; t < vb...
irf_resample_resids
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_auto_fit_string(const char *s) { char *v2; if (strstr(s, "automatic fit")) return 1; v2 = gettext("with least squares fit"); return strstr(s, v2) != 0; }
int is_auto_fit_string(const char *s) { if (strstr(s, "automatic fit")) return 1; if (strstr(s, _("with least squares fit"))) return 1; return 0; }
is_auto_fit_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_dataset_series(const DATASET *dset, const double *x) { int i; for (i = dset->v - 1; i >= 0; --i) { if (x == dset->Z[i]) return 1; } return 0; }
int is_dataset_series(const DATASET *dset, const double *x) { int i; for (i = dset->v - 1; i >= 0; i--) { if (x == dset->Z[i]) { return 1; } } return 0; }
is_dataset_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_db_transaction(int opt) { return opt == 1 || opt == 11 || opt == 2 || opt == 3 || opt == 6; }
static int is_db_transaction(int opt) { return (opt == LIST_DBS || opt == CHECK_DB || opt == GRAB_IDX || opt == GRAB_DATA || opt == GRAB_NBO_DATA); }
is_db_transaction
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_executable(const char *s, uid_t myid, gid_t mygrp) { int ok; stat buf; unsigned long v7; v7 = __readfsqword(0x28u); ok = 0; if (gretl_stat(s, &buf)) return 0; if ((buf.st_mode & 0xA000) != 0) { if (myid == buf.st_uid && (buf.st_mode & 0x40) != 0) { return 1; } else if (mygrp == b...
static int is_executable(const char *s, uid_t myid, gid_t mygrp) { struct stat buf; int ok = 0; if (gretl_stat(s, &buf) != 0) { return 0; } if (buf.st_mode & (S_IFREG | S_IFLNK)) { if (buf.st_uid == myid && (buf.st_mode & S_IXUSR)) { ok = 1; } else if (buf.st_gid == mygrp && (buf.st_mode &...
is_executable
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_function_alias(const char *s) { int i; for (i = 0; func_alias[i].id; ++i) { if (!strcmp(s, func_alias[i].str)) return 1; } return 0; }
int is_function_alias(const char *s) { int i; for (i = 0; func_alias[i].id != 0; i++) { if (!strcmp(s, func_alias[i].str)) { return 1; } } return 0; }
is_function_alias
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_function_call(const char *s) { return strchr(s, 40) && strchr(s, 41); }
static int is_function_call(const char *s) { if (!strchr(s, '(') || !strchr(s, ')')) { return 0; } else { return 1; } }
is_function_call
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_function_word(const char *s) { return function_lookup_with_alias(s, 0) || get_user_function_by_name(s); }
static int is_function_word(const char *s) { return function_lookup_with_alias(s, NULL) != 0 || get_user_function_by_name(s) != NULL; }
is_function_word
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_functions_dir(const char *path) { int n; n = strlen(path) - 9; return n > 0 && !strcmp(&path[n], "functions"); }
static int is_functions_dir(const char *path) { int n = strlen(path) - 9; return n > 0 && !strcmp(path + n, "functions"); }
is_functions_dir
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_genr_special(const char *s, char *spec, const char **rem) { const char *sa; char *sb; if (strncmp(s, "genr ", 5u)) return 0; for (sa = s + 5; *sa == 32; ++sa) ; if (genr_special_word(sa)) { if (spec) strcpy(spec, sa); if (rem) *rem = sa; return 1; } else if (!strncmp(...
static int is_genr_special(const char *s, char *spec, const char **rem) { if (strncmp(s, "genr ", 5)) { return 0; } s += 5; while (*s == ' ') s++; if (genr_special_word(s)) { if (spec != NULL) { strcpy(spec, s); } if (rem != NULL) { *rem = s; } return 1; } if (!s...
is_genr_special
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_glob(const char *s) { return strchr(s, 42) || strchr(s, 63); }
static int is_glob(const char *s) { return strchr(s, '*') || strchr(s, '?'); }
is_glob
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_gretl_accessor(const char *s) { int i; int ia; int ib; int n; for (i = 0; dvars[i].id; ++i) { n = strlen(dvars[i].str); if (!strncmp(s, dvars[i].str, n)) return ((*__ctype_b_loc())[s[n]] & 0x400) == 0; } for (ia = 0; mvars[ia].id; ++ia) { n = strlen(mvars[ia].str); if (!strnc...
int is_gretl_accessor(const char *s) { int i, n; for (i = 0; dvars[i].id != 0; i++) { n = strlen(dvars[i].str); if (!strncmp(s, dvars[i].str, n)) { return !isalpha(s[n]); } } for (i = 0; mvars[i].id != 0; i++) { n = strlen(mvars[i].str); if (!strncmp(s, mvars[i].str, n)) { retu...
is_gretl_accessor
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_gretl_addon(const char *pkgname) { int i; int ia; int n; if (has_suffix(pkgname, ".gfn")) { n = strlen(pkgname) - 4; for (i = 0; i < n_addons; ++i) { if (!strncmp(pkgname, addon_names[i], n)) return 1; } } else { for (ia = 0; ia < n_addons; ++ia) { if (!strcmp(pkgna...
int is_gretl_addon(const char *pkgname) { int i; if (has_suffix(pkgname, ".gfn")) { int n = strlen(pkgname) - 4; for (i = 0; i < n_addons; i++) { if (!strncmp(pkgname, addon_names[i], n)) { return 1; } } } else { for (i = 0; i < n_addons; i++) { if (!strcmp(pkgname, add...
is_gretl_addon
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_gzipped(const char *fname) { _BOOL4 gz; FILE *fp; gz = 0; if (!fname || !*fname) return 0; fp = gretl_fopen(fname, "rb"); if (!fp) return 0; if (fgetc(fp) == 31) gz = fgetc(fp) == 139; fclose(fp); return gz; }
int is_gzipped(const char *fname) { FILE *fp; int gz = 0; if (fname == NULL || *fname == '\0') { return 0; } fp = gretl_fopen(fname, "rb"); if (fp == NULL) { return 0; } if (fgetc(fp) == 037 && fgetc(fp) == 0213) { gz = 1; } fclose(fp); return gz; }
is_gzipped
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_http(const char *s) { return !strncmp(s, "http://", 7u) || !strncmp(s, "https://", 8u); }
static int is_http(const char *s) { return (strncmp(s, "http://", 7) == 0 || strncmp(s, "https://", 8) == 0); }
is_http
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_indexed_loop(const char *s, char *lvar, char **start, char **stop) { size_t v4; size_t v5; const char *sa; const char *sb; const char *sc; int n; const char *s0; char *p; const char *pa; sa = &s[strspn(s, " ")]; n = gretl_namechar_spn(sa); if (n <= 0) return 0; if (n > 31) retu...
static int is_indexed_loop(const char *s, char *lvar, char **start, char **stop) { int n; s += strspn(s, " "); n = gretl_namechar_spn(s); if (n > 0 && n < VNAMELEN) { const char *s0 = s; const char *p = strstr(s, ".."); if (p != NULL) { s += n; s += strspn(s...
is_indexed_loop
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_jmulti_datafile(const char *fname) { int ret; int gotobs; int gotcomm; int incomm; FILE *fp; char test[136]; unsigned long v8; v8 = __readfsqword(0x28u); ret = 0; fp = gretl_fopen(fname, "r"); if (fp) { memset(test, 0, 128); gotobs = 0; gotcomm = 0; incomm = 0; while (f...
static int is_jmulti_datafile(const char *fname) { FILE *fp; int ret = 0; fp = gretl_fopen(fname, "r"); if (fp != NULL) { char test[128] = {0}; int gotobs = 0; int gotcomm = 0; int incomm = 0; while (fgets(test, sizeof test, fp)) { if (!incomm && strstr(test, "/*")) { gotcom...
is_jmulti_datafile
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_libset_var(const char *s) { int err; setvar *sv; sv = get_setvar_by_name(s); err = sv == 0; if (sv) err = libset_query_settings(sv, 0); return err == 0; }
int is_libset_var(const char *s) { setvar *sv = get_setvar_by_name(s); int err = (sv == NULL); if (!err) { err = libset_query_settings(sv, NULL); } return (err == 0); }
is_libset_var
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_linear_trend(const double *x, int n) { int t; int ret; ret = 1; for (t = 1; t < n; ++t) { if (x[t] != x[t - 1] + 1.0) return 0; } return ret; }
static int is_linear_trend(const double *x, int n) { int t, ret = 1; for (t = 1; t < n; t++) { if (x[t] != x[t - 1] + 1.0) { ret = 0; break; } } return ret; }
is_linear_trend
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_panel_group_names_series(const DATASET *dset, int v) { return dset && dset->structure == 2 && dset->pangrps && v == current_series_index(dset, dset->pangrps); }
int is_panel_group_names_series(const DATASET *dset, int v) { if (dataset_is_panel(dset) && dset->pangrps != NULL) { return v == current_series_index(dset, dset->pangrps); } else { return 0; } }
is_panel_group_names_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_panel_time_sample(const char *mask, const DATASET *dset) { int i; int t; int s; int ret; int T; int N; char *ts; ret = 1; if (!dset || dset->structure != 2) return 0; if (get_submask_length(mask) != dset->n + 1) return 0; T = dset->pd; N = dset->n / T; ts = (char *)calloc(T, 1u...
static int is_panel_time_sample(const char *mask, const DATASET *dset) { int i, t, s, N, T, ret = 1; char *ts = NULL; if (dset == NULL || !dataset_is_panel(dset)) { return 0; } else if (get_submask_length(mask) != dset->n + 1) { return 0; } T = dset->pd; N = dset->n / T; ts = calloc(T, 1); ...
is_panel_time_sample
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_pdf_ref(const char *s) { const char *sa; sa = s; if (!strncmp(s, "pdfdoc:", 7u)) sa = s + 7; return strlen(sa) <= 0x3F && !strchr(sa, 32) && has_suffix(sa, ".pdf"); }
static int is_pdf_ref(const char *s) { if (!strncmp(s, "pdfdoc:", 7)) { s += 7; } return strlen(s) < 64 && strchr(s, ' ') == NULL && has_suffix(s, ".pdf"); }
is_pdf_ref
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_periodic_dummy(const double *x, const DATASET *dset) { int offset; int pd; unsigned long v5; v5 = __readfsqword(0x28u); pd = dset->pd; return real_periodic_dummy(x, dset->n, &pd, &offset, 0, 0); }
int is_periodic_dummy(const double *x, const DATASET *dset) { int offset, pd = dset->pd; return real_periodic_dummy(x, dset->n, &pd, &offset, NULL, NULL); }
is_periodic_dummy
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_plotting_command(CMD *cmd) { if (cmd->ci == 50 || cmd->ci == 98 || cmd->ci == 13 || cmd->ci == 114 || cmd->ci == 20 || cmd->ci == 141 || cmd->ci == 97 || cmd->ci == 111 || cmd->ci == 54 || cmd->ci == 56 || cmd->ci == 67 || cmd->ci == 105 || cmd->ci == 106 || cmd->ci == 44 || cmd->ci == 40 || ...
int is_plotting_command(CMD *cmd) { if (GRAPHING_COMMAND(cmd->ci)) { return cmd->ci; } else if (cmd->ci == END && cmd->param != NULL && !strcmp(cmd->param, "plot")) { return PLOT; } else { return 0; } }
is_plotting_command
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_pointer_arg(fncall *call, int rtype) { int type; int i; ufunc *u; fn_param *fp; u = call->fun; if (call->retname) { for (i = 0; i < call->argc; ++i) { fp = &u->params[i]; type = fp->type; if ((type == gretl_type_get_ref_type((GretlType)rtype) || (fp->flags & 1) != 0)...
static int is_pointer_arg(fncall *call, int rtype) { ufunc *u = call->fun; if (call->retname != NULL) { fn_param *fp; int i; for (i = 0; i < call->argc; i++) { fp = &u->params[i]; if ((fp->type == gretl_type_get_ref_type(rtype) || (fp->flags & FP_CONST)) && strcmp(fp->...
is_pointer_arg
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_public_funcs_line(const char *line, int *offset) { const char *s; if (strncmp(line, "public", 6u)) return 0; s = &line[strspn(line + 6, " ") + 6]; if (*s != 61) return 0; *offset = (_DWORD)s + 1 - (_DWORD)line; return 1; }
static int is_public_funcs_line(const char *line, int *offset) { const char *s = line; if (!strncmp(s, "public", 6)) { s += 6; s += strspn(s, " "); if (*s == '=') { *offset = 1 + s - line; return 1; } } return 0; }
is_public_funcs_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_purebin_file(const char *fname) { _BOOL4 ret; FILE *fp; char buf[24]; unsigned long v5; v5 = __readfsqword(0x28u); fp = gretl_fopen(fname, "rb"); ret = 0; if (fp) { if (fread(buf, 1u, 0xEu, fp) == 14) ret = strcmp(buf, "gretl-purebin") == 0; fclose(fp); } return ret; }
static int is_purebin_file(const char *fname) { FILE *fp = gretl_fopen(fname, "rb"); int ret = 0; if (fp != NULL) { char buf[16]; if (fread(buf, 1, 14, fp) == 14 && !strcmp(buf, "gretl-purebin")) { ret = 1; } fclose(fp); } return ret; }
is_purebin_file
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_quadratic_trend(const double *x, int n) { int t; int ret; ret = 1; for (t = 0; t < n; ++t) { if (x[t] != (double)((t + 1) * (t + 1))) return 0; } return ret; }
static int is_quadratic_trend(const double *x, int n) { double t2; int t, ret = 1; for (t = 0; t < n; t++) { t2 = (t + 1) * (t + 1); if (x[t] != t2) { ret = 0; break; } } return ret; }
is_quadratic_trend
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_simple_zero_restriction(gretl_restriction *rset) { if (!rset->rows || rset->g != 1) return 0; return **(_DWORD **)rset->rows == 1 && (*rset->rows)->rhs == 0.0; }
static int is_simple_zero_restriction(gretl_restriction *rset) { if (rset->rows != NULL && rset->g == 1) { return (rset->rows[0]->nterms == 1 && rset->rows[0]->rhs == 0); } else { return 0; } }
is_simple_zero_restriction
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_standard_diff(int v, const DATASET *dset, int *parent) { int ret; int pv; ret = 0; if (v <= 0 || v >= dset->v) return 0; if (series_get_transform(dset, v) == 25) { pv = series_get_parent_id(dset, v); if (pv > 0) { if (parent) *parent = pv; return 1; } } return r...
int is_standard_diff(int v, const DATASET *dset, int *parent) { int pv = 0, ret = 0; if (v <= 0 || v >= dset->v) { return 0; } if (series_get_transform(dset, v) == DIFF) { pv = series_get_parent_id(dset, v); if (pv > 0) { if (parent != NULL) { *parent = pv; } ret = 1; ...
is_standard_diff
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_string_valued(const DATASET *dset, int i) { return dset && i > 0 && i < dset->v && dset->varinfo[i]->st != 0; }
int is_string_valued(const DATASET *dset, int i) { if (dset != NULL && i > 0 && i < dset->v) { return dset->varinfo[i]->st != NULL; } else { return 0; } }
is_string_valued
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_trend_variable(const double *x, int n) { return is_linear_trend(x, n) || is_quadratic_trend(x, n) != 0; }
int is_trend_variable(const double *x, int n) { int ret = 0; if (is_linear_trend(x, n)) { ret = 1; } else if (is_quadratic_trend(x, n)) { ret = 1; } return ret; }
is_trend_variable
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_tsls_style_instrument(equation_system *sys, int v) { int i; int j; int pos; for (i = 0; i < sys->neqns; ++i) { pos = gretl_list_separator_position(sys->lists[i]); if (pos > 0) { for (j = pos + 1; j <= *sys->lists[i]; ++j) { if (v == sys->lists[i][j]) return 1; } ...
static int is_tsls_style_instrument(equation_system *sys, int v) { int i, j, pos; for (i = 0; i < sys->neqns; i++) { pos = gretl_list_separator_position(sys->lists[i]); if (pos > 0) { for (j = pos + 1; j <= sys->lists[i][0]; j++) { if (sys->lists[i][j] == v) { return 1; } ...
is_tsls_style_instrument
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_unclaimed(const char *s, char **S, int n) { int i; for (i = 0; i < n; ++i) { if (!strcmp(s, S[i])) return 0; } return 1; }
static int is_unclaimed(const char *s, char **S, int n) { int i; for (i = 0; i < n; i++) { if (strcmp(s, S[i]) == 0) { return 0; } } return 1; }
is_unclaimed
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_user_string(const char *name) { const char *namea; namea = name; if (*name == 64 && name[1] != 64) namea = name + 1; return get_user_var_of_type_by_name(namea, GRETL_TYPE_STRING) != 0; }
int is_user_string(const char *name) { if (*name == '@' && *(name + 1) != '@') { name++; } if (get_user_var_of_type_by_name(name, GRETL_TYPE_STRING) != NULL) { return 1; } else { return 0; } }
is_user_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_valid_midas_frequency_ratio(const DATASET *dset, int m) { if (dset->pd == 1) return m == 4 || m == 12; if (dset->pd == 4 && m == 3) return 1; if (dset->pd != 4 && dset->pd != 12) return 0; if (m == midas_days_per_period(5, dset->pd)) return 1; if (m == midas_days_per_period(6, dset->pd)...
int is_valid_midas_frequency_ratio(const DATASET *dset, int m) { if (dset->pd == 1) { return (m == 4 || m == 12); } else if (dset->pd == 4 && m == 3) { return 1; } else if (dset->pd == 4 || dset->pd == 12) { if (m == midas_days_per_period(5, dset->pd)) { return 1; } else if (m == midas_da...
is_valid_midas_frequency_ratio
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_web_resource(const char *s) { return !strncmp(s, "http://", 7u) || !strncmp(s, "https://", 8u) || !strncmp(s, "ftp://", 6u); }
static int is_web_resource(const char *s) { if (!strncmp(s, "http://", 7) || !strncmp(s, "https://", 8) || !strncmp(s, "ftp://", 6)) { return 1; } else { return 0; } }
is_web_resource
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_weekend(int t, int pd, int sat0, int sun0) { _BOOL4 sat; _BOOL4 sun; sat = 0; sun = 0; if (sat0 >= 0) sat = (t - sat0) % pd == 0; if (!sat && sun0 >= 0) sun = (t - sun0) % pd == 0; return sat || sun; }
static int is_weekend(int t, int pd, int sat0, int sun0) { int sat = 0, sun = 0; if (sat0 >= 0) { sat = (t - sat0) % pd == 0; } if (!sat && sun0 >= 0) { sun = (t - sun0) % pd == 0; } return sat || sun; }
is_weekend
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int is_zero(int size, Vector *v) { return !*v->cf && memcmp(v->cf, v->cf + 1, 4LL * (size - 1)) == 0; }
static int is_zero(int size, Vector *v) { if (v->cf[0] != 0) { return 0; } else { return (memcmp(v->cf, v->cf + 1, sizeof(uint32_t) * (size - 1)) == 0); } }
is_zero
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *isconst_or_dum_node(NODE *l, NODE *r, parser *p, int f) { if (f == 342 || !r || r->t == 85) return series_scalar_func(l, f, 0, p); if (l->t == 57) { node_type_error(f, 1, 55, l, p); return 0; } else if (p->dset && p->dset->structure == 2) { return series_scalar_scalar_func(l, r, 0, f, p); ...
static NODE *isconst_or_dum_node(NODE *l, NODE *r, parser *p, int f) { if (f == F_ISDUMMY || null_node(r)) { return series_scalar_func(l, f, NULL, p); } else if (l->t == MAT) { node_type_error(f, 1, SERIES, l, p); return NULL; } else if (!dataset_is_panel(p->dset)) { p->err = E_PDWRONG; return...
isconst_or_dum_node
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int iso_basic_to_extended(const double *b, double *y, double *m, double *d, int n) { double *v5; double *v6; int bi; int i; int julian; for (i = 0; i < n; ++i) { julian = 0; if (fabs(b[i]) <= 1.797693134862316e308) { bi = (int)b[i]; if (bi < 0) { julian...
int iso_basic_to_extended(const double *b, double *y, double *m, double *d, int n) { int bi, yi, mi, di; int i, julian; for (i = 0; i < n; i++) { julian = 0; if (na(b[i])) { y[i] = m[i] = NADBL; if (d != NULL) { d[i] = NADBL; } } else { bi = (...
iso_basic_to_extended
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *iso_to_ascii(char *s) { return real_iso_to_ascii(s, 1); }
char *iso_to_ascii(char *s) { return real_iso_to_ascii(s, 1); }
iso_to_ascii
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0