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 usbi_list_free(usbi *s) {
usbi *n;
while (s) {
n = s->next;
usbi_free(s);
s = n;
}
} | void usbi_list_free(usbi *s) {
usbi *n;
while (s != NULL) {
n = s->next;
usbi_free(s);
s = n;
}
} | usbi_list_free | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
usbi *usbi_new() { return g_malloc0_n(1, 64); } | usbi *usbi_new() { return g_new0(usbi, 1); } | usbi_new | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_build_fn(const gchar *base, const gchar *name) {
const char *v3;
gboolean slash;
char *ret;
if (!base)
return 0;
slash = base[strlen(base) - 1] != 47;
if (name) {
if (*name == 47)
slash = 0;
if (slash)
v3 = "/";
else
v3 = (const char *)&unk_5E5D7;
ret = g_s... | gchar *util_build_fn(const gchar *base, const gchar *name) {
gchar *ret = NULL;
gboolean slash = TRUE;
if (!base)
return NULL;
if (base[strlen(base) - 1] == '/')
slash = FALSE;
if (name) {
if (*name == '/')
slash = FALSE;
ret = g_strdup_printf("%s%s%s", base, slash ? "/" : "", name);
... | util_build_fn | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_canonicalize_path(const gchar *path) {
char *resolved;
gchar *ret;
resolved = realpath(path, 0);
ret = (gchar *)g_strdup(resolved);
free(resolved);
return ret;
} | gchar *util_canonicalize_path(const gchar *path) {
char *resolved = realpath(path, NULL);
gchar *ret = g_strdup(resolved);
free(resolved);
return ret;
} | util_canonicalize_path | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void util_compress_space(gchar *str) {
gchar *v1;
int n;
gchar *p;
gchar *t;
p = str;
t = str;
if (str && *str) {
n = 0;
while (*p) {
if (((*__ctype_b_loc())[*p] & 0x2000) != 0) {
if (!n) {
v1 = t++;
*v1 = 32;
}
++n;
} else {
n = 0;
... | void util_compress_space(gchar *str) {
gchar *p = str, *t = str;
if (str && *str) {
int n = 0;
while (*p) {
if (isspace(*p)) {
if (!n)
*t++ = ' ';
n++;
} else {
n = 0;
if (t != p)
*t = *p;
t++;
}
p++;
}
}
if (t != p)... | util_compress_space | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gsize util_count_lines(const gchar *str) {
unsigned int v1;
long count;
gchar **lines;
count = 0;
if (str) {
lines = (gchar **)g_strsplit(str, "\n", 0);
v1 = g_strv_length(lines);
count = v1;
if (v1 && !*lines[v1 - 1])
count = v1 - 1LL;
g_strfreev(lines);
}
return count;
} | gsize util_count_lines(const gchar *str) {
gchar **lines = NULL;
gsize count = 0;
if (str) {
lines = g_strsplit(str, "\n", 0);
count = g_strv_length(lines);
if (count && *lines[count - 1] == 0) {
count--;
}
g_strfreev(lines);
}
return count;
} | util_count_lines | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_escape_markup(gchar *v, gboolean replacing) {
gchar *clean;
gchar **vl;
gchar **vla;
gchar **vlb;
gchar *tmp;
gchar *tmpa;
if (!v)
return 0;
vl = (gchar **)g_strsplit(v, "&", 0xFFFFFFFFLL);
if ((unsigned int)g_strv_length(vl) <= 1)
clean = (gchar *)g_strdup(v);
else
clean = ... | gchar *util_escape_markup(gchar *v, gboolean replacing) {
gchar *clean, *tmp;
gchar **vl;
if (v == NULL)
return NULL;
vl = g_strsplit(v, "&", -1);
if (g_strv_length(vl) > 1)
clean = g_strjoinv("&", vl);
else
clean = g_strdup(v);
g_strfreev(vl);
vl = g_strsplit(clean, "<", -1);
if (g_... | util_escape_markup | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_find_line_value(gchar *data, gchar *key, gchar delim) {
long v3;
long v4;
gchar *ret;
gsize i;
gchar **lines;
gsize line_count;
gchar *line;
gchar *value;
gchar *valuea;
gchar *lkey;
ret = 0;
lines = (gchar **)g_strsplit(data, "\n", 0xFFFFFFFFLL);
line_count = (unsigned int)g_strv... | gchar *util_find_line_value(gchar *data, gchar *key, gchar delim) {
gchar *ret = NULL;
gchar **lines = g_strsplit(data, "\n", -1);
gsize line_count = g_strv_length(lines);
gsize i = 0;
for (i = 0; i < line_count; i++) {
gchar *line = lines[i];
gchar *value = g_utf8_strchr(line, -1, delim);
if (!va... | util_find_line_value | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
int util_get_did(gchar *str, const gchar *lbl) {
int id;
gchar tmpfmt[128];
char tmpchk[136];
unsigned long v6;
v6 = __readfsqword(0x28u);
id = -2;
memset(tmpfmt, 0, sizeof(tmpfmt));
memset(tmpchk, 0, 128);
sprintf(tmpfmt, "%s%s", lbl, "%d");
if (!(unsigned int)__isoc99_sscanf(str, tmpfmt, &id))
... | int util_get_did(gchar *str, const gchar *lbl) {
int id = -2;
gchar tmpfmt[128] = "";
gchar tmpchk[128] = "";
sprintf(tmpfmt, "%s%s", lbl, "%d");
if (sscanf(str, tmpfmt, &id)) {
sprintf(tmpchk, tmpfmt, id);
if (SEQ(str, tmpchk))
return id;
}
return -1;
} | util_get_did | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gboolean util_have_root() { return getuid() == 0; } | gboolean util_have_root() { return (getuid() == 0) ? TRUE : FALSE; } | util_have_root | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
int util_maybe_num(gchar *str) {
int v1;
long v3;
int r;
int i;
int l;
gchar *chk;
r = 10;
i = 0;
if (str)
v1 = strlen(str);
else
v1 = 0;
if (!v1 || v1 > 32)
return 0;
chk = (gchar *)g_strdup(str);
v3 = g_strchug(chk);
g_strchomp(v3);
l = strlen(chk);
if (l > 2 && !strncmp(c... | int util_maybe_num(gchar *str) {
int r = 10, i = 0, l = (str) ? strlen(str) : 0;
if (!l || l > 32)
return 0;
gchar *chk = g_strdup(str);
g_strstrip(chk);
l = strlen(chk);
if (l > 2 && !strncmp(chk, "0x", 2)) {
i = 2;
r = 16;
}
for (; i < l; i++) {
if (isxdigit(chk[i])) {
if (!isdig... | util_maybe_num | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_normalize_path(const gchar *path, const gchar *relto) {
return (gchar *)g_canonicalize_filename(path, relto);
} | gchar *util_normalize_path(const gchar *path, const gchar *relto) {
gchar *resolved = NULL;
#if GLIB_CHECK_VERSION(2, 58, 0)
resolved = g_canonicalize_filename(path, relto);
#else
gchar *frt = relto ? g_strdup(relto) : NULL;
util_null_trailing_slash(frt);
gchar *fpath =
frt ? g_strdup_printf("%s%s%s", ... | util_normalize_path | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void util_null_trailing_slash(gchar *str) {
if (str && *str && str[strlen(str) - 1] == 47)
str[strlen(str) - 1] = 0;
} | void util_null_trailing_slash(gchar *str) {
if (str && *str) {
if (str[strlen(str) - 1] == '/')
str[strlen(str) - 1] = 0;
}
} | util_null_trailing_slash | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_safe_name(const gchar *name, gboolean lower_case) {
size_t v3;
char v4;
long v5;
gboolean ok;
const gchar *p;
gchar *t;
gchar *buff;
gchar *ret;
if (!name)
return 0;
p = name;
v3 = strlen(name);
buff = (gchar *)g_malloc0_n(v3 + 1, 1);
t = buff;
while (*p) {
ok = (*((_WOR... | gchar *util_safe_name(const gchar *name, gboolean lower_case) {
if (!name)
return NULL;
const gchar *p = name;
gchar *buff = g_new0(gchar, strlen(name) + 1);
gchar *t = buff;
while (*p) {
gboolean ok = g_ascii_isalnum(*p);
if (*p == '.' || *p == '-')
ok = TRUE;
if (*p == '/')
ok = ... | util_safe_name | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *util_strchomp_float(gchar *str_float) {
size_t v2;
char *p;
char *pa;
char *dec;
char *target;
__int128 dot;
char *src;
if (!str_float)
return 0;
*(_QWORD *)&dot = strchr(str_float, 46);
*((_QWORD *)&dot + 1) = strchr(str_float, 44);
if (dot == 0)
return str_float;
if ((unsigned ... | gchar *util_strchomp_float(gchar *str_float) {
if (!str_float)
return NULL;
char *dot = strchr(str_float, '.');
char *comma = strchr(str_float, ',');
char *p = NULL, *dec = NULL, *src = NULL, *target = NULL;
if (!dot && !comma)
return str_float;
if (dot > comma)
dec = dot;
else
dec = comma... | util_strchomp_float | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void util_strstrip_double_quotes_dumb(gchar *str) {
long v1;
int nl;
gchar *front;
gchar *back;
if (str) {
v1 = g_strchug(str);
g_strchomp(v1);
front = str;
back = &str[strlen(str) - 1];
if (back > str) {
while (*front == 34)
*front++ = 88;
while (*back == 34)
... | void util_strstrip_double_quotes_dumb(gchar *str) {
if (!str)
return;
g_strstrip(str);
gchar *front = str, *back = str + strlen(str) - 1;
if (back <= front)
return;
while (*front == '"') {
*front = 'X';
front++;
}
while (*back == '"') {
*back = 0;
back--;
}
int nl = strlen(fron... | util_strstrip_double_quotes_dumb | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void vendor_cleanup() { g_slist_free_full(vendors, vendor_free); } | void vendor_cleanup() {
DEBUG("cleanup vendor list");
g_slist_free_full(vendors, (GDestroyNotify)vendor_free);
} | vendor_cleanup | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
int vendor_cmp_deep(const Vendor *a, const Vendor *b) {
gint r;
gint ra;
gint rb;
gint rc;
gint rd;
gint re;
if (a && !b)
return 1;
if (!a && b)
return -1;
if (!a && !b)
return 0;
r = g_strcmp0(a->name, b->name);
if (r)
return r;
ra = g_strcmp0(a->name_short, b->name_short);
i... | int vendor_cmp_deep(const Vendor *a, const Vendor *b) {
int r;
if (a && !b)
return 1;
if (!a && b)
return -1;
if (!a && !b)
return 0;
r = g_strcmp0(a->name, b->name);
if (!!r)
return r;
r = g_strcmp0(a->name_short, b->name_short);
if (!!r)
return r;
r = g_strcmp0(a->ansi_color, b->... | vendor_cmp_deep | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void vendor_free(Vendor *v) {
if (v) {
g_free(v->name);
g_free(v->name_short);
g_free(v->url);
g_free(v->url_support);
g_free(v->ansi_color);
g_free(v->match_string);
g_free(v);
}
} | void vendor_free(Vendor *v) {
if (v) {
g_free(v->name);
g_free(v->name_short);
g_free(v->url);
g_free(v->url_support);
g_free(v->ansi_color);
g_free(v->match_string);
g_free(v);
}
} | vendor_free | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *vendor_get_link(const gchar *id_str) {
const Vendor *v;
v = vendor_match(id_str, 0);
if (v)
return vendor_get_link_from_vendor(v);
else
return (gchar *)g_strdup(id_str);
} | gchar *vendor_get_link(const gchar *id_str) {
const Vendor *v = vendor_match(id_str, NULL);
if (!v) {
return g_strdup(id_str);
}
return vendor_get_link_from_vendor(v);
} | vendor_get_link | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *vendor_get_link_from_vendor(const Vendor *v) {
char *v1;
gboolean link_ok;
gchar *url;
link_ok = params.markup_ok != 0;
if (v) {
url = 0;
if (params.markup_ok && v->wikipedia || v->wikipedia && !v->url) {
url = g_strdup_printf("http://wikipedia.com/wiki/%s", v->wikipedia);
} else if ... | gchar *vendor_get_link_from_vendor(const Vendor *v) {
#if GTK_CHECK_VERSION(2, 18, 0)
gboolean gtk_label_link_ok = TRUE;
#else
gboolean gtk_label_link_ok = FALSE;
#endif
gboolean link_ok = params.markup_ok && gtk_label_link_ok;
gboolean link_wikipedia = TRUE;
if (!v)
return g_strdup(_("Unknown"));
gc... | vendor_get_link_from_vendor | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
const gchar *vendor_get_name(const gchar *id_str) {
return vendor_get_name_ex(id_str, 0);
} | const gchar *vendor_get_name(const gchar *id_str) {
return vendor_get_name_ex(id_str, 0);
} | vendor_get_name | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
const gchar *vendor_get_name_ex(const gchar *id_str, short shortest) {
int v2;
int v3;
int nl;
int snl;
int sl;
const Vendor *v;
v = vendor_match(id_str, 0);
if (!v)
return id_str;
if (!shortest)
return v->name;
sl = strlen(id_str);
if (v->name)
v2 = strlen(v->name);
else
v2 = 0... | static const gchar *vendor_get_name_ex(const gchar *id_str, short shortest) {
const Vendor *v = vendor_match(id_str, NULL);
if (v) {
if (shortest) {
int sl = strlen(id_str);
int nl = (v->name) ? strlen(v->name) : 0;
int snl = (v->name_short) ? strlen(v->name_short) : 0;
if (!nl)
... | vendor_get_name_ex | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
const gchar *vendor_get_shortest_name(const gchar *id_str) {
return vendor_get_name_ex(id_str, 1);
} | const gchar *vendor_get_shortest_name(const gchar *id_str) {
return vendor_get_name_ex(id_str, 1);
} | vendor_get_shortest_name | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
const gchar *vendor_get_url(const gchar *id_str) {
const Vendor *v;
v = vendor_match(id_str, 0);
if (v)
return v->url;
else
return 0;
} | const gchar *vendor_get_url(const gchar *id_str) {
const Vendor *v = vendor_match(id_str, NULL);
if (v)
return v->url;
return NULL;
} | vendor_get_url | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *vendor_info_markup(const Vendor *v) {
gchar *v2;
char *url;
gchar *v4;
char *v5;
char *url_support;
gchar *v7;
char *v8;
char *wikipedia;
gchar *v10;
char *v11;
gchar *ven_tag;
gchar *ven_mt;
gchar *full_link;
gchar *p;
unsigned long v16;
v16 = __readfsqword(0x28u);
if (!v)
... | static gchar *vendor_info_markup(const Vendor *v) {
if (!v)
return NULL;
gchar *ven_mt = NULL;
gchar *full_link = NULL, *p = NULL;
gchar *ven_tag = v->name_short ? g_strdup(v->name_short) : g_strdup(v->name);
tag_vendor(&ven_tag, 0, ven_tag, v->ansi_color, FMT_OPT_PANGO);
ven_mt = appf(ven_mt, "\n", "%... | vendor_info_markup | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void vendor_init() {
long user_config_dir;
long v1;
long home_dir;
int n;
int na;
_BOOL4 fail;
gint i;
gchar *path;
char *file_search_order[6];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (!vendors) {
sync_manager_add_entry(&se_0);
user_config_dir = g_get_user_config_dir();
file... | void vendor_init(void) {
gchar *path;
static SyncEntry se = {
.name = N_("Update vendor list"),
.file_name = "vendor.ids",
};
if (vendors)
return;
DEBUG("initializing vendor list");
sync_manager_add_entry(&se);
char *file_search_order[] = {
g_build_filename(g_get_user_config_dir(... | vendor_init | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
vendor_list_0 vendor_list_concat_va(int count, vendor_list_0 vl, ...) {
GSList *v2;
long v3;
long v4;
long v5;
_QWORD *v6;
vendor_list_0 *overflow_arg_area;
int counta;
vendor_list_0 p;
va_list ap;
GSList *v13;
long v14;
long v15;
long v16;
va_start(ap, vl);
v2 = va_arg(ap, GSList *);
v... | vendor_list vendor_list_concat_va(int count, vendor_list vl, ...) {
vendor_list ret = vl, p = NULL;
va_list ap;
va_start(ap, vl);
if (count > 0) {
count--;
while (count) {
p = va_arg(ap, vendor_list);
ret = g_slist_concat(ret, p);
count--;
}
} else {
p = va_arg(ap, vendor_lis... | vendor_list_concat_va | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
vendor_list_0 vendor_list_remove_duplicates_deep(vendor_list_0 vl) {
GSList *vla;
GSList *tvl;
GSList *evl;
const Vendor *tv;
GSList *next;
vla = vl;
for (tvl = vl; tvl; tvl = tvl->next) {
tv = (const Vendor *)tvl->data;
evl = tvl->next;
while (evl) {
if (vendor_cmp_deep((const Vendor *... | vendor_list vendor_list_remove_duplicates_deep(vendor_list vl) {
GSList *tvl = vl;
GSList *evl = NULL;
while (tvl) {
const Vendor *tv = tvl->data;
evl = tvl->next;
while (evl) {
const Vendor *ev = evl->data;
if (vendor_cmp_deep(ev, tv) == 0) {
GSList *next = evl->next;
vl ... | vendor_list_remove_duplicates_deep | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *vendor_list_ribbon(const vendor_list vl_in, int fmt_opts) {
GSList *v2;
gchar *v3;
gchar *ven_tag;
gchar *ret;
vendor_list vl;
GSList *l;
GSList *n;
const Vendor *v;
unsigned long v11;
v11 = __readfsqword(0x28u);
ret = 0;
v2 = (GSList *)g_slist_copy(vl_in);
vl = gg_slist_remove_duplica... | gchar *vendor_list_ribbon(const vendor_list vl_in, int fmt_opts) {
gchar *ret = NULL;
vendor_list vl = g_slist_copy(vl_in);
vl = vendor_list_remove_duplicates(vl);
if (vl) {
GSList *l = vl, *n = l ? l->next : NULL;
for (; l; l = n) {
n = l->next;
const Vendor *v = l->data;
if (!v) {
... | vendor_list_ribbon | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
const Vendor *vendor_match(const gchar *id_str, ...) {
long v1;
long v2;
gchar *v3;
long v4;
long v5;
gchar **v6;
long v7;
int tl;
int c;
Vendor *ret;
gchar *tmp;
gchar *p;
vendor_list_0 vl;
va_list ap2;
gchar *v16;
long v17;
long v18;
long v19;
long v20;
va_start(ap2, id_str);
... | const Vendor *vendor_match(const gchar *id_str, ...) {
Vendor *ret = NULL;
va_list ap, ap2;
gchar *tmp = NULL, *p = NULL;
int tl = 0, c = 0;
if (id_str) {
c++;
tl += strlen(id_str);
tmp = appfsp(tmp, "%s", id_str);
va_start(ap, id_str);
p = va_arg(ap, gchar *);
while (p) {
c++;... | vendor_match | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
gchar *vendor_match_tag(const gchar *vendor_str, int fmt_opts) {
gchar *v2;
gchar *ven_tag;
const Vendor *v;
unsigned long v6;
v6 = __readfsqword(0x28u);
v = vendor_match(vendor_str, 0);
if (!v)
return 0;
if (v->name_short)
v2 = (gchar *)g_strdup(v->name_short);
else
v2 = (gchar *)g_strdu... | gchar *vendor_match_tag(const gchar *vendor_str, int fmt_opts) {
const Vendor *v = vendor_match(vendor_str, NULL);
if (v) {
gchar *ven_tag =
v->name_short ? g_strdup(v->name_short) : g_strdup(v->name);
tag_vendor(&ven_tag, 0, ven_tag, v->ansi_color, fmt_opts);
return ven_tag;
}
return NULL;
... | vendor_match_tag | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
int vendor_sort(const Vendor *ap, const Vendor *bp_0) {
int la;
int lb;
la = 0;
lb = 0;
if (ap)
la = ap->weight;
if (bp_0)
lb = bp_0->weight;
return lb - la;
} | int vendor_sort(const Vendor *ap, const Vendor *bp) {
int la = 0, lb = 0;
if (ap)
la = ap->weight;
if (bp)
lb = bp->weight;
return lb - la;
} | vendor_sort | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
vendor_list_0 vendors_match(const gchar *id_str, ...) {
long v1;
long v2;
gchar *v3;
long v4;
long v5;
gchar **v6;
long v7;
int tl;
int c;
gchar *tmp;
gchar *p;
va_list ap2;
gchar *v14;
long v15;
long v16;
long v17;
long v18;
va_start(ap2, id_str);
v3 = va_arg(ap2, gchar *);
v1 ... | vendor_list vendors_match(const gchar *id_str, ...) {
va_list ap, ap2;
gchar *tmp = NULL, *p = NULL;
int tl = 0, c = 0;
if (id_str) {
c++;
tl += strlen(id_str);
tmp = appfsp(tmp, "%s", id_str);
va_start(ap, id_str);
p = va_arg(ap, gchar *);
while (p) {
c++;
tl += strlen(p);... | vendors_match | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
vendor_list_0 vendors_match_core(const gchar *str, int limit) {
long v2;
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
int found;
int pass;
int epass;
int epassa;
int epassb;
int epassc;
int epassd;
int epasse;
int epassf;
int epassg;
gchar *p;
char *pa;
GSList... | vendor_list vendors_match_core(const gchar *str, int limit) {
gchar *p = NULL;
GSList *vlp;
int found = 0;
vendor_list ret = NULL;
gchar *passes[3] = {g_strdup(str), g_strdup(str), g_strdup(str)};
int pass = 1;
p = passes[1];
while ((p = strchr(p, '('))) {
pass = 3;
p++;
while (*p && *p != ... | vendors_match_core | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void view_menu_select_entry(gpointer data, gpointer data2) {
long v2;
long v3;
long v4;
long type;
long v6;
GtkTreePath *path;
path = (GtkTreePath *)gtk_tree_model_get_path(shell->tree->model, data2,
data2, v2, v3, v4);
gtk_tree_selection_select_path(shel... | static void view_menu_select_entry(gpointer data, gpointer data2) {
GtkTreePath *path;
GtkTreeIter *iter = (GtkTreeIter *)data2;
path = gtk_tree_model_get_path(shell->tree->model, iter);
gtk_tree_selection_select_path(shell->tree->selection, path);
gtk_tree_view_set_cursor(GTK_TREE_VIEW(shell->tree->view), ... | view_menu_select_entry | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) {
GdkDisplay *display;
GdkCursor *cursor;
GdkWindow *gdk_window;
display = (GdkDisplay *)gtk_widget_get_display(widget);
cursor = (GdkCursor *)gdk_cursor_new_for_display(display,
(unsigned ... | void widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) {
GdkCursor *cursor;
GdkDisplay *display;
GdkWindow *gdk_window;
display = gtk_widget_get_display(widget);
cursor = gdk_cursor_new_for_display(display, cursor_type);
gdk_window = gtk_widget_get_window(widget);
if (cursor) {
gdk_wind... | widget_set_cursor | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void wl_free(wl_info *s) {
if (s) {
free(s->xdg_session_type);
free(s->display_name);
free(s);
}
} | void wl_free(wl_info *s) {
if (s) {
free(s->xdg_session_type);
free(s->display_name);
free(s);
}
} | wl_free | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void xinfo_free(xinfo *xi) {
if (xi) {
free(xi->display_name);
free(xi->vendor);
free(xi->version);
free(xi->release_number);
xrr_free(xi->xrr);
glx_free(xi->glx);
free(xi);
}
} | void xinfo_free(xinfo *xi) {
if (xi) {
free(xi->display_name);
free(xi->vendor);
free(xi->version);
free(xi->release_number);
xrr_free(xi->xrr);
glx_free(xi->glx);
free(xi);
}
} | xinfo_free | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
xinfo *xinfo_get_info() {
int fail;
xinfo *xi;
xi = (xinfo *)malloc(0x38u);
memset(xi, 0, sizeof(xinfo));
xi->glx = glx_create();
xi->xrr = xrr_create();
fail = fill_xinfo(xi) == 0;
if (!fill_xrr_info(xi->xrr))
++fail;
if (!fill_glx_info(xi->glx))
++fail;
if (fail && !fill_basic_xlib(xi))
... | xinfo *xinfo_get_info() {
int fail = 0;
xinfo *xi = malloc(sizeof(xinfo));
memset(xi, 0, sizeof(xinfo));
xi->glx = glx_create();
xi->xrr = xrr_create();
if (!fill_xinfo(xi))
fail++;
if (!fill_xrr_info(xi->xrr))
fail++;
if (!fill_glx_info(xi->glx))
fail++;
if (fail) {
if (!fill_basic... | xinfo_get_info | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
xrr_info *xrr_create() {
xrr_info *xrr;
xrr = (xrr_info *)malloc(0x48u);
memset(xrr, 0, sizeof(xrr_info));
return xrr;
} | xrr_info *xrr_create() {
xrr_info *xrr = malloc(sizeof(xrr_info));
memset(xrr, 0, sizeof(xrr_info));
return xrr;
} | xrr_create | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
void xrr_free(xrr_info *xrr) {
if (xrr) {
free(xrr->screens);
free(xrr->outputs);
free(xrr->providers);
free(xrr->monitors);
free(xrr);
}
} | void xrr_free(xrr_info *xrr) {
if (xrr) {
free(xrr->screens);
free(xrr->outputs);
free(xrr->providers);
free(xrr->monitors);
free(xrr);
}
} | xrr_free | hardinfo-0.6_alpha_pre20201116-r1 | app-admin | O0/app-admin/hardinfo-0.6_alpha_pre20201116-r1/hardinfo | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
__pid_t v3;
uint32_t v4;
unsigned int seed;
int i;
int int_c;
int count;
unsigned long val;
FILE *fp;
unsigned long v12;
v12 = __readfsqword(0x28u);
if (argc <= 1)
usage();
v3 = getpid();
seed = v3 ^ time(0);
fp = (FILE *)stdout... | int main(int argc, char **argv) {
if (argc < 2) {
usage();
}
unsigned int seed = getpid() ^ time(NULL);
FILE *fp = stdout;
int int_c;
while (-1 != (int_c = getopt(argc, argv, "s:f:"))) {
switch (char(int_c)) {
case '?':
case ':':
usage();
break;
case 's':
if (sscanf(opt... | main | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/generate_randfile | ida | O0 |
void usage() {
fwrite("Usage: generate_randfile [-s seed] [-f file] count\n", 1u, 0x33u,
stderr);
exit(1);
} | void usage() {
fprintf(stderr, "Usage: generate_randfile [-s seed] [-f file] count\n");
exit(1);
} | usage | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/generate_randfile | ida | O0 |
void SCSIEncryptOptions_ ~SCSIEncryptOptions(SCSIEncryptOptions *const this) {
std_string_ ~string(&this->keyName);
std_string_ ~string(&this->cryptoKey);
} | SCSIEncryptOptions::SCSIEncryptOptions() {
cryptMode = CRYPTMODE_OFF;
algorithmIndex = DEFAULT_ALGORITHM;
cryptoKey = "";
CKOD = false;
keyName = "";
rdmc = RDMC_DEFAULT;
} | SCSIEncryptOptions | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
bool SCSIExecute(std_string *p_tapedrive, unsigned char *cmd_p, int cmd_len,
unsigned char *dxfer_p, int dxfer_len, bool cmd_to_device,
bool show_error) {
long v7;
long v8;
int *v9;
int v10;
unsigned char cmd_lena;
char retval;
int ioerr;
int retries;
int sg_fd;
int... | bool SCSIExecute(std::string tapedrive, unsigned char *cmd_p, int cmd_len,
unsigned char *dxfer_p, int dxfer_len, bool cmd_to_device,
bool show_error) {
const char *tapedevice = tapedrive.c_str();
int sg_fd, eresult, sresult, ioerr, retries;
SCSI_PAGE_SENSE *sd = new SCSI_PAGE_SE... | SCSIExecute | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
SCSI_PAGE_INQ *SCSIGetInquiry(std_string *p_tapeDevice) {
bool v1;
SCSI_PAGE_INQ *status;
std_string p_tapedrive;
unsigned long v5;
v5 = __readfsqword(0x28u);
status = (SCSI_PAGE_INQ *)operator new(0x60u);
memset(status, 0, sizeof(SCSI_PAGE_INQ));
std_string_basic_string(&p_tapedrive, p_tapeDevice);
... | SCSI_PAGE_INQ *SCSIGetInquiry(std::string tapeDevice) {
SCSI_PAGE_INQ *status = new SCSI_PAGE_INQ;
memset(status, 0, sizeof(SCSI_PAGE_INQ));
if (!SCSIExecute(tapeDevice, (unsigned char *)&scsi_inq_command,
sizeof(scsi_inq_command), (unsigned char *)status,
sizeof(SCSI_PAGE_IN... | SCSIGetInquiry | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
int SCSIInitSDEPage(SCSIEncryptOptions *eOptions, uint8_t *buffer) {
int cryptMode;
int v3;
long v4;
int v5;
long v6;
long v7;
long v8;
long v9;
int pagelen;
int kadlen;
SSP_PAGE_SDE options;
SSP_KAD kad;
unsigned long v15;
v15 = __readfsqword(0x28u);
memset(&options, 0, sizeof(options));... | int SCSIInitSDEPage(SCSIEncryptOptions *eOptions, uint8_t *buffer) {
SSP_PAGE_SDE options;
memset(&options, 0, sizeof(SSP_PAGE_SDE));
byteswap((unsigned char *)&options.pageCode, 2, 0x10);
int pagelen = sizeof(SSP_PAGE_SDE);
options.scope = 2;
options.RDMC = eOptions->rdmc;
options.ckod = (eOptions->CKOD... | SCSIInitSDEPage | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
bool SCSIWriteEncryptOptions(std_string *p_tapeDevice,
SCSIEncryptOptions *eOptions) {
bool v2;
int pagelen;
std_string p_tapedrive;
unsigned char spout_sde_command[12];
uint8_t buffer[1032];
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(buffer, 0, 0x400u);
pagelen ... | bool SCSIWriteEncryptOptions(std::string tapeDevice,
SCSIEncryptOptions *eOptions) {
uint8_t buffer[1024];
memset(&buffer, 0, 1024);
int pagelen = SCSIInitSDEPage(eOptions, buffer);
unsigned char spout_sde_command[SSP_SP_CMD_LEN] = {SSP_SPOUT_OPCODE,
... | SCSIWriteEncryptOptions | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
SSP_DES *SSPGetDES(std_string *p_tapeDevice) {
bool v1;
SSP_DES *v3;
std_string p_tapedrive;
SSP_PAGE_BUFFER buffer;
unsigned long v6;
v6 = __readfsqword(0x28u);
memset(&buffer, 0, sizeof(buffer));
std_string_basic_string(&p_tapedrive, p_tapeDevice);
v1 = !SCSIExecute(&p_tapedrive, spin_des_command, ... | SSP_DES *SSPGetDES(std::string tapeDevice) {
SSP_PAGE_BUFFER buffer;
memset(&buffer, 0, sizeof(SSP_PAGE_BUFFER));
if (!SCSIExecute(tapeDevice, (unsigned char *)&spin_des_command,
sizeof(spin_des_command), (unsigned char *)&buffer,
sizeof(SSP_PAGE_BUFFER), false, true)) {
... | SSPGetDES | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
SSP_NBES *SSPGetNBES(std_string *p_tapeDevice, bool retry) {
bool v2;
long v4;
bool v5;
int moves;
SSP_NBES *status;
std_string p_tapedrive;
SSP_PAGE_BUFFER buffer;
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(&buffer, 0, sizeof(buffer));
std_string_basic_string(&p_tapedrive, p_tapeDevic... | SSP_NBES *SSPGetNBES(std::string tapeDevice, bool retry) {
SSP_PAGE_BUFFER buffer;
memset(&buffer, 0, sizeof(SSP_PAGE_BUFFER));
if (!SCSIExecute(tapeDevice, (unsigned char *)&spin_nbes_command,
sizeof(spin_nbes_command), (unsigned char *)&buffer,
sizeof(SSP_PAGE_BUFFER), fal... | SSPGetNBES | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void SSP_DES_ ~SSP_DES(SSP_DES *const this) { KAD_CLASS_ ~KAD_CLASS(this); } | SSP_DES::SSP_DES(const SSP_PAGE_BUFFER *buffer) {
memset(&des, 0, sizeof(SSP_PAGE_DES));
memcpy(&des, buffer, sizeof(SSP_PAGE_DES));
loadKADs(buffer, sizeof(SSP_PAGE_DES));
} | SSP_DES | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void SSP_NBES_ ~SSP_NBES(SSP_NBES *const this) { KAD_CLASS_ ~KAD_CLASS(this); } | SSP_NBES::SSP_NBES(const SSP_PAGE_BUFFER *buffer) {
memset(&nbes, 0, sizeof(SSP_PAGE_NBES));
memcpy(&nbes, buffer, sizeof(SSP_PAGE_NBES));
loadKADs(buffer, sizeof(SSP_PAGE_NBES));
} | SSP_NBES | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void byteswap(unsigned char *array, int size, int value) {
long v3;
long v4;
if (size == 2) {
*array = BYTE1(value);
array[1] = value;
} else if (size == 4) {
*array = HIBYTE(value);
array[1] = BYTE2(value);
array[2] = BYTE1(value);
array[3] = value;
} else {
v3 = std_operator < <... | void byteswap(unsigned char *array, int size, int value) {
switch (size) {
case 2:
array[0] = (unsigned char)((value & 0xff00) >> 8);
array[1] = (unsigned char)(value & 0x00ff);
break;
case 4:
array[0] = (unsigned char)((value & 0xff000000) >> 24);
array[1] = (unsigned char)((value & 0x00ff000... | byteswap | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void echo(bool on) {
tcflag_t v1;
termios settings;
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(&settings, 0, sizeof(settings));
tcgetattr(0, &settings);
if (on)
v1 = settings.c_lflag | 8;
else
v1 = settings.c_lflag & 0xFFFFFFF7;
settings.c_lflag = v1;
tcsetattr(0, 0, &settings);
} | void echo(bool on = true) {
struct termios settings{};
tcgetattr(STDIN_FILENO, &settings);
settings.c_lflag =
on ? (settings.c_lflag | ECHO) : (settings.c_lflag & ~(ECHO));
tcsetattr(STDIN_FILENO, TCSANOW, &settings);
} | echo | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void errorOut(const std_string *p_message) {
long v1;
long v2;
v1 = std_operator < < <std_char_traits<char>>(&std_cerr, "Error: ");
v2 = std_operator < < <char>(v1, p_message);
std_operator < < <std_char_traits<char>>(v2, "\n");
showUsage();
exit(1);
} | void errorOut(std::string const message) {
std::cerr << "Error: " << message << "\n";
showUsage();
exit(EXIT_FAILURE);
} | errorOut | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void inquiryDrive(std_string *p_tapeDevice) {
long v1;
std__Setw v2;
long v3;
long v4;
std__Setw v5;
long v6;
long v7;
std__Setw v8;
long v9;
SCSI_PAGE_INQ *iresult;
std_string v11;
unsigned long v12;
v12 = __readfsqword(0x28u);
std_string_basic_string(&v11, p_tapeDevice);
iresult = SCSIG... | void inquiryDrive(std::string tapeDevice) {
SCSI_PAGE_INQ *const iresult = SCSIGetInquiry(tapeDevice);
std::cout << std::left << std::setw(25) << "Device Mfg:";
std::cout.write((const char *)iresult->vender, 8);
std::cout << std::endl;
std::cout << std::left << std::setw(25) << "Product ID:";
std::cout.wri... | inquiryDrive | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
long v3;
long v4;
long v5;
long v6;
long v7;
const char *v8;
int v9;
long v10;
long v11;
const char *v12;
long v13;
long v14;
long v15;
long v16;
const char *v17;
bool v18;
long v19;
char v20;
long v21;
bool v22;
long v... | int main(int argc, char **argv) {
bitcheck bc;
memset(&bc, 0, 1);
bc.bit2 = 1;
bc.bit5 = 1;
unsigned char check;
memcpy(&check, &bc, 1);
switch ((int)check) {
case 0x12:
break;
case 0x48:
#if STENC_BIG_ENDIAN == 1
errorOut("Swapped bit ordering detected(BI). Program needs to be "
... | main | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
bool moveTape(std_string *p_tapeDevice, int count, bool dirForward) {
const char *v3;
short v5;
char retval;
int sg_fd;
mtop mt_command;
unsigned long v10;
v10 = __readfsqword(0x28u);
v3 = (const char *)std_string_c_str(p_tapeDevice);
sg_fd = open(v3, 0);
if (!sg_fd || sg_fd == -1)
return 0;
... | bool moveTape(std::string tapeDevice, int count, bool dirForward) {
struct mtop mt_command;
int sg_fd = open(tapeDevice.c_str(), O_RDONLY);
if (!sg_fd || sg_fd == -1) {
return false;
}
errno = 0;
bool retval = true;
#if defined(OS_LINUX) || defined(OS_FREEBSD)
mt_command.mt_op = (dirForward) ? MTFSR ... | moveTape | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void outputSense(SCSI_PAGE_SENSE *sd) {
long v1;
std__Setw v2;
long v3;
long v4;
long v5;
std__Setw v6;
long v7;
unsigned int v8;
long v9;
long v10;
long v11;
unsigned int v12;
long v13;
long v14;
std__Setw v15;
long v16;
long v17;
long v18;
long v19;
std__Setw v20;
long v21;
... | void outputSense(SCSI_PAGE_SENSE *sd) {
std::cerr << std::left << std::setw(25) << "Sense Code: ";
switch ((int)sd->senseKey) {
case 0:
std::cerr << "No specific error";
break;
case 2:
std::cerr << "Device not ready";
break;
case 3:
std::cerr << "Medium Error";
break;
case 4:
st... | outputSense | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void readIOError(int err) {
long v1;
long v2;
int *v3;
long v4;
long v5;
int *v6;
char *v7;
long v8;
if (err) {
std_operator < < <std_char_traits<char>>(&std_cerr, "ERROR: ");
if (err == 110) {
std_operator < < <std_char_traits<char>>(&std_cerr,
... | void readIOError(int err) {
if (err == 0)
return;
std::cerr << "ERROR: ";
switch (err) {
case EAGAIN:
std::cerr << "Device already open.\n";
break;
case EBUSY:
std::cerr << "Device Busy.\n";
break;
case ETIMEDOUT:
std::cerr << "Device operation timed out\n";
break;
case EIO:
... | readIOError | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void showDriveStatus(std_string *p_tapeDrive, bool detail) {
long v2;
std__Setw v3;
long v4;
long v5;
long v6;
std__Setw v7;
long v8;
int decryptionMode;
std__Setw v10;
long v11;
long v12;
std__Setw v13;
long v14;
long v15;
std__Setw v16;
long v17;
long v18;
std__Setw v19;
long v20... | void showDriveStatus(std::string tapeDrive, bool detail) {
SSP_DES *opt = SSPGetDES(tapeDrive);
if (opt == NULL)
return;
std::string emode = "unknown";
std::cout << std::left << std::setw(25) << "Drive Encryption:";
if ((int)opt->des.encryptionMode == 0x2 &&
(int)opt->des.decryptionMode == 0x2)
... | showDriveStatus | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void showUsage() {
std_operator < < <std_char_traits<char>>(
&std_cout,
"Usage: stenc --version | -g <length> -k <file> [-kd "
"<description>] | -f <device> [--detail] [-e "
"<on/mixed/rawread/of"
"f> [-... | void showUsage() {
std::cout
<< "Usage: stenc --version | -g <length> -k <file> [-kd <description>] | "
"-f <device> [--detail] [-e <on/mixed/rawread/off> [-k <file>] "
"[-kd <description>] [-a <index>] [--protect | --unprotect] [--ckod] "
"]\n\n"
"Type 'man stenc' for more i... | showUsage | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
void showVolumeStatus(std_string *p_tapeDrive) {
long v1;
std__Setw v2;
long v3;
long v4;
long v5;
long v6;
long v7;
std__Setw v8;
long v9;
long v10;
std__Setw v11;
long v12;
int type;
std__Setw v14;
long v15;
long v16;
std_vector<SSP_KAD> _reference v17;
std__Setw v18;
long v19;
... | void showVolumeStatus(std::string tapeDrive) {
SSP_NBES *opt = SSPGetNBES(tapeDrive, true);
if (opt == NULL)
return;
if (opt->nbes.compressionStatus != 0) {
std::cout << std::left << std::setw(25) << "Volume Compressed:";
switch (opt->nbes.compressionStatus) {
case 0x00:
std::cout << "Drive ... | showVolumeStatus | stenc-1.1.1 | app-arch | O0/app-arch/stenc-1.1.1/stenc | ida | O0 |
uint16_t Calc_CheckSum(uint8_t *mem, uint32_t size) {
uint8_t *v2;
uint16_t u;
for (u = 0; size--; u += *v2)
v2 = mem++;
return u;
} | USHORT Calc_CheckSum(UCHAR *mem, ULONG size) {
USHORT u = 0;
while (size--)
u += *mem++;
return (USHORT)(u & 0xffff);
} | Calc_CheckSum | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t CreateCRC(uint8_t *mem, uint32_t size) {
unsigned int i;
uint8_t *v3;
int v4;
for (i = 0; size--; i = v4 ^ (unsigned int)v3) {
v3 = mem++;
v4 = CRCTab_0[(unsigned char)(i ^ *v3)];
WORD1(v3) = HIWORD(i);
LOWORD(v3) = BYTE1(i);
}
return i;
} | USHORT CreateCRC(UCHAR *mem, ULONG size) {
static USHORT CRCTab[256] = {
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601,
0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0,
0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81,
0x0B4... | CreateCRC | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t DecodeChar() {
uint8_t *v0;
uint16_t c;
uint16_t ca;
c = son[626];
while (c <= 0x272u) {
c = son[c + (unsigned short)(bitbuf >> --bitcount)];
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v0 = indata++;
bitbuf = (bitbuf << 8) | *v0;
bitcount += 8;
}
}
... | INLINE USHORT DecodeChar(void) {
USHORT c;
c = son[R];
while (c < T) {
c = son[c + GETBITS(1)];
DROPBITS(1);
}
c -= T;
update(c);
return c;
} | DecodeChar | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t DecodePosition() {
uint8_t *v0;
uint8_t *v1;
uint16_t i;
uint16_t ia;
uint16_t c;
uint8_t j;
i = bitbuf >> (bitcount - 8);
bitcount -= 8;
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v0 = indata++;
bitbuf = (bitbuf << 8) | *v0;
bitcount += 8;
}
c = d_code[i] <<... | INLINE USHORT DecodePosition(void) {
USHORT i, j, c;
i = GETBITS(8);
DROPBITS(8);
c = (USHORT)(d_code[i] << 8);
j = d_len[i];
i = (USHORT)(((i << j) | GETBITS(j)) & 0xff);
DROPBITS(j);
return (USHORT)(c | i);
} | DecodePosition | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void ErrMsg(uint16_t err, char *i, char *o) {
const char *oa;
const char *ia;
ia = i;
oa = o;
if (!i)
ia = "stdin";
if (!o)
oa = "stdout";
switch (err) {
case 0u:
case 1u:
return;
case 2u:
fwrite("Not enough memory for buffers !\n", 1u, 0x20u, stderr);
break;
case 3u:
fpri... | static void ErrMsg(USHORT err, char *i, char *o) {
if (!i)
i = "stdin";
if (!o)
o = "stdout";
switch (err) {
case NO_PROBLEM:
case FILE_END:
return;
case ERR_NOMEMORY:
fprintf(stderr, "Not enough memory for buffers !\n");
break;
case ERR_CANTOPENIN:
fprintf(stderr, "Can't open %s... | ErrMsg | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void Init_DEEP_Tabs() {
long v0;
uint16_t i;
uint16_t ia;
uint16_t j;
for (i = 0; i <= 0x139u; ++i) {
freq[i] = 1;
son[i] = i + 627;
prnt[i + 627] = i;
}
ia = 0;
for (j = 314; j <= 0x272u; ++j) {
freq[j] = freq[ia + 1] + freq[ia];
son[j] = ia;
v0 = ia + 1;
prnt[v0] = j;
... | void Init_DEEP_Tabs(void) {
USHORT i, j;
for (i = 0; i < N_CHAR; i++) {
freq[i] = 1;
son[i] = (USHORT)(i + T);
prnt[i + T] = i;
}
i = 0;
j = N_CHAR;
while (j <= R) {
freq[j] = (USHORT)(freq[i] + freq[i + 1]);
son[j] = i;
prnt[i] = prnt[i + 1] = j;
i += 2;
j++;
}
freq[T] ... | Init_DEEP_Tabs | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void Init_Decrunchers() {
quick_text_loc = 251;
medium_text_loc = 16318;
heavy_text_loc = 0;
deep_text_loc = 16324;
init_deep_tabs = 1;
memset(text, 0, 0x3FC8u);
} | void Init_Decrunchers(void) {
quick_text_loc = 251;
medium_text_loc = 0x3fbe;
heavy_text_loc = 0;
deep_text_loc = 0x3fc4;
init_deep_tabs = 1;
memset(text, 0, 0x3fc8);
} | Init_Decrunchers | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Process_File(char *iname, char *oname, uint16_t cmd, uint16_t opt,
uint16_t PCRC, uint16_t pwd) {
char *v7;
uint16_t v8;
uint16_t v9;
uint16_t ret;
uint16_t hcrc;
uint16_t geninfo;
uint16_t from;
uint16_t to;
uint16_t c_version;
uint16_t disktype;
uint16_t cmode;
u... | USHORT Process_File(char *iname, char *oname, USHORT cmd, USHORT opt,
USHORT PCRC, USHORT pwd) {
FILE *fi, *fo = NULL;
USHORT from, to, geninfo, c_version, cmode, hcrc, disktype, pv, ret;
ULONG pkfsize, unpkfsize;
UCHAR *b1, *b2;
time_t date;
b1 = (UCHAR *)calloc((size_t)TRACK_BUFFER_LE... | Process_File | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Process_Track(FILE *fi, FILE *fo, uint8_t *b1, uint8_t *b2,
uint16_t cmd, uint16_t opt, uint16_t pwd) {
uint8_t flags;
uint8_t cmode;
uint16_t l;
uint16_t hcrc;
uint16_t number;
unsigned short pklen1;
unsigned short pklen2;
unsigned short unpklen;
uint16_t usum;
uint1... | static USHORT Process_Track(FILE *fi, FILE *fo, UCHAR *b1, UCHAR *b2,
USHORT cmd, USHORT opt, USHORT pwd) {
USHORT hcrc, dcrc, usum, number, pklen1, pklen2, unpklen, l, r;
UCHAR cmode, flags;
l = (USHORT)fread(b1, 1, THLEN, fi);
if (l != THLEN) {
if (l == 0)
return FILE_E... | Process_Track | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_DEEP(uint8_t *in, uint8_t *out, uint16_t origsize) {
uint16_t v3;
uint8_t *v4;
uint8_t *v5;
uint16_t v6;
uint16_t v7;
uint8_t *v8;
uint16_t v9;
uint8_t *v10;
uint8_t *v11;
uint8_t *outa;
uint16_t i;
uint16_t j;
uint16_t c;
outa = out;
initbitbuf(in);
if (init_deep_tabs)
... | USHORT Unpack_DEEP(UCHAR *in, UCHAR *out, USHORT origsize) {
USHORT i, j, c;
UCHAR *outend;
initbitbuf(in);
if (init_deep_tabs)
Init_DEEP_Tabs();
outend = out + origsize;
while (out < outend) {
c = DecodeChar();
if (c < 256) {
*out++ = text[deep_text_loc++ & DBITMASK] = (UCHAR)c;
} ... | Unpack_DEEP | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_HEAVY(uint8_t *in, uint8_t *out, uint8_t flags,
uint16_t origsize) {
uint16_t v5;
uint8_t *v6;
uint8_t *v7;
uint16_t v8;
uint16_t v9;
uint8_t *v10;
uint16_t v11;
uint8_t *v12;
uint8_t *v13;
uint8_t *outa;
uint16_t j;
uint16_t i;
uint16_t bitmask;
uint16_... | USHORT Unpack_HEAVY(UCHAR *in, UCHAR *out, UCHAR flags, USHORT origsize) {
USHORT j, i, c, bitmask;
UCHAR *outend;
if (flags & 8) {
np = 15;
bitmask = 0x1fff;
} else {
np = 14;
bitmask = 0x0fff;
}
initbitbuf(in);
if (flags & 2) {
if (read_tree_c())
return 1;
if (read_tree_... | Unpack_HEAVY | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_MEDIUM(uint8_t *in, uint8_t *out, uint16_t origsize) {
uint8_t *v3;
uint16_t v4;
uint8_t *v5;
uint8_t *v6;
uint8_t *v7;
uint8_t *v8;
uint8_t *v9;
uint8_t *v10;
uint8_t *v11;
uint16_t v12;
uint8_t *v13;
uint16_t v14;
uint8_t *v15;
uint8_t *v16;
uint8_t *outa;
uint8_t u;
... | USHORT Unpack_MEDIUM(UCHAR *in, UCHAR *out, USHORT origsize) {
USHORT i, j, c;
UCHAR u, *outend;
initbitbuf(in);
outend = out + origsize;
while (out < outend) {
if (GETBITS(1) != 0) {
DROPBITS(1);
*out++ = text[medium_text_loc++ & MBITMASK] = (UCHAR)GETBITS(8);
DROPBITS(8);
} else ... | Unpack_MEDIUM | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_QUICK(uint8_t *in, uint8_t *out, uint16_t origsize) {
uint8_t *v3;
unsigned char v4;
uint8_t *v5;
uint8_t *v6;
uint8_t *v7;
uint8_t *v8;
uint8_t *v9;
uint8_t *v10;
unsigned char v11;
uint8_t *v12;
unsigned char v13;
uint8_t *v14;
uint8_t *v15;
uint8_t *outa;
uint16_t i;
u... | USHORT Unpack_QUICK(UCHAR *in, UCHAR *out, USHORT origsize) {
USHORT i, j;
UCHAR *outend;
initbitbuf(in);
outend = out + origsize;
while (out < outend) {
if (GETBITS(1) != 0) {
DROPBITS(1);
*out++ = text[quick_text_loc++ & QBITMASK] = (UCHAR)GETBITS(8);
DROPBITS(8);
} else {
... | Unpack_QUICK | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_RLE(uint8_t *in, uint8_t *out, uint16_t origsize) {
uint8_t *v3;
uint8_t *v4;
uint8_t *v5;
uint8_t *v6;
uint8_t *v7;
short v8;
uint8_t *v9;
uint8_t *outa;
uint8_t a;
uint8_t aa;
uint8_t b;
uint16_t n;
uint8_t *outend;
outa = out;
outend = &out[origsize];
while (outa < ou... | USHORT Unpack_RLE(UCHAR *in, UCHAR *out, USHORT origsize) {
USHORT n;
UCHAR a, b, *outend;
outend = out + origsize;
while (out < outend) {
if ((a = *in++) != 0x90)
*out++ = a;
else if (!(b = *in++))
*out++ = a;
else {
a = *in++;
if (b == 0xff) {
n = *in++;
n ... | Unpack_RLE | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t Unpack_Track(uint8_t *b1, uint8_t *b2, uint16_t pklen2,
uint16_t unpklen, uint8_t cmode, uint8_t flags) {
switch (cmode) {
case 0u:
goto LABEL_2;
case 1u:
if (!Unpack_RLE(b1, b2, unpklen))
goto LABEL_30;
return 14;
case 2u:
if (Unpack_QUICK(b1, b2, pklen2))
... | static USHORT Unpack_Track(UCHAR *b1, UCHAR *b2, USHORT pklen2, USHORT unpklen,
UCHAR cmode, UCHAR flags) {
switch (cmode) {
case 0:
memcpy(b2, b1, (size_t)unpklen);
break;
case 1:
if (Unpack_RLE(b1, b2, unpklen))
return ERR_BADDECR;
break;
case 2:
if (Unp... | Unpack_Track | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void Usage() {
putchar(10);
printf(" xDMS v%s - Portable DMS archive unpacker - Public Domain\n",
"1.3.2");
puts(" Written by Andre Rodrigues de la Rocha <adlroc@usa.net>");
puts(" Maintained by Heikki Orsila <heikki.orsila@iki.fi>\n");
puts(" Usage: xdms [options] <command> {<dms_file[.dm... | static void Usage(void) {
printf("\n");
printf(" xDMS v%s - Portable DMS archive unpacker - Public Domain\n",
VERSION);
printf(" Written by Andre Rodrigues de la Rocha <adlroc@usa.net>\n");
printf(" Maintained by Heikki Orsila <heikki.orsila@iki.fi>\n\n");
printf(" Usage: xdms [options] <c... | Usage | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t decode_c() {
uint8_t *v0;
uint8_t *v1;
uint8_t *v2;
uint16_t j;
uint16_t m;
j = c_table[(unsigned short)(bitbuf >> (bitcount - 12))];
if (j > 0x1FDu) {
bitcount -= 12;
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v1 = indata++;
bitbuf = (bitbuf << 8) | *v1;
... | INLINE USHORT decode_c(void) {
USHORT i, j, m;
j = c_table[GETBITS(12)];
if (j < N1) {
DROPBITS(c_len[j]);
} else {
DROPBITS(12);
i = GETBITS(16);
m = 0x8000;
do {
if (i & m)
j = right[j];
else
j = left[j];
m >>= 1;
} while (j >= N1);
DROPBITS(c_len... | decode_c | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t decode_p() {
uint8_t *v0;
uint8_t *v1;
uint8_t *v2;
uint8_t *v3;
uint16_t j;
uint16_t m;
char i;
j = pt_table[(unsigned short)(bitbuf >> (bitcount - 8))];
if (j >= np) {
bitcount -= 8;
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v1 = indata++;
bitbuf = (... | INLINE USHORT decode_p(void) {
USHORT i, j, m;
j = pt_table[GETBITS(8)];
if (j < np) {
DROPBITS(pt_len[j]);
} else {
DROPBITS(8);
i = GETBITS(16);
m = 0x8000;
do {
if (i & m)
j = right[j];
else
j = left[j];
m >>= 1;
} while (j >= np);
DROPBITS(pt_le... | decode_p | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void dms_decrypt(uint8_t *p, uint16_t len) {
uint8_t *v2;
uint16_t t;
while (len--) {
t = *p;
v2 = p++;
*v2 ^= PWDCRC;
PWDCRC = (PWDCRC >> 1) + t;
}
} | static void dms_decrypt(UCHAR *p, USHORT len) {
USHORT t;
while (len--) {
t = (USHORT)*p;
*p++ ^= (UCHAR)PWDCRC;
PWDCRC = (USHORT)((PWDCRC >> 1) + t);
}
} | dms_decrypt | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void initbitbuf(uint8_t *in) {
uint8_t *v1;
indata = in;
bitcount = 0;
bitbuf = 0;
while (bitcount <= 0xFu) {
v1 = indata++;
bitbuf = (bitbuf << 8) | *v1;
bitcount += 8;
}
} | void initbitbuf(UCHAR *in) {
bitbuf = 0;
bitcount = 0;
indata = in;
DROPBITS(0);
} | initbitbuf | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
uint32_t v3;
size_t v4;
size_t v5;
size_t v6;
uint16_t i;
uint16_t ia;
uint16_t cmd;
uint16_t opt;
uint16_t ret;
uint16_t PCRC;
uint16_t pwd;
int ext;
int fd;
char *inm;
char *onm;
char *p;
char *pd;
char *pa;
char *pb;
c... | int main(int argc, char **argv) {
USHORT i, cmd = 0, opt = 0, ret, PCRC = 0, pwd = 0;
int ext;
char iname[FNAME_MAXC + 1], oname[FNAME_MAXC + 1], cmdstr[FNAME_MAXC + 20],
*inm, *onm, *p, *q, *destdir = NULL;
char tname[FNAME_MAXC];
if (argc < 3) {
Usage();
exit(EXIT_FAILURE);
}
for (i = 1;... | main | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t make_table(uint16_t nchar, uint8_t *bitlen, uint16_t tablebits,
uint16_t *table) {
avail = nchar;
n = nchar;
blen = bitlen;
tbl = table;
tblsiz = 1 << tablebits;
bit = tblsiz >> 1;
maxdepth = tablebits + 1;
len = 1;
depth = 1;
c = -1;
codeword = 0;
TabErr = 0;
mktb... | USHORT make_table(USHORT nchar, UCHAR bitlen[], USHORT tablebits,
USHORT table[]) {
n = avail = nchar;
blen = bitlen;
tbl = table;
tblsiz = (USHORT)(1U << tablebits);
bit = (USHORT)(tblsiz / 2);
maxdepth = (USHORT)(tablebits + 1);
depth = len = 1;
c = -1;
codeword = 0;
TabErr = 0;
... | make_table | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t mktbl() {
uint16_t v1;
uint16_t v2;
uint16_t v3;
uint16_t i;
uint16_t ia;
i = 0;
if (TabErr)
return 0;
if (len == depth) {
do {
if (++c >= (int)n) {
c = -1;
++len;
bit >>= 1;
goto LABEL_13;
}
} while (blen[c] != len);
ia = codeword;
... | static USHORT mktbl(void) {
USHORT i = 0;
if (TabErr)
return 0;
if (len == depth) {
while (++c < n)
if (blen[c] == len) {
i = codeword;
codeword += bit;
if (codeword > tblsiz) {
TabErr = 1;
return 0;
}
while (i < codeword)
tbl[i... | mktbl | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void printbandiz(uint8_t *m, uint16_t len) {
uint8_t *i;
uint8_t *j;
j = m;
for (i = m; i < &m[len]; ++i) {
if (*i == 10) {
*i = 0;
puts((const char *)j);
j = i + 1;
}
}
} | static void printbandiz(UCHAR *m, USHORT len) {
UCHAR *i, *j;
i = j = m;
while (i < m + len) {
if (*i == 10) {
*i = 0;
printf("%s\n", j);
j = i + 1;
}
i++;
}
} | printbandiz | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t read_tree_c() {
uint8_t *v0;
uint8_t *v1;
uint8_t *v3;
uint16_t i;
uint16_t ia;
uint16_t ib;
uint16_t ic;
uint16_t n;
uint16_t na;
n = bitbuf >> (bitcount - 9);
bitcount -= 9;
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v0 = indata++;
bitbuf = (bitbuf << 8) | *v... | static USHORT read_tree_c(void) {
USHORT i, n;
n = GETBITS(9);
DROPBITS(9);
if (n > 0) {
for (i = 0; i < n; i++) {
c_len[i] = (UCHAR)GETBITS(5);
DROPBITS(5);
}
for (i = n; i < 510; i++)
c_len[i] = 0;
if (make_table(510, c_len, 12, c_table))
return 1;
} else {
n = G... | read_tree_c | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
uint16_t read_tree_p() {
uint8_t *v0;
uint8_t *v1;
uint8_t *v3;
uint16_t i;
uint16_t ia;
uint16_t ib;
uint16_t ic;
uint16_t n;
uint16_t na;
n = bitbuf >> (bitcount - 5);
bitcount -= 5;
bitbuf &= mask_bits[bitcount];
while (bitcount <= 0xFu) {
v0 = indata++;
bitbuf = (bitbuf << 8) | *v... | static USHORT read_tree_p(void) {
USHORT i, n;
n = GETBITS(5);
DROPBITS(5);
if (n > 0) {
for (i = 0; i < n; i++) {
pt_len[i] = (UCHAR)GETBITS(4);
DROPBITS(4);
}
for (i = n; i < np; i++)
pt_len[i] = 0;
if (make_table(np, pt_len, 8, pt_table))
return 1;
} else {
n = ... | read_tree_p | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void reconst() {
long v0;
uint16_t i;
uint16_t ia;
uint16_t ib;
uint16_t j;
uint16_t ja;
uint16_t k;
uint16_t kb;
uint16_t ka;
uint16_t f;
uint16_t l;
j = 0;
for (i = 0; i <= 0x272u; ++i) {
if (son[i] > 0x272u) {
freq[j] = (freq[i] + 1) / 2;
son[j++] = son[i];
}
}
ia =... | static void reconst(void) {
USHORT i, j, k, f, l;
j = 0;
for (i = 0; i < T; i++) {
if (son[i] >= T) {
freq[j] = (USHORT)((freq[i] + 1) / 2);
son[j] = son[i];
j++;
}
}
for (i = 0, j = N_CHAR; j < T; i += 2, j++) {
k = (USHORT)(i + 1);
f = freq[j] = (USHORT)(freq[i] + freq[k]... | reconst | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void strcatmax(char *s1, char *s2, int max) {
size_t v3;
size_t v4;
char *v5;
v3 = strlen(s1);
if (v3 + strlen(s2) <= max) {
strcat(s1, s2);
} else {
v4 = max - strlen(s1);
v5 = &s1[strlen(s1)];
memcpy(v5, s2, v4);
s1[max] = 0;
}
} | static void strcatmax(char *s1, char *s2, int max) {
if (strlen(s1) + strlen(s2) > max) {
memcpy(s1 + strlen(s1), s2, max - strlen(s1));
*(s1 + max) = 0;
} else
strcat(s1, s2);
} | strcatmax | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
int strcmpnc(char *s1, char *s2) {
int v2;
int v3;
while (*s1) {
v2 = tolower(*s1);
if (v2 != tolower(*s2))
break;
++s1;
++s2;
}
v3 = tolower(*s1);
return v3 - tolower(*s2);
} | static int strcmpnc(char *s1, char *s2) {
while (*s1 && (tolower(*s1) == tolower(*s2))) {
s1++;
s2++;
}
return tolower(*s1) - tolower(*s2);
} | strcmpnc | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void strcpymax(char *s1, char *s2, int max) {
if (strlen(s2) <= max) {
strcpy(s1, s2);
} else {
memcpy(s1, s2, max);
s1[max] = 0;
}
} | static void strcpymax(char *s1, char *s2, int max) {
if (strlen(s2) > max) {
memcpy(s1, s2, max);
*(s1 + max) = 0;
} else
strcpy(s1, s2);
} | strcpymax | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
void update(uint16_t c) {
uint16_t ca;
uint16_t l;
uint16_t la;
uint16_t k;
uint16_t i;
uint16_t j;
if (freq[626] == 0x8000)
reconst();
ca = prnt[c + 627];
do {
k = ++freq[ca];
l = ca + 1;
if (k > freq[(unsigned short)(ca + 1)]) {
do
++l;
while (k > freq[l]);
... | INLINE void update(USHORT c) {
USHORT i, j, k, l;
if (freq[R] == MAX_FREQ) {
reconst();
}
c = prnt[c + T];
do {
k = ++freq[c];
if (k > freq[l = (USHORT)(c + 1)]) {
while (k > freq[++l])
;
l--;
freq[c] = freq[l];
freq[l] = k;
i = son[c];
prnt[i] = l;
... | update | xdms-1.3.2-r2 | app-arch | O0/app-arch/xdms-1.3.2-r2/xdms | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
const char *v4;
bool quiet;
int i;
int ia;
int size;
FILE *fp;
Duration dur;
double res[5];
*(_QWORD *)&res[3] = __readfsqword(0x28u);
if (argc == 2) {
size = atoi(argv[1]);
v4 = argv[1];
quiet = v4[strlen(v4) - 1] == ... | int main(int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "Error - don't run this yourself, run getc_putc!\n");
return 1;
}
int size = atoi(argv[1]);
bool quiet = false;
if (argv[1][strlen(argv[1]) - 1] == 'q')
quiet = true;
volatile char c;
int i;
Duration dur;
double res[2];... | main | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/getc_putc_helper | ida | O0 |
void start(long a1, long a2, void (*a3)()) {
long v3;
int v4;
long v5;
char *retaddr;
v4 = v5;
v5 = v3;
_libc_start_main((int (*)(int, char **, char **))main, v4, &retaddr, 0, 0, a3,
&v5);
__halt();
} | double Duration_Base::start() {
getTime(&m_start);
return m_start;
} | start | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/getc_putc_helper | ida | O0 |
void calc_vals() {
std_vector<std_vector<char const *>> _size_type v0;
VALS_TYPE v1;
std_vector<char const *> *v2;
std_vector<char const *> *v3;
const char **v4;
std_vector<char const *> *v6;
std_vector<char const *> *v7;
const std_vector<char const *> *v9;
std_vector<char const *> *v10;
std_vector<... | void calc_vals() {
ITEM *arr = new ITEM[data.size()];
for (unsigned int column_ind = 0; column_ind < MAX_ITEMS; column_ind++) {
switch (vals[column_ind]) {
case eNoCols: {
for (unsigned int row_ind = 0; row_ind < data.size(); row_ind++) {
if (column_ind == COL_CONCURRENCY) {
if (data... | calc_vals | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/bon_csv2html | ida | O0 |
int compar(const void *a, const void *b) {
if (*(double *)b <= *(double *)a)
return *(double *)a > *(double *)b;
else
return -1;
} | int compar(const void *a, const void *b) {
double a1 = PITEM(a)->val;
double b1 = PITEM(b)->val;
if (a1 < b1)
return -1;
if (a1 > b1)
return 1;
return 0;
} | compar | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/bon_csv2html | ida | O0 |
void footer() { puts("</table>\n</body></html>"); } | void footer() { printf("</table>\n</body></html>\n"); } | footer | bonnie++-2.00a | app-benchmarks | O0/app-benchmarks/bonnie++-2.00a/bon_csv2html | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.