input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void gmt_ortho(GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double cosx;
double sinx;
double *ya;
double *xa;
double lata;
double lona;
GMT_CTRL *GMTa;
double sin_lat;
double cos_lat;
double sin_lon;
double cos_lon;
unsigned long v16;
GMTa = GMT;
lona = lon;
lata = lat;
... | void gmt_ortho (struct GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double sin_lat, cos_lat, sin_lon, cos_lon;
gmt_M_wind_lon (GMT, lon)
sincosd (lat, &sin_lat, &cos_lat);
sincosd (lon, &sin_lon, &cos_lon);
*x = GMT->current.proj.EQ_RAD * cos_lat * sin_lon;
*y = GMT->current.proj.EQ_RAD * (... | gmt_ortho | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
bool gmt_outside_lower_boundary(double val, double min) { return min > val; } | static inline bool gmt_outside_lower_boundary (double val, double min) {return (val < min);} | gmt_outside_lower_boundary | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
bool gmt_outside_upper_boundary(double val, double max) { return val > max; } | static inline bool gmt_outside_upper_boundary (double val, double max) {return (val > max);} | gmt_outside_upper_boundary | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_R_option(GMT_CTRL *GMT, char *item) {
unsigned int v3;
unsigned int v4;
double v5;
int v6;
unsigned int v7;
double v8;
unsigned int v9;
unsigned int v10;
unsigned int v11;
int v12;
double v13;
int v14;
bool inv_project;
bool scale_coord;
char r_unit;
unsigned int pos;
uns... | int gmt_parse_R_option (struct GMT_CTRL *GMT, char *item) {
unsigned int i, icol, pos, error = 0, n_slash = 0;
int got, col_type[2], expect_to_read;
size_t length;
bool inv_project = false, scale_coord = false;
char text[GMT_BUFSIZ] = {""}, string[GMT_BUFSIZ] = {""}, r_unit = 0, *c = NULL;
double p[6];
if (!ite... | gmt_parse_R_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_common_options(GMT_CTRL *GMT, char *list, char option,
char *item) {
int result;
_BOOL4 v5;
_BOOL4 v6;
_BOOL4 v7;
_BOOL4 v8;
_BOOL4 v9;
_BOOL4 v10;
_BOOL4 v11;
int v12;
int v13;
int v14;
int v15;
_BOOL4 v16;
int v17;
int v18;
int v19;
int v20;... | int gmt_parse_common_options (struct GMT_CTRL *GMT, char *list, char option, char *item) {
int error = 0, i = 0;
if (!list || !strchr (list, option)) return (0);
if (gmt_M_compat_check (GMT, 4)) {
switch (option) {
case 'E': GMT_COMPAT_OPT ('p'); break;
case 'F': GMT_COMPAT_OPT ('r'); break;
case ... | gmt_parse_common_options | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
unsigned int gmt_parse_d_option(GMT_CTRL *GMT, char *arg) {
unsigned int dir;
unsigned int first;
unsigned int last;
const char *c;
if (!arg || !*arg)
return 64;
if (*arg == 105) {
last = 0;
first = 0;
c = arg + 1;
} else if (*arg == 111) {
last = 1;
first = 1;
c = arg + 1;
... | unsigned int gmt_parse_d_option (struct GMT_CTRL *GMT, char *arg) {
unsigned int dir, first, last;
char *c = NULL;
if (!arg || !arg[0]) return (GMT_PARSE_ERROR);
if (arg[0] == 'i') {
first = last = GMT_IN;
c = &arg[1];
}
else if (arg[0] == 'o') {
first = last = GMT_OUT;
c = &arg[1];
}
else {
first =... | gmt_parse_d_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_g_option(GMT_CTRL *GMT, char *txt) {
int v3;
GMT_enum_gaps v4;
GMT_enum_gaps v5;
GMT_enum_gaps v6;
GMT_enum_gaps v7;
GMT_enum_gaps v8;
GMT_enum_gaps v9;
GMT_enum_gaps v10;
int v11;
int k;
int ka;
unsigned int i;
int c;
k = 0;
if (!txt || !*txt)
return 64;
i = GMT->comm... | int gmt_parse_g_option (struct GMT_CTRL *GMT, char *txt) {
int i, k = 0, c;
if (!txt || !txt[0]) return (GMT_PARSE_ERROR);
if ((i = GMT->common.g.n_methods) == GMT_N_GAP_METHODS) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: Cannot specify more than %d gap criteria\n", GMT_N_GAP_METHODS);
return (1);
... | gmt_parse_g_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_i_option(GMT_CTRL *GMT, char *arg) {
bool v3;
int v4;
int v5;
bool new_style;
unsigned int pos;
unsigned int pos_p;
unsigned int uerr;
unsigned int k;
int convert;
int64_t start;
int64_t stop;
int64_t i;
double scale;
double offset;
char *c;
int64_t inc;
char word[256];
... | int gmt_parse_i_option (struct GMT_CTRL *GMT, char *arg) {
char copy[GMT_BUFSIZ] = {""}, p[GMT_BUFSIZ] = {""}, word[GMT_LEN256] = {""}, *c = NULL;
bool new_style;
unsigned int k = 0, pos = 0, pos_p, uerr = 0;
int convert;
int64_t i, start = -1, stop = -1, inc;
double scale, offset;
if (!arg || !arg[0]) return ... | gmt_parse_i_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
unsigned int gmt_parse_inc_option(GMT_CTRL *GMT, char option, char *item) {
if (gmt_getinc(GMT, item, GMT->common.R.inc)) {
gmt_inc_syntax(GMT, option, 1);
return 1;
} else {
GMT->common.R.active[1] = 1;
return 0;
}
} | unsigned int gmt_parse_inc_option (struct GMT_CTRL *GMT, char option, char *item) {
if (gmt_getinc (GMT, item, GMT->common.R.inc)) {
gmt_inc_syntax (GMT, option, 1);
return 1U;
}
GMT->common.R.active[ISET] = true;
return GMT_NOERROR;
} | gmt_parse_inc_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_o_option(GMT_CTRL *GMT, char *arg) {
unsigned int pos;
int64_t start;
int64_t stop;
uint64_t k;
int64_t i;
int64_t inc;
char copy[4096];
char p[4104];
unsigned long v11;
v11 = __readfsqword(0x28u);
memset(copy, 0, sizeof(copy));
memset(p, 0, 4096);
pos = 0;
k = 0;
start = -1... | int gmt_parse_o_option (struct GMT_CTRL *GMT, char *arg) {
char copy[GMT_BUFSIZ] = {""}, p[GMT_BUFSIZ] = {""};
unsigned int pos = 0;
uint64_t k = 0;
int64_t i, start = -1, stop = -1, inc;
if (!arg || !arg[0]) return (GMT_PARSE_ERROR);
strncpy (copy, arg, GMT_BUFSIZ-1);
while ((gmt_strtok (copy, ",", &pos, p... | gmt_parse_o_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int64_t gmt_parse_range(GMT_CTRL *GMT, char *p, int64_t *start, int64_t *stop) {
int got;
int64_t inc;
char *c;
unsigned long v10;
v10 = __readfsqword(0x28u);
inc = 1;
c = strchr(p, 45);
if (c) {
inc = (unsigned int)__isoc99_sscanf(p, "%lu-%lu", start, stop) == 2;
} else {
c = strchr(p, 58);
... | int64_t gmt_parse_range (struct GMT_CTRL *GMT, char *p, int64_t *start, int64_t *stop) {
int64_t inc = 1;
int got;
char *c = NULL;
if ((c = strchr (p, '-'))) {
got = sscanf (p, "%" PRIu64 "-%" PRIu64, start, stop);
if (got != 2) inc = 0L;
}
else if ((c = strchr (p, ':'))) {
got = sscanf (p, "%" PRIu64... | gmt_parse_range | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_segment_header(GMT_CTRL *GMT, char *header, GMT_PALETTE *P,
bool *use_fill, GMT_FILL *fill, GMT_FILL *def_fill,
bool *use_pen, GMT_PEN *pen, GMT_PEN *def_pen,
unsigned int def_outline, GMT_OGR_SEG *G) {
char **tvalue;... | int gmt_parse_segment_header (struct GMT_CTRL *GMT, char *header, struct GMT_PALETTE *P, bool *use_fill, struct GMT_FILL *fill, struct GMT_FILL *def_fill, bool *use_pen, struct GMT_PEN *pen, struct GMT_PEN *def_pen, unsigned int def_outline, struct GMT_OGR_SEG *G) {
unsigned int process... | gmt_parse_segment_header | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
bool gmt_parse_segment_item(GMT_CTRL *GMT, char *in_string, char *pattern,
char *out_string) {
char *t;
char *ta;
if (!in_string || !pattern)
return 0;
t = strstr(in_string, pattern);
if (!t)
return 0;
if (!out_string)
return 1;
*out_string = 0;
if (t != in_strin... | bool gmt_parse_segment_item (struct GMT_CTRL *GMT, char *in_string, char *pattern, char *out_string) {
char *t = NULL;
size_t k;
gmt_M_unused(GMT);
if (!in_string || !pattern) return (false);
if (!(t = strstr (in_string, pattern))) return (false);
if (!out_string) return (true);
out_string[0] = '\0';
k... | gmt_parse_segment_item | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
unsigned int gmt_parse_segmentize(GMT_CTRL *GMT, char option, char *in_arg,
unsigned int mode, GMT_SEGMENTIZE *S) {
int v5;
int v6;
unsigned int k;
int errors;
errors = 0;
v5 = *in_arg;
if (v5 == 118) {
k = 1;
S->method = 1;
} else {
if (v5 <= 118) {
... | unsigned int gmt_parse_segmentize (struct GMT_CTRL *GMT, char option, char *in_arg, unsigned int mode, struct GMT_SEGMENTIZE *S) {
unsigned int k, errors = 0;
switch (in_arg[0]) {
case 'c': k = 1; S->method = SEGM_CONTINUOUS; break;
case 'n': k = 1; S->method = SEGM_NETWORK; break;
... | gmt_parse_segmentize | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_symbol_option(GMT_CTRL *GMT, char *text, GMT_SYMBOL *p,
unsigned int mode, bool cmd) {
size_t v5;
size_t v6;
int v7;
float v8;
float v9;
double v10;
double v11;
float v12;
int result;
int v14;
unsigned int v15;
unsigned int v16;
unsigned int v17;
uns... | int gmt_parse_symbol_option (struct GMT_CTRL *GMT, char *text, struct GMT_SYMBOL *p, unsigned int mode, bool cmd) {
int decode_error = 0, bset = 0, j, n, k, slash = 0, colon, col_off = mode, len;
bool check = true, degenerate = false;
unsigned int ju;
char symbol_type, txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] ... | gmt_parse_symbol_option | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_vector(GMT_CTRL *GMT, char symbol, char *text, GMT_SYMBOL *S) {
double offset;
double v5;
double v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
double v15;
double length;
double v17;
double v18;
float map_vector_shape;
float v20;
unsign... | int gmt_parse_vector (struct GMT_CTRL *GMT, char symbol, char *text, struct GMT_SYMBOL *S) {
unsigned int pos = 0, k, f = 0, end, error = 0;
size_t len;
bool p_opt = false, g_opt = false;
int j;
char p[GMT_BUFSIZ];
double value[2];
S->v.pen = GMT->current.setting.map_default_pen;
gmt_init_fill (GMT, &S->v.fil... | gmt_parse_vector | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_parse_z_io(GMT_CTRL *GMT, char *txt, GMT_PARSE_Z_IO *z) {
unsigned int v4;
unsigned int v5;
unsigned int i;
unsigned int k;
unsigned int start;
int value;
k = 0;
if (!txt)
return 64;
if (!*txt)
return 0;
for (start = 0; !z->not_grid && txt[start] && start <= 1; ++start) {
v4 = t... | int gmt_parse_z_io (struct GMT_CTRL *GMT, char *txt, struct GMT_PARSE_Z_IO *z) {
int value;
unsigned int i, k = 0, start;
if (!txt) return (GMT_PARSE_ERROR);
if (!txt[0]) return (0);
for (start = 0; !z->not_grid && txt[start] && start < 2; start++) {
switch (txt[start]) {
case 'T':
case 'B':
... | gmt_parse_z_io | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_pclose2(popen2 **Faddr, int dir) {
int v2;
__pid_t v3;
int v4;
popen2 *F;
F = *Faddr;
++F->n_closed;
close(F->fd[dir]);
if (F->n_closed == 2) {
v2 = kill(F->child_pid, 0);
printf("kill(%d, 0) -> %d\n", F->child_pid, v2);
v3 = waitpid(F->child_pid, 0, 0);
printf("waitpid() -> %d... | void gmt_pclose2 (struct popen2 **Faddr, int dir) {
struct popen2 *F = *Faddr;
F->n_closed++;
close (F->fd[dir]);
if (F->n_closed == 2) {
#ifndef _WIN32
printf("kill(%d, 0) -> %d\n", F->child_pid, kill(F->child_pid, 0));
printf("waitpid() -> %d\n", waitpid(F->child_pid, NULL, 0));
printf("kill(... | gmt_pclose2 | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_pen_syntax(GMT_CTRL *GMT, char option, char *string,
unsigned int mode) {
char *v4;
if (*string == 32)
GMT_Report(GMT->parent, 1u, "Syntax error -%c option. Correct syntax:\n",
(unsigned int)option);
gmt_message(GMT, "\t-%c ", (unsigned int)option);
v4 = gmt_put... | void gmt_pen_syntax (struct GMT_CTRL *GMT, char option, char *string, unsigned int mode) {
if (string[0] == ' ') GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Syntax error -%c option. Correct syntax:\n", option);
gmt_message (GMT, "\t-%c ", option);
gmt_message (GMT, string, gmt_putpen (GMT, &GMT->current.setting.map... | gmt_pen_syntax | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_permutation(GMT_CTRL *GMT, int n, int r) {
double result;
double v4;
double v5;
double v6;
if (n >= 0 && r >= 0 && r <= n) {
v4 = gmtstat_factln(GMT, n);
v5 = gmtstat_factln(GMT, n - r);
v6 = exp(v4 - v5) + 0.5;
result = v6;
if (fabs(v6) < 4.503599627370496e15)
*(_QWORD *... | double gmt_permutation (struct GMT_CTRL *GMT, int n, int r) {
if (n < 0 || r < 0 || r > n) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: n < 0 or r < 0 or r > n in gmt_permutation(n,r)\n");
return (GMT->session.d_NaN);
}
return (floor (0.5 + exp (gmtstat_factln (GMT, n) - gmtstat_factln (GMT, n-r))));
} | gmt_permutation | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_pickdefaults(GMT_CTRL *GMT, bool lines, GMT_OPTION *options) {
int error;
int n;
GMT_OPTION *opt;
char *param;
char record[4104];
unsigned long v10;
v10 = __readfsqword(0x28u);
error = 0;
n = 0;
memset(record, 0, 4096);
if (GMT_Init_IO(GMT->parent, 5u, 0x10u, 1u, 6u, 0, options))
retu... | int gmt_pickdefaults (struct GMT_CTRL *GMT, bool lines, struct GMT_OPTION *options) {
int error = GMT_OK, n = 0;
struct GMT_OPTION *opt = NULL;
char *param, record[GMT_BUFSIZ] = {""};
if (GMT_Init_IO (GMT->parent, GMT_IS_TEXTSET, GMT_IS_NONE, GMT_OUT, GMT_ADD_DEFAULT, 0, options) != GMT_OK) {
return (GMT->paren... | gmt_pickdefaults | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plane_perspective(GMT_CTRL *GMT, int plane, double level) {
int v3;
const char *v4;
double levela;
double a;
double b;
double c;
double d;
double e;
double f;
PSL_CTRL *PSL;
levela = level;
PSL = GMT->PSL;
if (GMT->current.proj.three_D && GMT->hidden.func_level <= 1 &&
(plane !... | void gmt_plane_perspective (struct GMT_CTRL *GMT, int plane, double level) {
double a, b, c, d, e, f;
struct PSL_CTRL *PSL= GMT->PSL;
if (!GMT->current.proj.three_D) return;
if (GMT->hidden.func_level > 1) return;
if (plane == GMT->current.proj.z_project.plane && gmt_M_eq(level,GMT->current.p... | gmt_plane_perspective | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_plm(GMT_CTRL *GMT, int l, int m, double x) {
double v5;
int i;
int ll;
double fact;
double pll;
double pmm;
double pmmp1;
pll = 0.0;
if (fabs(x) <= 1.0) {
if (m >= 0 && m <= l) {
pmm = 1.0;
if (m > 0) {
if ((1.0 - x) * (x + 1.0) >= 0.0)
v5 = sqrt((1.0 - x)... | double gmt_plm (struct GMT_CTRL *GMT, int l, int m, double x) {
double fact, pll = 0, pmm, pmmp1, somx2;
int i, ll;
if (fabs(x) > 1.0) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: |x| > 1.0 in gmt_plm\n");
return (GMT->session.d_NaN);
}
if (m < 0 || m > l) {
GMT_Report (GMT->parent, GMT_MSG_NORM... | gmt_plm | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_plm_bar(GMT_CTRL *GMT, int l, int m, double x, bool ortho) {
double v6;
double v7;
double v8;
double v9;
double v10;
double v11;
int ma;
bool csphase;
int i;
int ia;
double pmm;
double pmm0;
double pmm1;
double u;
double r;
double pmm2;
ma = m;
csphase = 0;
if (fabs(x) ... | double gmt_plm_bar (struct GMT_CTRL *GMT, int l, int m, double x, bool ortho) {
int i;
bool csphase = false;
double scalef = 1.0e280, u, r, pmm, pmm0, pmm1, pmm2;
if (fabs (x) > 1.0) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: |x| > 1.0 in gmt_plm_bar\n");
return (... | gmt_plm_bar | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plm_bar_all(GMT_CTRL *GMT, int lmax, double x, bool ortho,
double *plm) {
double v5;
double v6;
double v7;
double v8;
double v9;
double v10;
double v11;
int lmaxa;
bool csphase;
int l;
int m;
int lm;
int mm;
double pmm;
double pmm0;
double pmm1;
double u;
... | void gmt_plm_bar_all (struct GMT_CTRL *GMT, int lmax, double x, bool ortho, double *plm) {
int l, m, lm, mm;
bool csphase = false;
double scalef = 1.0e280, u, r, pmm, pmms, pmm0, pmm1, pmm2;
if (fabs (x) > 1.0) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: |x| > 1.0 ... | gmt_plm_bar_all | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plot_line(GMT_CTRL *GMT, double *x, double *y, unsigned int *pen,
uint64_t n, unsigned int mode) {
long v6;
bool v7;
bool v8;
double v9;
uint64_t na;
bool close;
bool stop;
int way;
uint64_t i;
uint64_t ia;
uint64_t j;
uint64_t ja;
PSL_CTRL *PSL;
uint64_t im1;
u... | void gmt_plot_line (struct GMT_CTRL *GMT, double *x, double *y, unsigned int *pen, uint64_t n, unsigned int mode) {
uint64_t i, j, im1, ip1;
int way;
bool close, stop;
double x_cross[2], y_cross[2];
struct PSL_CTRL *PSL= GMT->PSL;
if (n < 2) return;
plot_NaN_pen_up (x, y, pen, n);
i = 0;
while (i < (n-1)... | gmt_plot_line | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plotcanvas(GMT_CTRL *GMT) {
char *v1;
bool donut;
double *x;
double *y;
uint64_t np;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (GMT->current.map.frame.paint) {
x = 0;
y = 0;
v1 = gmtlib_putfill(GMT, &GMT->current.map.frame.fill);
PSL_comment(GMT->PSL, "Fill the canvas %s\... | void gmt_plotcanvas (struct GMT_CTRL *GMT) {
if (GMT->current.map.frame.paint) {
double *x = NULL, *y = NULL;
uint64_t np;
bool donut;
PSL_comment (GMT->PSL, "Fill the canvas %s\n", gmtlib_putfill (GMT, &GMT->current.map.frame.fill));
np = gmt_map_clip_path (GMT, &x, &y, &donut);
gmt_setfill (GMT, &GMT->c... | gmt_plotcanvas | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plotend(GMT_CTRL *GMT) {
bool v1;
int nclip;
char **header;
bool K_active;
unsigned int i;
PSL_CTRL *PSL;
GMT_POSTSCRIPT *P;
v1 = GMT->current.setting.run_mode == 1 || GMT->common.K.active;
K_active = v1;
PSL = GMT->PSL;
PSL_endlayer(PSL);
if (GMT->common.t.active)
PSL_command(PSL,... | void gmt_plotend (struct GMT_CTRL *GMT) {
unsigned int i;
bool K_active = (GMT->current.setting.run_mode == GMT_MODERN) ? true : GMT->common.K.active;
struct PSL_CTRL *PSL= GMT->PSL;
PSL_endlayer (GMT->PSL);
if (GMT->common.t.active) PSL_command (PSL, "1 /Normal PSL_transp\n");
if (abs (GMT->current.ps.nclip... | gmt_plotend | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
PSL_CTRL *gmt_plotinit(GMT_CTRL *GMT, GMT_OPTION *options) {
int v3;
int v4;
int v5;
int v6;
const char *module_name;
char *v8;
bool O_active;
int k;
_BOOL4 ka;
int kb;
int kc;
int kd;
unsigned int ke;
unsigned int kf;
unsigned int kg;
int id;
int ida;
int idb;
int n_fonts;
int l... | struct PSL_CTRL * gmt_plotinit (struct GMT_CTRL *GMT, struct GMT_OPTION *options) {
int k, id, fno[PSL_MAX_EPS_FONTS], n_fonts, last;
bool O_active = GMT->common.O.active;
unsigned int this_proj, write_to_mem = 0;
char *mode[2] = {"w","a"};
FILE *fp = NULL;
struct GMT_OPTION *Out = NULL;
struct PSL_CTRL *PS... | gmt_plotinit | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_plrs_sph(GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double s_c;
double cosx;
double sinx;
double *ya;
double *xa;
double lata;
double lona;
GMT_CTRL *GMTa;
double slon;
double clon;
double rho;
unsigned long v16;
GMTa = GMT;
lona = lon;
lata = lat;
xa = x;
... | void gmt_plrs_sph (struct GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double rho, slon, clon;
if (GMT->current.proj.GMT_convert_latitudes) lat = gmt_M_latg_to_latc (GMT, lat);
gmt_M_wind_lon (GMT, lon)
sincosd (lon, &slon, &clon);
if (GMT->current.proj.north_pole) {
rho = GMT->current.pro... | gmt_plrs_sph | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_poisson_cdf(GMT_CTRL *GMT, double k, double mu, double *prob) {
double v4;
if (k == 0.0)
v4 = exp(COERCE_DOUBLE(*(_QWORD *)&mu ^ 0x8000000000000000LL));
else
v4 = gmtstat_gammq(GMT, k + 1.0, mu);
*prob = v4;
} | void gmt_poisson_cdf (struct GMT_CTRL *GMT, double k, double mu, double *prob) {
*prob = (k == 0.0) ? exp (-mu) : gmtstat_gammq (GMT, k+1.0, mu);
} | gmt_poisson_cdf | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_poissonpdf(GMT_CTRL *GMT, double k, double lambda) {
int v3;
double v5;
double v6;
v5 = pow(lambda, k);
v6 = exp(-lambda) * v5;
v3 = lrint(k);
return v6 / gmt_factorial(GMT, v3);
} | double gmt_poissonpdf (struct GMT_CTRL *GMT, double k, double lambda) {
return pow (lambda, k) * exp (-lambda) / gmt_factorial (GMT, irint (k));
} | gmt_poissonpdf | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_polar(GMT_CTRL *GMT, double x, double y, double *x_i, double *y_i) {
double v5;
double cosx;
double sinx;
double *y_ia;
double *x_ia;
double ya;
double xa;
GMT_CTRL *GMTa;
GMTa = GMT;
xa = x;
ya = y;
x_ia = x_i;
y_ia = y_i;
if (GMT->current.proj.got_azimuths)
xa = 90.0 - xa;
... | void gmt_polar (struct GMT_CTRL *GMT, double x, double y, double *x_i, double *y_i) {
if (GMT->current.proj.got_azimuths) x = 90.0 - x;
if (GMT->current.proj.got_elevations) y = 90.0 - y;
sincosd (x - GMT->current.proj.p_base_angle, y_i, x_i);
(*x_i) *= y;
(*y_i) *= y;
} | gmt_polar | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_polar_to_cart(GMT_CTRL *GMT, double r, double theta, double *a,
bool degrees) {
double v5;
double cosx;
double sinx;
bool degreesa;
double *aa;
double thetaa;
double ra;
GMT_CTRL *GMTa;
GMTa = GMT;
ra = r;
thetaa = theta;
aa = a;
degreesa = degrees;
if (degre... | void gmt_polar_to_cart (struct GMT_CTRL *GMT, double r, double theta, double *a, bool degrees) {
gmt_M_unused(GMT);
if (degrees) theta *= D2R;
sincos (theta, &a[GMT_Y], &a[GMT_X]);
a[GMT_X] *= r;
a[GMT_Y] *= r;
} | gmt_polar_to_cart | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_polyconic(GMT_CTRL *GMT, double lon, double lat, double *x,
double *y) {
double cosx;
double sinx;
double *ya;
double *xa;
double lata;
double lona;
GMT_CTRL *GMTa;
double sE;
double cE;
double sp_0;
double cp;
unsigned long v16;
GMTa = GMT;
lona = lon;
lata = ... | void gmt_polyconic (struct GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double sE, cE, sp, cp;
gmt_M_wind_lon (GMT, lon)
if (GMT_PROJ_IS_ZERO(lat)) {
*x = GMT->current.proj.EQ_RAD * lon * D2R;
*y = GMT->current.proj.EQ_RAD * (lat - GMT->current.proj.pole) * D2R;
}
else {
sincosd(lat, &... | gmt_polyconic | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
popen2 *gmt_popen2(const char *cmdline) {
popen2 *result;
__pid_t p;
int pipe_stdin[2];
int pipe_stdout[2];
unsigned long v5;
v5 = __readfsqword(0x28u);
pipe_stdin[0] = 0;
pipe_stdin[1] = 0;
pipe_stdout[0] = 0;
pipe_stdout[1] = 0;
if (pipe(pipe_stdin))
return 0;
if (pipe(pipe_stdout))
r... | struct popen2 * gmt_popen2 (const char *cmdline) {
struct popen2 *F = NULL;
pid_t p;
int pipe_stdin[2] = {0, 0}, pipe_stdout[2] = {0, 0};
if (pipe(pipe_stdin)) return NULL;
if (pipe(pipe_stdout)) return NULL;
printf("pipe_stdin[0] = %d, pipe_stdin[1] = %d\n", pipe_stdin[0], pipe_stdin[1]);
... | gmt_popen2 | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_prep_shore_polygons(GMT_CTRL *GMT, GMT_GSHHS_POL **p_old,
unsigned int np, bool sample, double step,
int anti_bin) {
int fixed;
size_t v7;
GMT_GSHHS_POL *v8;
GMT_GSHHS_POL *v9;
size_t v10;
GMT_GSHHS_POL *v11;
GMT_GSHHS_POL *v12;
size_t v13;... | int gmt_prep_shore_polygons (struct GMT_CTRL *GMT, struct GMT_GSHHS_POL **p_old, unsigned int np, bool sample, double step, int anti_bin) {
unsigned int k, np_new, n, n_use;
uint64_t start;
bool close;
size_t n_alloc;
double *xtmp = NULL, *ytmp = NULL;
struct GMT_GSHHS_POL *p = NULL;
p = *p_old;
... | gmt_prep_shore_polygons | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_prep_tmp_arrays(GMT_CTRL *GMT, size_t row, size_t n_cols) {
double **v3;
signed long mem_rows;
double v5;
size_t v6;
void **v7;
size_t col;
size_t cola;
if (GMT->hidden.mem_cols) {
if (n_cols > GMT->hidden.mem_cols) {
GMT->hidden.mem_coord = (double **)gmt_memory_func(
GMT,... | void gmt_prep_tmp_arrays (struct GMT_CTRL *GMT, size_t row, size_t n_cols) {
size_t col;
if (GMT->hidden.mem_cols == 0)
memory_init_tmp_arrays (GMT, n_cols);
else if (n_cols > GMT->hidden.mem_cols) {
GMT->hidden.mem_coord = gmt_M_memory (GMT, GMT->hidden.mem_coord, n_cols, double *);
for (col = GMT->h... | gmt_prep_tmp_arrays | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_project_init(GMT_CTRL *GMT, GMT_GRID_HEADER *header, double *inc,
unsigned int n_columns, unsigned int n_rows,
unsigned int dpi, unsigned int offset) {
double v7;
double v8;
int v10;
long v11;
GMT_Report(GMT->parent, 6u,
"gmt_project_init: IN: In... | int gmt_project_init (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header, double *inc, unsigned int n_columns, unsigned int n_rows, unsigned int dpi, unsigned int offset) {
GMT_Report (GMT->parent, GMT_MSG_DEBUG, "gmt_project_init: IN: Inc [%.12g/%.12g] n_columns/n_rows [%u/%u] dpi = %u offset = %u\n",
inc[0], inc... | gmt_project_init | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_psi(GMT_CTRL *P, double *zz, double *p) {
double v4;
double v5;
double v6;
int k;
double x0;
double e;
double sx;
double cx_0;
double z;
double z_8;
double g[2];
double dx_0[2];
double dd[2];
double d[2];
double n[2];
double gg[2];
double f[2];
double A[2];
double B[2];
... | double gmt_psi (struct GMT_CTRL *P, double zz[], double p[]) {
static double c[15] = { 0.99999999999999709182, 57.156235665862923517, -59.597960355475491248,
14.136097974741747174, -0.49191381609762019978, 0.33994649984811888699e-4,
0.46523628927048575665e-4, -0.98374475304879564677e-4, 0.15808870322491... | gmt_psi | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
char *gmt_putcolor(GMT_CTRL *GMT, double *rgb) {
double v2;
double v3;
double v4;
double v5;
int i;
if (*rgb >= -0.5) {
i = gmtlib_getrgb_index(GMT, rgb);
if (i < 0) {
if (fabs(*rgb - rgb[1]) >= 0.0001 || fabs(rgb[1] - rgb[2]) >= 0.0001) {
if (rgb[2] * 255.0 >= 0.00001)
v3 =... | char *gmt_putcolor (struct GMT_CTRL *GMT, double *rgb) {
static char text[GMT_LEN256] = {""};
int i;
if (rgb[0] < -0.5)
sprintf (text, "-");
else if ((i = gmtlib_getrgb_index (GMT, rgb)) >= 0)
snprintf (text, GMT_LEN256, "%s", gmt_M_color_name[i]);
else if (gmt_M_is_gray(rgb))
snprintf (text, GMT_LEN256, "... | gmt_putcolor | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_putdefaults(GMT_CTRL *GMT, char *this_file) {
char path[4104];
unsigned long v3;
v3 = __readfsqword(0x28u);
if (this_file) {
gmtinit_savedefaults(GMT, this_file);
} else {
memset(path, 0, 4096);
if (GMT->current.setting.run_mode == 1) {
sprintf(path, "%s/gmt.conf", GMT->parent->gwf... | void gmt_putdefaults (struct GMT_CTRL *GMT, char *this_file) {
if (this_file)
gmtinit_savedefaults (GMT, this_file);
else {
char path[PATH_MAX] = {""};
if (GMT->current.setting.run_mode == GMT_MODERN)
sprintf (path, "%s/gmt.conf", GMT->parent->gwf_dir);
else if (GMT->session.TMPDIR)
sprintf (path,... | gmt_putdefaults | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
char *gmt_putrgb(GMT_CTRL *GMT, double *rgb) {
double v2;
double v3;
double v4;
if (*rgb >= -0.5) {
if (rgb[2] * 255.0 >= 0.00001)
v2 = rgb[2] * 255.0;
else
v2 = 0.0;
if (rgb[1] * 255.0 >= 0.00001)
v3 = 255.0 * rgb[1];
else
v3 = 0.0;
if (*rgb * 255.0 >= 0.00001)
... | char *gmt_putrgb (struct GMT_CTRL *GMT, double *rgb) {
static char text[GMT_LEN256] = {""};
gmt_M_unused(GMT);
if (rgb[0] < -0.5)
sprintf (text, "-");
else
snprintf (text, GMT_LEN256, "%.5g/%.5g/%.5g", gmt_M_t255(rgb));
gmtinit_append_trans (text, rgb[3]);
return (text);
} | gmt_putrgb | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_quad_add(GMT_CTRL *GMT, GMT_QUAD *Q, double x) {
double v3;
double v4;
double v5;
double xa;
GMT_QUAD *Qa;
GMT_CTRL *GMTa;
unsigned int way;
unsigned int quad_no;
GMTa = GMT;
Qa = Q;
xa = x;
for (way = 0; way <= 1; ++way) {
gmt_lon_range_adjust(Qa->range[way], &xa);
if (Qa->min... | void gmt_quad_add (struct GMT_CTRL *GMT, struct GMT_QUAD *Q, double x) {
unsigned int way, quad_no;
gmt_M_unused(GMT);
if (gmt_M_is_dnan (x)) return;
for (way = 0; way < 2; way++) {
gmt_lon_range_adjust (Q->range[way], &x);
Q->min[way] = MIN (x, Q->min[way]);
Q->max[way] = MAX (x, Q->max[way]);
}
quad_n... | gmt_quad_add | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
unsigned int gmt_quad_finalize(GMT_CTRL *GMT, GMT_QUAD *Q) {
_BOOL4 way;
if (Q->quad[0] && Q->quad[3]) {
way = 0;
} else if (Q->quad[1] && Q->quad[2]) {
way = 1;
} else if (Q->quad[2] + Q->quad[1] + Q->quad[0] + Q->quad[3] == 2 &&
(Q->quad[0] && Q->quad[2] || Q->quad[1] && Q->quad[3])) {
... | unsigned int gmt_quad_finalize (struct GMT_CTRL *GMT, struct GMT_QUAD *Q) {
uint64_t n_quad;
unsigned int way;
n_quad = Q->quad[0] + Q->quad[1] + Q->quad[2] + Q->quad[3];
if (Q->quad[0] && Q->quad[3])
way = 0;
else if (Q->quad[1] && Q->quad[2])
way = 1;
else if (n_quad == 2 && ((Q->quad[0] && Q->quad[... | gmt_quad_finalize | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
GMT_QUAD *gmt_quad_init(GMT_CTRL *GMT, uint64_t n_items) {
GMT_QUAD *Q;
Q = (GMT_QUAD *)gmt_memory_func(GMT, 0, n_items, 0x48u, 0, "gmt_quad_init");
gmt_quad_reset(GMT, Q, n_items);
return Q;
} | struct GMT_QUAD * gmt_quad_init (struct GMT_CTRL *GMT, uint64_t n_items) {
struct GMT_QUAD *Q = gmt_M_memory (GMT, NULL, n_items, struct GMT_QUAD);
gmt_quad_reset (GMT, Q, n_items);
return (Q);
} | gmt_quad_init | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_quad_reset(GMT_CTRL *GMT, GMT_QUAD *Q, uint64_t n_items) {
GMT_QUAD *v3;
uint64_t i;
memset(Q, 0, 72 * n_items);
for (i = 0; i < n_items; ++i) {
v3 = &Q[i];
v3->min[1] = 1.797693134862316e308;
v3->min[0] = v3->min[1];
v3->max[1] = -1.797693134862316e308;
v3->max[0] = v3->max[1];
... | void gmt_quad_reset (struct GMT_CTRL *GMT, struct GMT_QUAD *Q, uint64_t n_items) {
uint64_t i;
gmt_M_unused(GMT);
gmt_M_memset (Q, n_items, struct GMT_QUAD);
for (i = 0; i < n_items; i++) {
Q[i].min[0] = Q[i].min[1] = +DBL_MAX;
Q[i].max[0] = Q[i].max[1] = -DBL_MAX;
Q[i].range[0] = GMT_IS_M180_TO_P180_RANG... | gmt_quad_reset | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_quantile(GMT_CTRL *GMT, double *x, double q, uint64_t n) {
uint64_t v5;
double v6;
double v7;
double v8;
double f;
uint64_t i_f;
if (!n)
return GMT->session.d_NaN;
if (q == 0.0)
return *x;
if (q == 100.0)
return x[n - 1];
v5 = n - 1;
if ((long)(n - 1) < 0)
v6 = (double)... | double gmt_quantile (struct GMT_CTRL *GMT, double *x, double q, uint64_t n) {
uint64_t i_f;
double p, f, df;
if (n == 0) return (GMT->session.d_NaN);
if (q == 0.0) return (x[0]);
while (n > 1 && gmt_M_is_dnan (x[n-1])) n--;
if (q == 100.0) return (x[n-1]);
f = (n - 1) * q / 100.0;
i_f = (uint64_t)fl... | gmt_quantile | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_quantile_f(GMT_CTRL *GMT, float *x, double q, uint64_t n) {
uint64_t v5;
double v6;
double v7;
double v8;
double f;
uint64_t i_f;
if (!n)
return GMT->session.d_NaN;
if (q == 0.0)
return *x;
if (q == 100.0)
return x[n - 1];
v5 = n - 1;
if ((long)(n - 1) < 0)
v6 = (double... | double gmt_quantile_f (struct GMT_CTRL *GMT, float *x, double q, uint64_t n) {
uint64_t i_f;
double p, f, df;
if (n == 0) return (GMT->session.d_NaN);
if (q == 0.0) return ((double)x[0]);
while (n > 1 && gmt_M_is_fnan (x[n-1])) n--;
if (q == 100.0) return ((double)x[n-1]);
f = (n - 1) * q / 100.0;
i_f... | gmt_quantile_f | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_quantile_weighted(GMT_CTRL *GMT, GMT_OBSERVATION *data, uint64_t n,
double quantile) {
uint64_t k;
uint64_t ka;
double weight_half;
double weight_halfa;
double weight_count;
weight_half = 0.0;
if (!n)
return GMT->session.d_NaN;
qsort(data, n, 8u, (__compar_fn... | double gmt_quantile_weighted (struct GMT_CTRL *GMT, struct GMT_OBSERVATION *data, uint64_t n, double quantile) {
uint64_t k;
double weight_half = 0.0, weight_count;
if (n == 0) return (GMT->session.d_NaN);
qsort (data, n, sizeof (struct GMT_OBSERVATION), gmtlib_compare_observation);
for (k = 0; k < n; k+... | gmt_quantile_weighted | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_rand(GMT_CTRL *GMT) {
uint64_t v1;
time_t v2;
clock_t v3;
double random_val;
while (!seed_10) {
v1 = getpid();
v2 = time(0);
v3 = clock();
seed_10 = mix64(v3, v2, v1);
srand(seed_10);
}
random_val = (double)rand() / 2147483647.0;
if (random_val == 0.0 || random_val >= 1.0... | double gmt_rand (struct GMT_CTRL *GMT) {
static unsigned seed = 0;
double random_val;
while (seed == 0) {
seed = (unsigned) mix64 (clock(), time(NULL), getpid());
srand (seed);
}
random_val = rand () / (double) RAND_MAX;
if (random_val == 0.0 || random_val >= 1.0)
return gmt_rand (GMT);
re... | gmt_rand | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_ras_read_grd(GMT_CTRL *GMT, GMT_GRID_HEADER *header, float *grid,
double *wesn, unsigned int *pad,
unsigned int complex_mode) {
double v7;
int v8;
size_t v9;
size_t v10;
double z_min;
double z_max;
size_t v13;
bool piping;
int first_col;
int last_col... | int gmt_ras_read_grd (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header, float *grid, double wesn[], unsigned int *pad, unsigned int complex_mode) {
bool piping = false, check;
int j, first_col, last_col, first_row, last_row;
unsigned int i, width_in, height_in, *actual_row = NULL;
size_t n2;
uin... | gmt_ras_read_grd | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_ras_read_grd_info(GMT_CTRL *GMT, GMT_GRID_HEADER *header) {
unsigned char u;
int i;
FILE *fp;
rasterfile h;
unsigned long v7;
v7 = __readfsqword(0x28u);
fp = 0;
if (!strcmp(header->name, "=")) {
fp = GMT->session.std[0];
} else {
fp = gmt_fopen(GMT, header->name, "rb");
if (!fp)
... | int gmt_ras_read_grd_info (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header) {
FILE *fp = NULL;
struct rasterfile h;
unsigned char u;
int i;
if (!strcmp (header->name, "=")) {
#ifdef SET_IO_MODE
gmt_setmode (GMT, GMT_IN);
#endif
fp = GMT->session.std[GMT_IN];
}
else if ((fp = gmt_fopen (GMT, header->na... | gmt_ras_read_grd_info | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_ras_write_grd(GMT_CTRL *GMT, GMT_GRID_HEADER *header, float *grid,
double *wesn, unsigned int *pad,
unsigned int complex_mode) {
uint32_t n_rows;
double v8;
double v9;
int v10;
uint32_t v11;
double v12;
size_t v13;
unsigned int width_out;
unsigned in... | int gmt_ras_write_grd (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header, float *grid, double wesn[], unsigned int *pad, unsigned int complex_mode) {
bool check;
unsigned int i, i2, j, width_out, height_out, n2, *actual_col = NULL;
int first_col, last_col, first_row, last_row;
uint64_t kk, ij, j... | gmt_ras_write_grd | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_ras_write_grd_info(GMT_CTRL *GMT, GMT_GRID_HEADER *header) {
uint32_t n_rows;
double v4;
FILE *fp;
rasterfile h;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (!strcmp(header->name, "=")) {
fp = GMT->session.std[1];
} else {
fp = gmt_fopen(GMT, header->name, "rb+");
if (!fp) {
... | int gmt_ras_write_grd_info (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header) {
FILE *fp = NULL;
struct rasterfile h;
if (!strcmp (header->name, "=")) {
#ifdef SET_IO_MODE
gmt_setmode (GMT, GMT_OUT);
#endif
fp = GMT->session.std[GMT_OUT];
}
else if ((fp = gmt_fopen (GMT, header->name, "rb+")) == NULL && ... | gmt_ras_write_grd_info | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int64_t gmt_rd_from_gymd(GMT_CTRL *GMT, int gy, int gm, int gd) {
int v5;
double v6;
double v7;
double v8;
int day_offset;
double s;
if (gm > 0 && gm <= 12 && gd > 0 && gd <= 31) {
if (gm > 2) {
if (gmtlib_is_gleap(gy))
v5 = -1;
else
v5 = -2;
day_offset = v5;
} e... | int64_t gmt_rd_from_gymd (struct GMT_CTRL *GMT, int gy, int gm, int gd) {
double s;
int64_t rd;
int day_offset, yearm1;
if (gm < 1 || gm > 12 || gd < 1 || gd > 31) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Syntax error: gmt_rd_from_gymd given bad month (%d) or day (%d).\n", gm, gd);
return 0;
}
if (gm... | gmt_rd_from_gymd | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_rdc2dt(GMT_CTRL *GMT, int64_t rd, double secs) {
return *(double *)((char *)&loc_412F0 + (_QWORD)GMT) *
(86400.0 *
((double)(int)(rd - GMT->current.setting.time_system.rata_die) -
GMT->current.setting.time_system.epoch_t0) +
secs);
} | double gmt_rdc2dt (struct GMT_CTRL *GMT, int64_t rd, double secs) {
double f_days;
f_days = (rd - GMT->current.setting.time_system.rata_die - GMT->current.setting.time_system.epoch_t0);
return ((f_days * GMT_DAY2SEC_F + secs) * GMT->current.setting.time_system.i_scale);
} | gmt_rdc2dt | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_read_img(GMT_CTRL *GMT, char *imgfile, GMT_GRID *Grid, double *in_wesn,
double scale, unsigned int mode, double lat, bool init) {
int v9;
GMT_GRID_HEADER *header;
int v11;
double v12;
double v13;
double v14;
double v15;
unsigned int *pad;
long v17;
int v18;
double v19;
d... | int gmt_read_img (struct GMT_CTRL *GMT, char *imgfile, struct GMT_GRID *Grid, double *in_wesn, double scale, unsigned int mode, double lat, bool init) {
int status, first_i;
unsigned int min, actual_col, n_cols, row, col;
uint64_t ij;
off_t n_skip;
int16_t *i2 = NULL;
uint16_t *u2 = NULL;
char file[GMT_BUF... | gmt_read_img | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_reenable_bhi_opts(GMT_CTRL *GMT) {
GMT->common.i.active = GMT->common.i.orig;
GMT->current.setting.io_header[0] = GMT->current.setting.io_header_orig;
if (GMT->common.b.bin_primary) {
GMT->common.b.active[0] = 1;
GMT->common.b.bin_primary = 0;
GMT->current.io.input =
(void *(*)(GMT_CT... | void gmt_reenable_bhi_opts (struct GMT_CTRL *GMT) {
GMT->common.i.active = GMT->common.i.orig;
GMT->current.setting.io_header[GMT_IN] = GMT->current.setting.io_header_orig;
if (GMT->common.b.bin_primary) {
GMT->common.b.active[GMT_IN] = true;
GMT->common.b.bin_primary = false;
GMT->current.io.input = &gmtio... | gmt_reenable_bhi_opts | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_refpoint_syntax(GMT_CTRL *GMT, char *option, char *string,
unsigned int kind, unsigned int part) {
char parta;
unsigned int shift;
char *tab[2];
char *type[7];
char *just[7];
unsigned long v11;
parta = part;
v11 = __readfsqword(0x28u);
type[0] = "logo";
type[1] = "... | void gmt_refpoint_syntax (struct GMT_CTRL *GMT, char *option, char *string, unsigned int kind, unsigned int part) {
char *type[GMT_ANCHOR_NTYPES] = {"logo", "image", "legend", "color-bar", "insert", "map scale", "map rose"}, *tab[2] = {"", " "};
unsigned int shift = (kind == GMT_ANCHOR_INSERT) ? 1 : 0;
if (pa... | gmt_refpoint_syntax | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_remove_dir(GMTAPI_CTRL *API, char *dir, bool recreate) {
unsigned int k;
int error;
unsigned int n_files;
char **filelist;
GMT_CTRL *GMT;
unsigned long v10;
v10 = __readfsqword(0x28u);
error = 0;
filelist = 0;
GMT = API->GMT;
if (access(dir, 0)) {
GMT_Report(API, 1u, "No directory nam... | int gmt_remove_dir (struct GMTAPI_CTRL *API, char *dir, bool recreate) {
unsigned int n_files, k;
int error = GMT_NOERROR;
char **filelist = NULL;
struct GMT_CTRL *GMT = API->GMT;
if (access (dir, F_OK)) {
GMT_Report (API, GMT_MSG_NORMAL, "No directory named %s\n", dir);
return GMT_FILE_NOT_FOUND;
}
chd... | gmt_remove_dir | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_remove_file(GMT_CTRL *GMT, const char *file) {
int *v2;
char *v3;
GMT_Report(GMT->parent, 6u, "Delete %s\n", file);
if (!remove(file))
return 0;
v2 = __errno_location();
v3 = strerror(*v2);
GMT_Report(GMT->parent, 1u, "Failed to remove %s! [remove error: %s]\n", file,
v3);
retu... | int gmt_remove_file (struct GMT_CTRL *GMT, const char *file) {
GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Delete %s\n", file);
if (remove (file)) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Failed to remove %s! [remove error: %s]\n", file, strerror (errno));
return errno;
}
return GMT_NOERROR;
} | gmt_remove_file | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_rename_file(GMT_CTRL *GMT, const char *oldfile, const char *newfile) {
int *v3;
char *v4;
int *v5;
char *v6;
int *v8;
char *v9;
int *v10;
char *v11;
int *v12;
char *v13;
int *v14;
char *v15;
int *v16;
char *v17;
int *v18;
char *chunk;
FILE *fpi;
FILE *fpo;
size_t ni;
GMT... | int gmt_rename_file (struct GMT_CTRL *GMT, const char *oldfile, const char *newfile) {
GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Rename %s -> %s\n", oldfile, newfile);
errno = GMT_NOERROR;
if (rename (oldfile, newfile)) {
size_t ni, no;
char *chunk = NULL;
FILE *fpi = NULL, *fpo = NULL;
GMT_Report (GMT->... | gmt_rename_file | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
uint64_t gmt_resample_path(GMT_CTRL *GMT, double **x, double **y, uint64_t n_in,
double step_out, GMT_enum_track mode) {
if (GMT->current.io.col_type[0][0] == 4 &&
GMT->current.io.col_type[0][1] == 2)
return vector_resample_path_spherical(GMT, x, y, n_in, step_out, mode);
else
... | uint64_t gmt_resample_path (struct GMT_CTRL *GMT, double **x, double **y, uint64_t n_in, double step_out, enum GMT_enum_track mode) {
uint64_t n_out;
if (gmt_M_is_geographic (GMT, GMT_IN))
n_out = vector_resample_path_spherical (GMT, x, y, n_in, step_out, mode);
else
n_out = vector_resample_path_car... | gmt_resample_path | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_reset_meminc(GMT_CTRL *GMT) { GMT->session.min_meminc = 1; } | void gmt_reset_meminc (struct GMT_CTRL *GMT) {
GMT->session.min_meminc = GMT_MIN_MEMINC;
} | gmt_reset_meminc | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_rgb_syntax(GMT_CTRL *GMT, char option, char *string) {
if (*string == 32)
GMT_Report(GMT->parent, 1u, "Syntax error -%c option. Correct syntax:\n",
(unsigned int)option);
gmt_message(GMT, "\t-%c<color> %s Specify <color> as one of:\n",
(unsigned int)option, string);
gmt_... | void gmt_rgb_syntax (struct GMT_CTRL *GMT, char option, char *string) {
if (string[0] == ' ') GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Syntax error -%c option. Correct syntax:\n", option);
gmt_message (GMT, "\t-%c<color> %s Specify <color> as one of:\n", option, string);
gmt_message (GMT, "\t 1) <gray> or <red>/... | gmt_rgb_syntax | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_eckert4(GMT_CTRL *GMT, double y) {
double v2;
double v4;
double ya;
ya = GMT->current.proj.i_scale[1] *
(y - *(double *)((char *)&loc_12BD28 + (_QWORD)GMT));
if (fabs(GMT->current.proj.k4_iy * ya) < 1.0)
v2 = asin(GMT->current.proj.k4_iy * ya);
else
v2 = copysign(1.570796326... | double gmt_right_eckert4 (struct GMT_CTRL *GMT, double y) {
double x, phi;
y -= GMT->current.proj.origin[GMT_Y];
y *= GMT->current.proj.i_scale[GMT_Y];
phi = d_asin (y * GMT->current.proj.k4_iy);
x = GMT->current.proj.k4_x * D2R * (GMT->common.R.wesn[XHI] - GMT->current.proj.central_meridian) * (1.0 + cos (phi));... | gmt_right_eckert4 | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_eckert6(GMT_CTRL *GMT, double y) {
double v3;
v3 = GMT->current.proj.k6_r * 0.0174532925199433 *
(GMT->common.R.wesn[1] - GMT->current.proj.central_meridian);
return GMT->current.proj.origin[0] +
GMT->current.proj.scale[0] *
((cos(GMT->current.proj.k6_ir *
... | double gmt_right_eckert6 (struct GMT_CTRL *GMT, double y) {
double x, phi;
y -= GMT->current.proj.origin[GMT_Y];
y *= GMT->current.proj.i_scale[GMT_Y];
phi = 0.5 * y * GMT->current.proj.k6_ir;
x = GMT->current.proj.k6_r * D2R * (GMT->common.R.wesn[XHI] - GMT->current.proj.central_meridian) * (1.0 + cos (phi));
r... | gmt_right_eckert6 | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_genper(GMT_CTRL *GMT, double y) {
double v4;
v4 = *(double *)((char *)&loc_12E490 + (_QWORD)GMT);
if (map_right_circle(GMT, y) <= v4)
return map_right_circle(GMT, y);
else
return *(double *)((char *)&loc_12E490 + (_QWORD)GMT);
} | GMT_LOCAL double gmt_right_genper (struct GMT_CTRL *GMT, double y)
{
return (MIN (GMT->current.map.width, map_right_circle (GMT, y)));
} | gmt_right_genper | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_polyconic(GMT_CTRL *GMT, double y) {
double x[2];
*(_QWORD *)&x[1] = __readfsqword(0x28u);
proj_ipolyconic_sub(GMT,
GMT->current.proj.i_scale[1] *
(y - *(double *)((char *)&loc_12BD28 + (_QWORD)GMT)),
GMT->common.R.wesn[1], x)... | double gmt_right_polyconic (struct GMT_CTRL *GMT, double y) {
double x;
y -= GMT->current.proj.origin[GMT_Y];
y *= GMT->current.proj.i_scale[GMT_Y];
proj_ipolyconic_sub (GMT, y, GMT->common.R.wesn[XHI], &x);
return (x * GMT->current.proj.scale[GMT_X] + GMT->current.proj.origin[GMT_X]);
} | gmt_right_polyconic | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_sinusoidal(GMT_CTRL *GMT, double y) {
double v3;
v3 = *(double *)((char *)&loc_12BDF0 + (_QWORD)GMT) *
(GMT->common.R.wesn[1] - GMT->current.proj.central_meridian) *
0.0174532925199433;
return GMT->current.proj.origin[0] +
GMT->current.proj.scale[0] *
(cos(GMT... | double gmt_right_sinusoidal (struct GMT_CTRL *GMT, double y) {
double x, lat;
y -= GMT->current.proj.origin[GMT_Y];
y *= GMT->current.proj.i_scale[GMT_Y];
lat = y * GMT->current.proj.i_EQ_RAD;
x = GMT->current.proj.EQ_RAD * (GMT->common.R.wesn[XHI] - GMT->current.proj.central_meridian) * D2R * cos (lat);
return (... | gmt_right_sinusoidal | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
double gmt_right_winkel(GMT_CTRL *GMT, double y) {
double c;
double phi;
double x[2];
*(_QWORD *)&x[1] = __readfsqword(0x28u);
proj_iwinkel_sub(GMT,
GMT->current.proj.i_scale[1] *
(y - *(double *)((char *)&loc_12BD28 + (_QWORD)GMT)),
&phi);
j_gmt... | double gmt_right_winkel (struct GMT_CTRL *GMT, double y) {
double c, phi, x;
y -= GMT->current.proj.origin[GMT_Y];
y *= GMT->current.proj.i_scale[GMT_Y];
proj_iwinkel_sub (GMT, y, &phi);
gmt_geo_to_xy (GMT, GMT->current.proj.central_meridian + 180.0, phi, &x, &c);
return (x);
} | gmt_right_winkel | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_robinson(GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double n_cy;
double lona;
double X;
double Y;
for (lona = lon - GMT->current.proj.central_meridian; lona < -180.00000001;
lona = lona + 360.0)
;
while (lona > 180.00000001)
lona = lona - 360.0;
X = proj_robins... | void gmt_robinson (struct GMT_CTRL *GMT, double lon, double lat, double *x, double *y) {
double phi, X, Y;
gmt_M_wind_lon (GMT, lon)
phi = fabs (lat);
X = proj_robinson_spline (GMT, phi, GMT->current.proj.n_phi, GMT->current.proj.n_X, GMT->current.proj.n_x_coeff);
Y = proj_robinson_spline (GMT, phi, GMT->cur... | gmt_robinson | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
char *gmt_runtime_libdir(char *result) {
char *p;
Dl_info info;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (!dladdr(gmt_runtime_libdir, &info) || *info.dli_fname != 47)
return 0;
if (!realpath(info.dli_fname, result))
return 0;
p = strrchr(result, 47);
if (p) {
if (p != result)
*... | char *gmt_runtime_libdir (char *result) {
#ifdef HAVE_DLADDR
char *p;
Dl_info info;
if ( dladdr (gmt_runtime_libdir, &info) && info.dli_fname[0] == '/') {
if (realpath (info.dli_fname, result) == NULL)
return NULL;
if ( (p = strrchr (result, '/')) && p != result )
*p = '\0';
#ifdef DEBUG_RUNPATH
f... | gmt_runtime_libdir | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
bool gmt_same_longitude(double a, double b) {
while (a < 0.0)
a = a + 360.0;
while (a > 360.0)
a = a - 360.0;
while (b < 0.0)
b = b + 360.0;
while (b > 360.0)
b = b - 360.0;
return doubleAlmostEqualUlpsAndAbs(a, b, 1.110223024625157e-15, 5);
} | static inline bool gmt_same_longitude (double a, double b) {
while (a < 0.0) a += 360.0;
while (a > 360.0) a -= 360.0;
while (b < 0.0) b += 360.0;
while (b > 360.0) b -= 360.0;
return doubleAlmostEqualZero (a, b);
} | gmt_same_longitude | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_scale_and_offset_f(GMT_CTRL *GMT, float *data, size_t length,
double scale, double offset) {
float v5;
float v6;
float scale_f;
float offset_f;
v5 = scale;
scale_f = v5;
v6 = offset;
offset_f = v6;
if (scale_f != 1.0 || v6 != 0.0) {
if ((fabs(scale) > 1.797693... | void gmt_scale_and_offset_f (struct GMT_CTRL *GMT, float *data, size_t length, double scale, double offset) {
float scale_f = (float)scale;
float offset_f = (float)offset;
if (scale_f == 1.0 && offset_f == 0.0)
return;
if (!isnormal (scale)) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Scale must be a n... | gmt_scale_and_offset_f | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_scanf(GMT_CTRL *GMT, char *s, unsigned int expectation, double *val) {
int result;
char *sa;
int type;
double x;
int64_t rd;
size_t callen;
size_t clocklen;
char *p;
char *p2;
char calstring[64];
char clockstring[72];
unsigned long v17;
sa = s;
v17 = __readfsqword(0x28u);
memset(c... | int gmt_scanf (struct GMT_CTRL *GMT, char *s, unsigned int expectation, double *val) {
int type;
char calstring[GMT_LEN64] = {""}, clockstring[GMT_LEN64] = {""}, *p = NULL;
double x;
int64_t rd;
size_t callen, clocklen;
if (s[0] == '\"') {
callen = strlen (s) - 1;
if (s[callen] == '\"') { s[calle... | gmt_scanf | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_scanf_arg(GMT_CTRL *GMT, char *s, unsigned int expectation,
double *val) {
int expectationa;
char c;
expectationa = expectation;
if (expectation == 4096) {
c = s[strlen(s) - 1];
if (strchr(s, 84)) {
expectationa = 32;
} else if (c == 116) {
expectationa = 32;
... | int gmt_scanf_arg (struct GMT_CTRL *GMT, char *s, unsigned int expectation, double *val) {
char c;
if (expectation == GMT_IS_UNKNOWN) {
c = s[strlen(s)-1];
if (strchr (s, (int)'T'))
expectation = GMT_IS_ARGTIME;
else if (c == 't')
expectation = GMT_IS_ARGTIME;
else if (strchr ("WwEe", (... | gmt_scanf_arg | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_segmentize_syntax(GMT_CTRL *GMT, char option, unsigned int mode) {
char *verb[2];
char *count[2];
unsigned long v6;
v6 = __readfsqword(0x28u);
verb[0] = "Form";
verb[1] = "Draw";
count[0] = "four";
count[1] = "three";
gmt_message(
GMT,
"\t-%c Alter the way points are connected an... | void gmt_segmentize_syntax (struct GMT_CTRL *GMT, char option, unsigned int mode) {
char *verb[2] = {"Form", "Draw"}, *count[2] = {"four", "three"};
gmt_message (GMT, "\t-%c Alter the way points are connected and the data are segmented.\n", option);
gmt_message (GMT, "\t Append one of %s line connection schemes... | gmt_segmentize_syntax | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_R_from_grd(GMT_CTRL *GMT, GMT_GRID_HEADER *header) {
memcpy(GMT->common.R.wesn, header->wesn, 0x20u);
if (header->grdtype == 2) {
if (fabs(fabs(GMT->common.R.wesn[1] - GMT->common.R.wesn[0]) - 360.0) >=
0.00000001 &&
fabs((double)(int)header->n_columns * header->inc[0] - 360.0) ... | void gmt_set_R_from_grd (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header) {
gmt_M_memcpy (GMT->common.R.wesn, header->wesn, 4, double);
if (header->grdtype != GMT_GRID_GEOGRAPHIC_EXACT360_NOREPEAT) return;
if (!gmt_M_360_range (GMT->common.R.wesn[XLO], GMT->common.R.wesn[XHI]) && fabs (header->n_columns * hea... | gmt_set_R_from_grd | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
char gmt_set_V(int mode) {
char val;
val = 0;
switch (mode) {
case 0:
val = 113;
break;
case 1:
val = 110;
break;
case 2:
val = 116;
break;
case 3:
val = 99;
break;
case 4:
val = 118;
break;
case 5:
val = 108;
break;
case 6:
val = 100;
break;
... | char gmt_set_V (int mode) {
char val = 0;
switch (mode) {
case GMT_MSG_QUIET: val = 'q'; break;
case GMT_MSG_NORMAL: val = 'n'; break;
case GMT_MSG_TICTOC: val = 't'; break;
case GMT_MSG_COMPAT: val = 'c'; break;
case GMT_MSG_VERBOSE: val = 'v'; break;
case GMT_MSG_LONG_VERBOSE: val = 'l'; break;
... | gmt_set_V | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_cartesian(GMT_CTRL *GMT, unsigned int dir) {
GMT->current.io.col_type[(unsigned long)dir][0] = 1;
GMT->current.io.col_type[(unsigned long)dir][1] = 1;
} | void gmt_set_cartesian (struct GMT_CTRL *GMT, unsigned int dir) {
GMT->current.io.col_type[dir][GMT_X] = GMT_IS_FLOAT;
GMT->current.io.col_type[dir][GMT_Y] = GMT_IS_FLOAT;
} | gmt_set_cartesian | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_cols(GMT_CTRL *GMT, unsigned int direction, uint64_t expected) {
char v4;
uint64_t v5;
char type;
uint64_t col;
if (direction >= 2)
return 29;
if (!direction && GMT->common.b.ncol[0])
return 0;
if (!expected && (direction == 1 || GMT->common.b.active[direction])) {
GMT_Report(GMT-... | int gmt_set_cols (struct GMT_CTRL *GMT, unsigned int direction, uint64_t expected) {
static char *mode[2] = {"input", "output"};
if (! (direction == GMT_IN || direction == GMT_OUT)) return (GMT_NOT_A_VALID_DIRECTION);
if (direction == GMT_IN && GMT->common.b.ncol[direction]) return (GMT_OK);
if (expe... | gmt_set_cols | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_datum(GMT_CTRL *GMT, char *text, GMT_DATUM *D) {
int i;
int k;
double t;
char ellipsoid[256];
char dr[256];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (*text && *text != 45) {
if (strchr(text, 58)) {
memset(ellipsoid, 0, sizeof(ellipsoid));
memset(dr, 0, sizeof(dr));
... | int gmt_set_datum (struct GMT_CTRL *GMT, char *text, struct GMT_DATUM *D) {
int i;
double t;
if (text[0] == '\0' || text[0] == '-') {
if ((i = gmt_get_ellipsoid (GMT, "WGS-84")) >= 0) {
gmt_M_memset (D->xyz, 3, double);
D->a = GMT->current.setting.ref_ellipsoid[i].eq_radius;
D->f = GMT->current.setting... | gmt_set_datum | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_geographic(GMT_CTRL *GMT, unsigned int dir) {
GMT->current.io.col_type[(unsigned long)dir][0] = 4;
GMT->current.io.col_type[(unsigned long)dir][1] = 2;
if (!dir)
gmt_init_distaz(GMT, 101, 2u, 0);
} | void gmt_set_geographic (struct GMT_CTRL *GMT, unsigned int dir) {
GMT->current.io.col_type[dir][GMT_X] = GMT_IS_LON;
GMT->current.io.col_type[dir][GMT_Y] = GMT_IS_LAT;
if (dir == GMT_IN) gmt_init_distaz (GMT, GMT_MAP_DIST_UNIT, GMT_GREATCIRCLE, GMT_MAP_DIST);
} | gmt_set_geographic | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_grddim(GMT_CTRL *GMT, GMT_GRID_HEADER *h) {
long v2;
h->n_columns = lrint((h->wesn[1] - h->wesn[0]) / h->inc[0] + 1.0 -
(double)(int)h->registration);
h->n_rows = lrint((h->wesn[3] - h->wesn[2]) / h->inc[1] + 1.0 -
(double)(int)h->registration);
h->mx = h... | void gmt_set_grddim (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *h) {
h->n_columns = gmt_M_grd_get_nx (GMT, h);
h->n_rows = gmt_M_grd_get_ny (GMT, h);
h->mx = gmt_M_grd_get_nxpad (h, h->pad);
h->my = gmt_M_grd_get_nypad (h, h->pad);
h->nm = gmt_M_grd_get_nm (h);
h->size = gmt_M_grd_get_size (h);
h->xy_... | gmt_set_grddim | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_grdinc(GMT_CTRL *GMT, GMT_GRID_HEADER *h) {
h->inc[0] =
(h->wesn[1] - h->wesn[0]) / (double)(h->n_columns + h->registration - 1);
h->inc[1] =
(h->wesn[3] - h->wesn[2]) / (double)(h->n_rows + h->registration - 1);
h->r_inc[0] = 1.0 / h->inc[0];
h->r_inc[1] = 1.0 / h->inc[1];
} | void gmt_set_grdinc (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *h) {
gmt_M_unused(GMT);
h->inc[GMT_X] = gmt_M_get_inc (GMT, h->wesn[XLO], h->wesn[XHI], h->n_columns, h->registration);
h->inc[GMT_Y] = gmt_M_get_inc (GMT, h->wesn[YLO], h->wesn[YHI], h->n_rows, h->registration);
h->r_inc[GMT_X] = 1.0 / h->inc[GMT... | gmt_set_grdinc | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_levels(GMT_CTRL *GMT, char *info, GMT_SHORE_SELECT *I) {
double v3;
int n;
char *p;
if (strstr(info, "+as")) {
I->antarctica_mode = 2;
} else if (strstr(info, "+aS")) {
I->antarctica_mode = 3;
} else if (strstr(info, "+ai")) {
I->antarctica_mode = 0;
} else if (strstr(info, "+ag")... | int gmt_set_levels (struct GMT_CTRL *GMT, char *info, struct GMT_SHORE_SELECT *I) {
int n;
char *p = NULL;
if (strstr (info, "+as")) I->antarctica_mode = GSHHS_ANTARCTICA_SKIP;
else if (strstr (info, "+aS")) I->antarctica_mode = GSHHS_ANTARCTICA_SKIP_INV;
else if (strstr (info, "+ai")) I->antarctica_mode =... | gmt_set_levels | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_line_resampling(GMT_CTRL *GMT, bool active, unsigned int mode) {
if (GMT->current.io.col_type[0][0] == 4 &&
GMT->current.io.col_type[0][1] == 2) {
if (active && !mode)
GMT->current.map.path_mode = 1;
} else if (!active) {
GMT->current.map.path_mode = 1;
}
} | void gmt_set_line_resampling (struct GMT_CTRL *GMT, bool active, unsigned int mode) {
if (gmt_M_is_geographic (GMT, GMT_IN)) {
if (active && mode == GMT_STAIRS_OFF) GMT->current.map.path_mode = GMT_LEAVE_PATH;
}
else {
if (!active) GMT->current.map.path_mode = GMT_LEAVE_PATH;
}
} | gmt_set_line_resampling | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_measure_unit(GMT_CTRL *GMT, char unit) {
signed int k;
k = gmtinit_get_unit(GMT, unit);
if (k >= 0) {
GMT->current.setting.proj_length_unit = k;
return 0;
} else {
GMT_Report(GMT->parent, 1u,
"Error: Bad plot measure selected (%c); use c, i, or p.\n",
(unsi... | int gmt_set_measure_unit (struct GMT_CTRL *GMT, char unit) {
int k;
if ((k = gmtinit_get_unit (GMT, unit)) < 0) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "Error: Bad plot measure selected (%c); use c, i, or p.\n", unit);
return (GMT_MAP_BAD_MEASURE_UNIT);
}
GMT->current.setting.proj_length_unit = k;
return (... | gmt_set_measure_unit | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_meminc(GMT_CTRL *GMT, size_t increment) {
GMT->session.min_meminc = increment;
} | void gmt_set_meminc (struct GMT_CTRL *GMT, size_t increment) {
GMT->session.min_meminc = increment;
} | gmt_set_meminc | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_missing_options(GMT_CTRL *GMT, char *options) {
int id;
int j;
int err;
char str[3];
unsigned long v7;
v7 = __readfsqword(0x28u);
err = 0;
memset(str, 0, sizeof(str));
if (!GMT->current.setting.run_mode)
return 0;
if (*((_BYTE *)&loc_12F35D + (_QWORD)GMT))
return 0;
if (!optio... | int gmt_set_missing_options (struct GMT_CTRL *GMT, char *options) {
int id = 0, j, err = 0;
char str[3] = {""};
if (GMT->current.setting.run_mode == GMT_CLASSIC) return GMT_NOERROR;
if (GMT->current.ps.initialize) return GMT_NOERROR;
assert (options);
for (j = 0; options[j]; j++) {
assert (strchr... | gmt_set_missing_options | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_outgrid(GMT_CTRL *GMT, char *file, bool separate, GMT_GRID *G,
GMT_GRID **Out) {
if (separate || file && !strncmp(file, "@GMTAPI@-", 9u) ||
G->alloc_mode == GMT_enum_alloc_GMT_ALLOC_EXTERNALLY) {
*Out = (GMT_GRID *)GMT_Duplicate_Data(GMT->parent, 1u, 2u, G);
if (*Out) {
... | int gmt_set_outgrid (struct GMT_CTRL *GMT, char *file, bool separate, struct GMT_GRID *G, struct GMT_GRID **Out) {
if (separate || gmt_M_file_is_memory (file) || G->alloc_mode == GMT_ALLOC_EXTERNALLY) {
if ((*Out = GMT_Duplicate_Data (GMT->parent, GMT_IS_GRID, GMT_DUPLICATE_DATA, G)) == NULL) {
GMT_Re... | gmt_set_outgrid | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_pad(GMT_CTRL *GMT, unsigned int pad) {
*(_DWORD *)((char *)&loc_4148C + (_QWORD)GMT) = pad;
*(_DWORD *)((char *)&loc_41488 + (_QWORD)GMT) =
*(_DWORD *)((char *)&loc_4148C + (_QWORD)GMT);
GMT->current.io.pad[1] = *(_DWORD *)((char *)&loc_41488 + (_QWORD)GMT);
GMT->current.io.pad[0] = GMT->curr... | void gmt_set_pad (struct GMT_CTRL *GMT, unsigned int pad) {
GMT->current.io.pad[XLO] = GMT->current.io.pad[XHI] = GMT->current.io.pad[YLO] = GMT->current.io.pad[YHI] = pad;
} | gmt_set_pad | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_psfilename(GMT_CTRL *GMT) {
int v1;
if (GMT->parent->gwf_dir) {
sprintf((char *)&loc_12F56F + (_QWORD)GMT, "%s/gmt.ps0",
GMT->parent->gwf_dir);
} else {
GMT_Report(
GMT->parent, 1u,
"GMT WorkFlow directory not set??? Writing to current dir instead\n");
*(_QWORD... | int gmt_set_psfilename (struct GMT_CTRL *GMT) {
int k;
if (GMT->parent->gwf_dir == NULL) {
GMT_Report (GMT->parent, GMT_MSG_NORMAL, "GMT WorkFlow directory not set??? Writing to current dir instead\n");
strcpy (GMT->current.ps.filename, "gmt.ps0");
}
else
sprintf (GMT->current.ps.filename, "%s/gmt.ps0", GMT-... | gmt_set_psfilename | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
int gmt_set_resolution(GMT_CTRL *GMT, char *res, char opt) {
long v3;
int base;
double area;
double i_scale;
switch (*res) {
case 'a':
if (GMT->common.J.active) {
i_scale = 1.0 / (GMT->current.proj.scale[0] * 0.0254);
if (i_scale <= 100000000.0) {
if (i_scale <= 50000000.0) {
... | int gmt_set_resolution (struct GMT_CTRL *GMT, char *res, char opt) {
int base;
char *choice = "fhilc";
switch (*res) {
case 'a':
if (GMT->common.J.active) {
double i_scale = 1.0 / (0.0254 * GMT->current.proj.scale[GMT_X]);
if (i_scale > GMT_CRUDE_THRESHOLD)
base = 4;
else if (i_scale > G... | gmt_set_resolution | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_seg_minmax(GMT_CTRL *GMT, unsigned int geometry,
unsigned int n_cols, GMT_DATASEGMENT *S) {
double *v4;
uint64_t row;
uint64_t col;
if (!S->min)
S->min = (double *)gmt_memory_func(GMT, 0, S->n_columns, 8u, 0,
"gmt_set_seg_minmax");... | void gmt_set_seg_minmax (struct GMT_CTRL *GMT, unsigned int geometry, unsigned int n_cols, struct GMT_DATASEGMENT *S) {
uint64_t row, col;
if (!S->min) S->min = gmt_M_memory (GMT, NULL, S->n_columns, double);
if (!S->max) S->max = gmt_M_memory (GMT, NULL, S->n_columns, double);
if (S->n_rows == 0) return;
i... | gmt_set_seg_minmax | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_seg_polar(GMT_CTRL *GMT, GMT_DATASEGMENT *S) {
int v2;
int answer;
if ((GMT->current.io.col_type[0][0] & 6) != 0 && S->n_columns > 1) {
answer = gmtlib_determine_pole(GMT, *S->data, S->data[1], S->n_rows);
if (answer != -99) {
if (answer) {
if (answer >= 0)
v2 = 1;
... | void gmt_set_seg_polar (struct GMT_CTRL *GMT, struct GMT_DATASEGMENT *S) {
int answer;
if ((GMT->current.io.col_type[GMT_IN][GMT_X] & GMT_IS_GEO) == 0 || S->n_columns < 2) return;
if ((answer = gmtlib_determine_pole (GMT, S->data[GMT_X], S->data[GMT_Y], S->n_rows)) == -99) return;
if (answer) {
S->pole... | gmt_set_seg_polar | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_segmentheader(GMT_CTRL *GMT, int direction, bool true_false) {
GMT->current.io.multi_segments[direction] = true_false;
} | void gmt_set_segmentheader (struct GMT_CTRL *GMT, int direction, bool true_false) {
GMT->current.io.multi_segments[direction] = true_false;
} | gmt_set_segmentheader | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
void gmt_set_tableheader(GMT_CTRL *GMT, int direction, bool true_false) {
GMT->current.setting.io_header[direction] = true_false;
} | void gmt_set_tableheader (struct GMT_CTRL *GMT, int direction, bool true_false) {
GMT->current.setting.io_header[direction] = true_false;
} | gmt_set_tableheader | gmt-5.4.4 | sci-geosciences | O0/sci-geosciences/gmt-5.4.4/libgmt.so.5.4.4 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.